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
commitaa9da28961945168b78712c309768e239147cc50 (patch)
treef12bc4f4a80dd67952dfc212f466af955bb92e10
parent0de571b69564ed8db69bfa87ddc028d2f1d8e3f1 (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/branches/ruby_1_8@10189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog10
-rw-r--r--lib/mkmf.rb9
-rw-r--r--mkconfig.rb5
-rw-r--r--win32/Makefile.sub15
-rw-r--r--win32/setup.mak12
5 files changed, 43 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 3398aad964..3960cdac31 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 7ab4b52e55..412ecd6917 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -1189,10 +1189,11 @@ 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
- mfile.print LINK_SO, "\n\n"
+ 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")
+ mfile.print link_so, "\n\n"
unless $static.nil?
mfile.print "$(STATIC_LIB): $(OBJS)\n\t"
mfile.print "$(AR) #{config_string('ARFLAGS') || 'cru '}$@ $(OBJS)"
diff --git a/mkconfig.rb b/mkconfig.rb
index 1e91d65820..1208606aa1 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -34,6 +34,7 @@ module Config
v_fast = []
v_others = []
+vars = {}
has_version = false
File.foreach "config.status" do |line|
next if /^#/ =~ line
@@ -50,8 +51,10 @@ File.foreach "config.status" do |line|
next if /^\$ac_\w+$/ =~ val
next if $install_name and /^RUBY_INSTALL_NAME$/ =~ name
next if $so_name and /^RUBY_SO_NAME$/ =~ name
- 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 60b94acdf2..3974d66cc6 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -141,6 +141,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
@@ -403,6 +406,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
@@ -425,15 +432,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): $(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)
@@ -446,6 +459,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 4f46807901..1d463d1b36 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;
}