2 ::: Don't set environment variable in batch file other than autoexec.bat
\r
3 ::: to avoid "Out of environment space" problem on Windows 95/98.
\r
4 ::: set TMPMAKE=~tmp~.mak
\r
7 echo>> ~tmp~.mak conf = %0
\r
8 echo>> ~tmp~.mak $(conf:\=/): nul
\r
9 echo>> ~tmp~.mak @del ~setup~.mak
\r
10 echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
\r
11 if exist pathlist.tmp del pathlist.tmp
\r
12 echo>confargs.tmp #define CONFIGURE_ARGS \
\r
14 if "%1" == "" goto :end
\r
15 if "%1" == "--prefix" goto :prefix
\r
16 if "%1" == "--srcdir" goto :srcdir
\r
17 if "%1" == "srcdir" goto :srcdir
\r
18 if "%1" == "--target" goto :target
\r
19 if "%1" == "target" goto :target
\r
20 if "%1" == "--with-static-linked-ext" goto :extstatic
\r
21 if "%1" == "--program-suffix" goto :suffix
\r
22 if "%1" == "--program-name" goto :installname
\r
23 if "%1" == "--install-name" goto :installname
\r
24 if "%1" == "--so-name" goto :soname
\r
25 if "%1" == "--enable-install-doc" goto :enable-rdoc
\r
26 if "%1" == "--disable-install-doc" goto :disable-rdoc
\r
27 if "%1" == "--extout" goto :extout
\r
28 if "%1" == "--path" goto :path
\r
29 if "%1" == "--with-baseruby" goto :baseruby
\r
30 if "%1" == "-h" goto :help
\r
31 if "%1" == "--help" goto :help
\r
32 echo>>confargs.tmp %1 \
\r
36 echo>> ~tmp~.mak "srcdir=%2" \
\r
37 echo>>confargs.tmp --srcdir=%2 \
\r
42 echo>> ~tmp~.mak "prefix=%2" \
\r
43 echo>>confargs.tmp %1=%2 \
\r
48 echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
\r
49 echo>>confargs.tmp %1=%2 \
\r
54 echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
\r
55 echo>>confargs.tmp %1=%2 \
\r
60 echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
\r
61 echo>>confargs.tmp %1=%2 \
\r
66 echo>> ~tmp~.mak "%2" \
\r
67 echo>>confargs.tmp --target=%2 \
\r
68 if "%2" == "x64-mswin64" goto target2
\r
69 if NOT "%2" == "ia64-mswin64" goto target3
\r
71 echo>> ~tmp~.mak "TARGET_OS=mswin64" \
\r
77 echo>> ~tmp~.mak "EXTSTATIC=static" \
\r
78 echo>>confargs.tmp %1 \
\r
82 echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
\r
83 echo>>confargs.tmp %1 \
\r
87 echo>> ~tmp~.mak "RDOCTARGET=install-nodoc" \
\r
88 echo>>confargs.tmp %1 \
\r
92 echo>> ~tmp~.mak "EXTOUT=%2" \
\r
93 echo>>confargs.tmp %1=%2 \
\r
98 echo>>pathlist.tmp %2;\
\r
99 echo>>confargs.tmp %1=%2 \
\r
104 echo>> ~tmp~.mak "BASERUBY=%2" \
\r
105 echo>>confargs.tmp %1=%2 \
\r
110 echo Configuration:
\r
111 echo --help display this help
\r
112 echo --srcdir=DIR find the sources in DIR [configure dir or `..']
\r
113 echo Installation directories:
\r
114 echo --prefix=PREFIX install files in PREFIX [/usr]
\r
116 echo --target=TARGET configure for TARGET [i386-mswin32]
\r
117 echo Optional Package:
\r
118 echo --with-baseruby=RUBY use RUBY as baseruby [ruby]
\r
119 echo --with-static-linked-ext link external modules statically
\r
120 echo --disable-install-doc do not install rdoc indexes during install
\r
125 echo>> ~tmp~.mak WIN32DIR=$(@D)
\r
126 echo.>>confargs.tmp
\r
127 echo>confargs.c #define $ $$
\r
128 type>>confargs.c confargs.tmp
\r
129 echo>>confargs.c configure_args = CONFIGURE_ARGS
\r
130 echo>>confargs.c #undef $
\r
131 if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
\r
132 if exist pathlist.tmp type>>confargs.c pathlist.tmp
\r
133 if exist pathlist.tmp echo.>>confargs.c
\r
134 if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
\r
135 cl -EP confargs.c > ~setup~.mak 2>nul
\r
136 if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
\r
137 if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
\r
138 if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
\r
139 type>>~setup~.mak ~tmp~.mak
\r
141 del ~tmp~.mak > nul
\r
142 nmake -alf ~setup~.mak
\r