diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-03 09:38:40 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-03-03 09:38:40 +0000 |
commit | a48c63f36b48bdad1cfea978b58410fc70fada7a (patch) | |
tree | 4f20ff4a932659300910e0c699d6735a13d8a07b | |
parent | 813a901a5e01675e548a2fd3ede472f9a2572bc3 (diff) | |
download | ruby-a48c63f36b48bdad1cfea978b58410fc70fada7a.tar.gz |
* {bcc32,win32,wince}/Makefile.sub (config.h): check if affected
when makefiles are modified.
* {bcc32,win32,wince}/Makefile.sub (config.status): add variables
for tests.
* win32/ifchange.bat: try to update a file only if modified.
* win32/resource.rb: more descriptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | bcc32/Makefile.sub | 17 | ||||
-rw-r--r-- | win32/Makefile.sub | 37 | ||||
-rwxr-xr-x | win32/ifchange.bat | 30 | ||||
-rw-r--r-- | win32/resource.rb | 12 | ||||
-rw-r--r-- | wince/Makefile.sub | 22 |
6 files changed, 110 insertions, 20 deletions
@@ -1,3 +1,15 @@ +Thu Mar 3 18:38:26 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * {bcc32,win32,wince}/Makefile.sub (config.h): check if affected + when makefiles are modified. + + * {bcc32,win32,wince}/Makefile.sub (config.status): add variables + for tests. + + * win32/ifchange.bat: try to update a file only if modified. + + * win32/resource.rb: more descriptions. + Thu Mar 3 11:49:51 2005 Kouhei Sutou <kou@cozmixng.org> * sample/rss/tdiary_plugin/rss-recent.rb: added site information. diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 8d91be7530..902a93451b 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -198,11 +198,14 @@ rubyw: $(WPROGRAM) PHONY: Makefile -config: config.h config.status +CONFIG_H = ./.config.h.time -config.h: - @echo Creating $(@:.\=) - @type > $@ &&| +config: config.status + +config.status: $(CONFIG_H) + +$(CONFIG_H): $(MKFILES) $(srcdir)bcc32/Makefile.sub + @$(srcdir:/=\)win32\ifchange.bat config.h &&| \#define HAVE_SYS_TYPES_H 1 \#define HAVE_SYS_STAT_H 1 \#define HAVE_STDLIB_H 1 @@ -275,6 +278,7 @@ config.h: \#define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" \#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" | + @exit > $@ config.status: $(MKFILES) $(srcdir)bcc32/Makefile.sub $(srcdir)common.mk @echo Creating $@ @@ -344,6 +348,11 @@ s,@STRIP@,$(STRIP),;t t s,@EXTSTATIC@,$(EXTSTATIC),;t t s,@setup@,Setup,;t t s,@MINIRUBY@,$(MINIRUBY),;t t +s,@PREP@,miniruby$(EXEEXT),;t t +s,@RUNRUBY@,$(RUNRUBY),;t t +s,@EXTOUT@,$(EXTOUT),;t t +s,@ARCHFILE@,,;t t +s,@RDOCTARGET@,,;t t s,@LIBRUBY_LDSHARED@,$$(LDSHARED),;t t s,@LIBRUBY_DLDFLAGS@,-Gi $$(DLDFLAGS),;t t s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t diff --git a/win32/Makefile.sub b/win32/Makefile.sub index d889b2b8d4..8a59bda74c 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -179,10 +179,15 @@ rubyw: $(WPROGRAM) !include $(srcdir)/common.mk -config: config.h config.status +CONFIG_H = ./.config.h.time -config.h: - @echo Creating <<$@ +config: config.status + +config.status: $(CONFIG_H) + +$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub + @echo Creating config.h + @$(srcdir:/=\)\win32\ifchange.bat config.h << #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 @@ -270,10 +275,27 @@ config.h: #define RUBY_PLATFORM "$(ARCH)-$(OS)" #define RUBY_ARCHLIB "/lib/ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(OS)" #define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/$(MAJOR).$(MINOR)/$(ARCH)-$(RT)" -<<KEEP +<< + @exit > $(@:/=\) + +#!if exist(config.h) +#! if exist(config_h.bak) +# @del config_h.bak +#! endif +# @ren config.h config_h.bak +#!endif +# @ren config_h~ config.h +#!if exist(config.h) +# @echo NMAKE will abort if config.h is changed, then restart NMAKE. +# @fc.exe config.h config_h.bak > nul +# @echo config.h unchanged. +# @del config.h +# @ren config_h.bak config.h +#!endif config.status: $(MKFILES) $(srcdir)/win32/Makefile.sub $(srcdir)/common.mk - @echo Creating <<$@ + @echo Creating $@ + @exit <<$@ # Generated automatically by Makefile.sub. s,@SHELL@,$$(COMSPEC),;t t s,@PATH_SEPARATOR@,;,;t t @@ -339,6 +361,11 @@ s,@STRIP@,$(STRIP),;t t s,@EXTSTATIC@,$(EXTSTATIC),;t t s,@setup@,Setup,;t t s,@MINIRUBY@,$(MINIRUBY),;t t +s,@PREP@,miniruby$(EXEEXT),;t t +s,@RUNRUBY@,$(RUNRUBY),;t t +s,@EXTOUT@,$(EXTOUT),;t t +s,@ARCHFILE@,,;t t +s,@RDOCTARGET@,,;t t s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t diff --git a/win32/ifchange.bat b/win32/ifchange.bat new file mode 100755 index 0000000000..61a80c841b --- /dev/null +++ b/win32/ifchange.bat @@ -0,0 +1,30 @@ +@echo off
+:: usage: ifchange target temporary
+
+:: check if fc.exe works.
+echo foo > conftest1.tmp
+echo bar > conftest2.tmp
+fc.exe conftest1.tmp conftest2.tmp > nul
+if not errorlevel 1 goto :brokenfc
+
+:: target does not exist or new file differs from it.
+if not exist %1 goto :update
+fc.exe %1 %2 > nul
+if errorlevel 1 goto :update
+
+:unchange
+echo %1 unchanged.
+del %2
+goto :end
+
+:brokenfc
+del conftest1.tmp > nul
+del conftest2.tmp > nul
+echo FC.EXE does not work properly.
+echo assuming %1 should be changed.
+
+:update
+echo %1 updated.
+if exist %1 del %1
+copy %2 %1 > nul
+:end
diff --git a/win32/resource.rb b/win32/resource.rb index 0bfebf2d63..b5a3a8b33a 100644 --- a/win32/resource.rb +++ b/win32/resource.rb @@ -46,11 +46,11 @@ icons.keys.sort.each do |i| dll_icons << "#{dll_icons.size + 1} ICON DISCARDABLE "+icons[i].dump+"\n" end -[ # base name extension file type icons - [$ruby_name, CONFIG["EXEEXT"], 'VFT_APP', ruby_icon], - [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', rubyw_icon || ruby_icon], - [$so_name, '.dll', 'VFT_DLL', dll_icons], -].each do |base, ext, type, icons| +[ # base name extension file type desc, icons + [$ruby_name, CONFIG["EXEEXT"], 'VFT_APP', 'CUI', ruby_icon], + [$rubyw_name, CONFIG["EXEEXT"], 'VFT_APP', 'GUI', rubyw_icon || ruby_icon], + [$so_name, '.dll', 'VFT_DLL', 'DLL', dll_icons], +].each do |base, ext, type, desc, icons| open(base + '.rc', "w") { |f| f.binmode if /mingw/ =~ RUBY_PLATFORM @@ -74,7 +74,7 @@ BEGIN BEGIN BLOCK "000004b0" BEGIN - VALUE "FileDescription", "Ruby interpreter\\0" + VALUE "FileDescription", "Ruby interpreter (#{desc}) #{RUBY_VERSION} [#{RUBY_PLATFORM}]\\0" VALUE "FileVersion", "#{fversion}\\0" VALUE "Home Page", "http://www.ruby-lang.org/\\0" VALUE "InternalName", "#{base + ext}\\0" diff --git a/wince/Makefile.sub b/wince/Makefile.sub index 6db823d063..c83fc85f7f 100644 --- a/wince/Makefile.sub +++ b/wince/Makefile.sub @@ -182,7 +182,11 @@ WINMAINOBJ = wincemain.$(OBJEXT) all: $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk ruby: $(PROGRAM) -config: config.h config.status +CONFIG_H = ./.config.h.time + +config: config.status + +config.status: $(CONFIG_H) BANG = ! @@ -190,8 +194,9 @@ BANG = ! !include config.h !endif -config.h: - @echo Creating <<$@ +$(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub + @echo Creating config.h + @$(srcdir:/=\)\win32\ifchange.bat config.h << #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 @@ -296,10 +301,12 @@ $(BANG)endif #define ispunct(c) ( !(isalnum(c)||isspace(c))?1:0 ) #define isxdigit(c) ( ((c>=0&&c<=9)||(c>='A'&&c<='F')||(c>='a'&&c<='f'))?1:0 ) #endif -<<KEEP +<< + @exit > $(@:/=\) config.status: $(MKFILES) $(srcdir)/wince/Makefile.sub $(srcdir)/common.mk - @echo Creating <<$@ + @echo Creating $@ + @exit <<$@ # Generated automatically by Makefile.sub. s,@SHELL@,$$(COMSPEC),;t t s,@PATH_SEPARATOR@,;,;t t @@ -365,6 +372,11 @@ s,@STRIP@,$(STRIP),;t t s,@EXTSTATIC@,$(EXTSTATIC),;t t s,@setup@,Setup,;t t s,@MINIRUBY@,$(MINIRUBY),;t t +s,@PREP@,miniruby$(EXEEXT),;t t +s,@RUNRUBY@,$(RUNRUBY),;t t +s,@EXTOUT@,$(EXTOUT),;t t +s,@ARCHFILE@,,;t t +s,@RDOCTARGET@,,;t t s,@LIBRUBY_LDSHARED@,$(LIBRUBY_LDSHARED),;t t s,@LIBRUBY_DLDFLAGS@,$(LIBRUBY_DLDFLAGS),;t t s,@RUBY_INSTALL_NAME@,$(RUBY_INSTALL_NAME),;t t |