ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/RubyInstaller/GNUmakefile
Revision: 1094
Committed: 2008-09-26T04:36:42-07:00 (16 years, 8 months ago) by douglas
File size: 1561 byte(s)
Log Message:
Seems to work.

File Contents

# User Rev Content
1 douglas 1092 # Ruby Installer
2     #
3     # Douglas Thrift
4     #
5     # $Id$
6    
7     ifeq ($(OS),Windows_NT)
8 douglas 1094 BASE := $(CURDIR)/ruby
9 douglas 1092 CP := C:\cygwin\bin\cp.exe
10     GEMS_INSTALL := gems-install.cmd
11     RM_F := del /F /A
12     RM_RF := rmdir /Q /S
13     TOUCH := touch.cmd
14     else
15 douglas 1094 BASE := Z:$(CURDIR)/ruby
16 douglas 1092 CP := cp
17     GEMS_INSTALL := ./gems-install.sh
18     RM_F := rm -f
19     RM_RF := rm -rf
20     TOUCH := touch
21     endif
22    
23     RUBY_ZIP := $(lastword $(wildcard ruby-*-i386-mswin32.zip))
24     RUBY_VERSION := $(patsubst ruby-%-i386-mswin32.zip,%,$(RUBY_ZIP))
25     GEMS_ZIP := $(lastword $(wildcard rubygems-*.zip))
26     GEMS_VERSION := $(patsubst rubygems-%.zip,%,$(GEMS_ZIP))
27     GEMS_DIR := rubygems-$(GEMS_VERSION)
28     INSTALLER := ruby-$(RUBY_VERSION)-rubygems-$(GEMS_VERSION).exe
29    
30     .PHONY: all clean
31    
32     all: $(INSTALLER)
33    
34     .gems: $(GEMS_ZIP) .ruby-install
35     -$(RM_RF) $(GEMS_DIR)
36     unzip $(GEMS_ZIP)
37     $(TOUCH) $@
38    
39     .gems-install: .gems
40     $(GEMS_INSTALL) $(GEMS_DIR)
41     $(TOUCH) $@
42    
43     .ruby: $(RUBY_ZIP)
44     -$(RM_RF) ruby
45     unzip $(RUBY_ZIP) -d ruby
46     $(TOUCH) $@
47    
48 douglas 1094 .ruby-install: ruby/bin/history.dll ruby/bin/libeay32.dll ruby/bin/history.dll \
49     ruby/bin/ssleay32.dll ruby/bin/zlib.dll
50 douglas 1092 $(TOUCH) $@
51    
52 douglas 1094 $(INSTALLER): ruby-installer.nsi .gems-install
53     makensis /DRUBY_VERSION=$(RUBY_VERSION) /DGEMS_VERSION=$(GEMS_VERSION) \
54     /DBASE=$(BASE) $<
55 douglas 1092
56     ruby/bin/%.dll: %.dll .ruby
57     $(CP) $< $@
58    
59 douglas 1094 ruby/bin/history.dll: history5.dll .ruby
60     $(CP) $< $@
61    
62     ruby/bin/readline.dll: readline5.dll .ruby
63     $(CP) $< $@
64    
65 douglas 1092 ruby/bin/zlib.dll: zlib1.dll .ruby
66     $(CP) $< $@
67    
68     clean:
69 douglas 1093 -$(RM_F) .gems* .ruby* $(INSTALLER)
70 douglas 1092 -$(RM_RF) ruby $(GEMS_DIR)

Properties

Name Value
svn:keywords Id