diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-14 14:10:08 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-10-14 14:10:08 +0000 |
commit | 2171f96cfbc5c99460b3e3cb968b3dbd341c5dd1 (patch) | |
tree | 08d4051a7ab8940d1b148995321365183dfc5606 /win32 | |
parent | 2cfa0b266775b2c58ae0a02dfcd0f354e487ab60 (diff) | |
download | ruby-2171f96cfbc5c99460b3e3cb968b3dbd341c5dd1.tar.gz ruby-2171f96cfbc5c99460b3e3cb968b3dbd341c5dd1.tar.xz ruby-2171f96cfbc5c99460b3e3cb968b3dbd341c5dd1.zip |
* win32/Makefile.sub (MKFILES): update MKFILES if configure files get
changed.
* win32/configure.bat, win32/setup.mak (configure_args): store
arguments to configure files.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/Makefile.sub | 13 | ||||
-rwxr-xr-x | win32/configure.bat | 41 | ||||
-rw-r--r-- | win32/setup.mak | 6 |
3 files changed, 57 insertions, 3 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub index c5c7b49ab..1b0279ce2 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -6,6 +6,12 @@ NULL = nul #### Start of system configuration section. #### +!if defined(pathlist) +PATH = $(pathlist:;=/bin;)$(PATH) +INCLUDE = $(pathlist:;=/include;) +LIB = $(pathlist:;=/lib;) +!endif + ## variables may be overridden by $(compile_dir)/Makefile !ifndef srcdir srcdir = .. @@ -179,6 +185,10 @@ rubyw: $(WPROGRAM) !include $(srcdir)/common.mk +$(MKFILES): $(srcdir)/win32/Makefile.sub $(srcdir)/win32/configure.bat $(srcdir)/win32/setup.mak + $(srcdir:/=\)\win32\configure.bat $(configure_args) + @echo $(MKFILES) should be updated, re-run $(MAKE). + CONFIG_H = ./.config.h.time config: config.status @@ -187,6 +197,9 @@ config.status: $(CONFIG_H) $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub @echo Creating config.h +!if exist(config.h) + @copy config.h config.h.old > nul +!endif @$(srcdir:/=\)\win32\ifchange.bat config.h << #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 diff --git a/win32/configure.bat b/win32/configure.bat index 00c934721..b6d5aed93 100755 --- a/win32/configure.bat +++ b/win32/configure.bat @@ -6,8 +6,10 @@ echo> ~tmp~.mak ####
echo>> ~tmp~.mak conf = %0
echo>> ~tmp~.mak $(conf:\=/): nul
-echo>> ~tmp~.mak @del ~tmp~.mak
+echo>> ~tmp~.mak @del ~setup~.mak
echo>> ~tmp~.mak @-$(MAKE) -l$(MAKEFLAGS) -f $(@D)/setup.mak \
+if exist pathlist.tmp del pathlist.tmp
+echo>confargs.tmp #define CONFIGURE_ARGS \
:loop
if "%1" == "" goto :end
if "%1" == "--prefix" goto :prefix
@@ -21,55 +23,73 @@ if "%1" == "--program-name" goto :progname if "%1" == "--enable-install-doc" goto :enable-rdoc
if "%1" == "--disable-install-doc" goto :disable-rdoc
if "%1" == "--extout" goto :extout
+if "%1" == "--path" goto :path
if "%1" == "-h" goto :help
if "%1" == "--help" goto :help
echo>> ~tmp~.mak "%1" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:srcdir
echo>> ~tmp~.mak "srcdir=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:prefix
echo>> ~tmp~.mak "prefix=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:suffix
echo>> ~tmp~.mak "RUBY_SUFFIX=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:installname
echo>> ~tmp~.mak "RUBY_INSTALL_NAME=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:soname
echo>> ~tmp~.mak "RUBY_SO_NAME=%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:target
echo>> ~tmp~.mak "%2" \
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
:extstatic
echo>> ~tmp~.mak "EXTSTATIC=static" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:enable-rdoc
echo>> ~tmp~.mak "RDOCTARGET=install-doc" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:disable-rdoc
echo>> ~tmp~.mak "RDOCTARGET=install-nodoc" \
+ echo>>confargs.tmp %1 \
shift
goto :loop
:extout
echo>> ~tmp~.mak "EXTOUT=%2" \
+ echo>>confargs.tmp %1=%2 \
+ shift
+ shift
+goto :loop
+:path
+ echo>>pathlist.tmp %2;\
+ echo>>confargs.tmp %1=%2 \
shift
shift
goto :loop
@@ -84,9 +104,26 @@ goto :loop echo Optional Package:
echo --with-static-linked-ext link external modules statically
echo --disable-install-doc do not install rdoc indexes during install
+ del *.tmp
del ~tmp~.mak
goto :exit
:end
echo>> ~tmp~.mak WIN32DIR=$(@D)
-nmake -alf ~tmp~.mak
+echo.>>confargs.tmp
+echo>confargs.c #define $ $$
+type>>confargs.c confargs.tmp
+echo>>confargs.c configure_args = CONFIGURE_ARGS
+echo>>confargs.c #undef $
+if exist pathlist.tmp echo>>confargs.c #define PATH_LIST \
+if exist pathlist.tmp type>>confargs.c pathlist.tmp
+if exist pathlist.tmp echo.>>confargs.c
+if exist pathlist.tmp echo>>confargs.c pathlist = PATH_LIST
+cl -EP confargs.c > ~setup~.mak 2>nul
+if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
+if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
+if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
+type>>~setup~.mak ~tmp~.mak
+del *.tmp > nul
+del ~tmp~.mak > nul
+nmake -alf ~setup~.mak
:exit
diff --git a/win32/setup.mak b/win32/setup.mak index 3919bfafd..358ba61dd 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -139,7 +139,12 @@ $(CPU) = $(PROCESSOR_LEVEL) @$(APPEND) $(CPU) = 6 -epilogue-: nul +!if exist(confargs.c) + @$(CPP) confargs.c | findstr /v /r ^^$$ >> $(MAKEFILE) + @del confargs.c +!endif @type << >>$(MAKEFILE) + # OS = $(OS) # RUBY_INSTALL_NAME = ruby # RUBY_SO_NAME = $$(RT)-$$(RUBY_INSTALL_NAME)$$(MAJOR)$$(MINOR) @@ -153,5 +158,4 @@ $(CPU) = $(PROCESSOR_LEVEL) $(BANG)include $$(srcdir)/win32/Makefile.sub << - @$(srcdir:/=\)\win32\rm.bat config.h config.status @echo type `$(MAKE)' to make ruby for $(OS). |