summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-24 16:52:00 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-05-24 16:52:00 +0000
commit0ca603c1bc9a4b3d583a0ad42d4b013d8ea62738 (patch)
tree36d2736a54d2a2f7af36102fcc4f0865f72d3491
parent32a75c9dcb00864e24acc5f8e76e987300addf27 (diff)
* 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
-rw-r--r--ChangeLog10
-rw-r--r--lib/mkmf.rb8
-rw-r--r--mkconfig.rb5
-rw-r--r--win32/Makefile.sub15
-rw-r--r--win32/setup.mak13
5 files changed, 43 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 4905209ddb..41f77f3c8c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 5c3a0266ce..3a71402973 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -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
diff --git a/mkconfig.rb b/mkconfig.rb
index e64490e287..559078aca6 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -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
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 8039fc8629..381fad8307 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -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)
diff --git a/win32/setup.mak b/win32/setup.mak
index ab7960090e..e066805bd5 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -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).