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

* 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
This commit is contained in:
nobu 2006-05-24 16:52:00 +00:00
parent 0de571b695
commit aa9da28961
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

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

View file

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

View file

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

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;
}