* mkconfig.rb: merge multiple entries to an entry with multiple lines.

* lib/mkmf.rb: allow a series of commands to link.

* win32/Makefile.sub: embed manifests.

* win32/setup.mak: suffix OS name by runtime version.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2006-05-24 16:52:00 +00:00
parent 32a75c9dcb
commit 0ca603c1bc
5 changed files with 43 additions and 8 deletions

View File

@ -1,9 +1,17 @@
Thu May 25 01:43:30 2006 nobuyoshi nakada <nobu@ruby-lang.org>
Thu May 25 01:52:07 2006 nobuyoshi nakada <nobu@ruby-lang.org>
* lib/mkmf.rb (pkg_config): particular config commands support.
* ext/extmk.rb: deal with $static set in extconf.rb.
* mkconfig.rb: merge multiple entries to an entry with multiple lines.
* lib/mkmf.rb: allow a series of commands to link.
* win32/Makefile.sub: embed manifests.
* win32/setup.mak: suffix OS name by runtime version.
Wed May 24 23:52:11 2006 nobuyoshi nakada <nobu@ruby-lang.org>
* configure.in (ac_install_sh): ignore dummy install-sh.

View File

@ -1191,10 +1191,10 @@ site-install-rb: install-rb
end
mfile.print "$(RUBYARCHDIR)/" if $extout
mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n\t"
mfile.print "@-$(RM) $@\n\t"
mfile.print "@-$(MAKEDIRS) $(@D)\n\t" if $extout
link_so = LINK_SO
mfile.print "$(DLLIB): ", (makedef ? "$(DEFFILE) " : ""), "$(OBJS)\n"
mfile.print "\t@-$(RM) $@\n"
mfile.print "\t@-$(MAKEDIRS) $(@D)\n" if $extout
link_so = LINK_SO.gsub(/^/, "\t")
if srcs.any?(&%r"\.(?:#{CXX_EXT.join('|')})\z".method(:===))
link_so = link_so.sub(/\bLDSHARED\b/, '\&XX')
end

View File

@ -34,6 +34,7 @@ module RbConfig
v_fast = []
v_others = []
vars = {}
has_version = false
File.foreach "config.status" do |line|
next if /^#/ =~ line
@ -51,8 +52,10 @@ File.foreach "config.status" do |line|
next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name
next if $so_name and /^RUBY_SO_NAME$/ =~ name
val.gsub!(/ +(?!-)/, "=") if name == "configure_args" && /mswin32/ =~ RUBY_PLATFORM
v = " CONFIG[\"" + name + "\"] = " +
v = " CONFIG[\"" + name + "\"] #{vars[name] ? '<<' : ''}= " +
(vars[name] ? '"\n" ' : '') +
val.gsub(/\$(?:\$|\{?(\w+)\}?)/) {$1 ? "$(#{$1})" : $&}.dump + "\n"
vars[name] = true
if fast[name]
v_fast << v
else

View File

@ -151,6 +151,9 @@ XCFLAGS = -DRUBY_EXPORT -I. -I$(srcdir) -I$(srcdir)/missing
!if $(MSC_VER) >= 1400
# Prevents VC++ 2005 (cl ver 14) warnings
CPPFLAGS = $(CPPFLAGS) -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
MANIFESTTOOL = mt -nologo
LDSHARED_1 = $(MANIFESTTOOL) -manifest $(@).manifest -outputresource:$(@);2
LDSHARED_2 = @$(RM) $(@:/=\).manifest
!endif
DLDFLAGS = $(LDFLAGS) -dll
@ -440,6 +443,10 @@ s,@LIBPATHFLAG@, -libpath:"%s",;t t
s,@RPATHFLAG@,,;t t
s,@LIBARG@,%s.lib,;t t
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS),;t t
!if $(MSC_VER) >= 1400
s,@LINK_SO@,$(MANIFESTTOOL) -manifest $$(@).manifest -outputresource:$$(@);2,;t t
s,@LINK_SO@,@$$(RM) $$(@:/=\).manifest,;t t
!endif
s,@COMPILE_C@,$$(CC) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
s,@COMPILE_CXX@,$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
@ -462,15 +469,21 @@ s,@top_srcdir@,$(srcdir),;t t
miniruby$(EXEEXT):
@echo. $(LIBS)
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(LIBRUBY_A) $(LIBS) -Fe$@ $(LDFLAGS)
$(LDSHARED_1)
$(LDSHARED_2)
$(PROGRAM): $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
$(PURIFY) $(CC) $(MAINOBJ) $(RUBY_INSTALL_NAME).res \
$(OUTFLAG)$@ $(LIBRUBYARG) $(LDFLAGS) $(XLDFLAGS)
$(LDSHARED_1)
$(LDSHARED_2)
$(WPROGRAM): $(MAINOBJ) $(WINMAINOBJ) $(LIBRUBY_SO) $(RUBYW_INSTALL_NAME).res
$(PURIFY) $(CC) $(MAINOBJ) $(WINMAINOBJ) \
$(RUBYW_INSTALL_NAME).res $(OUTFLAG)$@ $(LIBRUBYARG) \
$(LDFLAGS) $(XLDFLAGS) -subsystem:Windows
$(LDSHARED_1)
$(LDSHARED_2)
$(LIBRUBY_A): $(OBJS) $(DMYEXT)
$(AR) $(ARFLAGS)$@ $(OBJS) $(DMYEXT)
@ -483,6 +496,8 @@ $(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
$(LDSHARED) $(MAINOBJ) $(DLDOBJS) $(LIBRUBY_A) \
$(RUBY_SO_NAME).res $(LIBS) -Fe$@ $(LDFLAGS) \
$(LIBRUBY_DLDFLAGS)
$(LDSHARED_1)
$(LDSHARED_2)
$(RUBYDEF): $(LIBRUBY_A) $(PREP)
$(MINIRUBY) $(srcdir)/win32/mkexports.rb -output=$@ $(LIBRUBY_A)

View File

@ -69,7 +69,7 @@ int
runtime_name()
{
char libpath[MAXPATHLEN+1];
char *p, *base = NULL;
char *p, *base = NULL, *ver = NULL;
HMODULE msvcrt = NULL;
MEMORY_BASIC_INFORMATION m;
@ -87,9 +87,17 @@ runtime_name()
if (!base) return 0;
if (p = strchr(base, '.')) *p = '\0';
for (p = base; *p; p = CharNext(p)) {
if (isascii(*p) && isupper(*p))
if (!isascii(*p)) continue;
if (isupper(*p)) {
*p = tolower(*p);
}
if (!isdigit(*p)) {
ver = NULL;
} else if (!ver) {
ver = p;
}
}
if (ver) printf("OS = $$(OS)_%s\n", ver);
printf("RT = %s\n", base);
return 1;
}
@ -159,4 +167,5 @@ $(CPU) = $(PROCESSOR_LEVEL)
$(BANG)include $$(srcdir)/win32/Makefile.sub
<<
@$(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat config.h config.status
@echo type `$(MAKE)' to make ruby for $(OS).