1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* {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
This commit is contained in:
nobu 2005-03-03 09:38:40 +00:00
parent 813a901a5e
commit a48c63f36b
6 changed files with 110 additions and 20 deletions

View file

@ -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.

View file

@ -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

View file

@ -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

30
win32/ifchange.bat Executable file
View file

@ -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

View file

@ -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"

View file

@ -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