mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
compiled output file name explicitly. * enc/Makefile.in, enc/depend: now makes compiler to put generated files under directories corresnponding to the each source. enc/trans supported. * enc/make_encmake.rb: evaluates depend file before Makefile.in so that the former can influence to CONFIG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7c45c61581
commit
8d292a08df
11 changed files with 125 additions and 81 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
Mon Dec 24 12:49:54 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* Makefile.in, configure.in, lib/mkmf.rb, */Makefile.sub: specify
|
||||
compiled output file name explicitly.
|
||||
|
||||
* enc/Makefile.in, enc/depend: now makes compiler to put generated
|
||||
files under directories corresnponding to the each source.
|
||||
enc/trans supported.
|
||||
|
||||
* enc/make_encmake.rb: evaluates depend file before Makefile.in so
|
||||
that the former can influence to CONFIG.
|
||||
|
||||
Mon Dec 24 12:35:03 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win{32,ce}/Makefile.sub (MFLAGS): defaulted to -l.
|
||||
|
@ -5,7 +17,7 @@ Mon Dec 24 12:35:03 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
|||
Mon Dec 24 12:08:10 2007 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* /, ext/: Add svn:ignore for OS X Xcode 3's conftest.dSYM
|
||||
directories.
|
||||
directories.
|
||||
|
||||
Mon Dec 24 11:56:31 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/mis
|
|||
|
||||
empty =
|
||||
OUTFLAG = @OUTFLAG@$(empty)
|
||||
COUTFLAG = @COUTFLAG@$(empty)
|
||||
CFLAGS = @CFLAGS@ @ARCH_FLAG@
|
||||
XCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(srcdir) @XCFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
@ -182,13 +183,13 @@ lex.c: keywords
|
|||
fi
|
||||
|
||||
.c.@OBJEXT@:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c $<
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c $<
|
||||
|
||||
.s.@OBJEXT@:
|
||||
$(AS) $(ASFLAGS) -o $@ $<
|
||||
|
||||
.c.S:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -S $<
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -S $<
|
||||
|
||||
clean-local::
|
||||
@$(RM) ext/extinit.c ext/extinit.$(OBJEXT)
|
||||
|
@ -197,4 +198,4 @@ distclean-local::
|
|||
@$(RM) ext/config.cache $(RBCONFIG)
|
||||
|
||||
ext/extinit.$(OBJEXT): ext/extinit.c $(SETUP)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(OUTFLAG)$@ -c ext/extinit.c
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
|
||||
|
|
|
@ -128,6 +128,7 @@ RDOCTARGET = install-doc
|
|||
!endif
|
||||
|
||||
OUTFLAG = -o
|
||||
COUTFLAG = -o
|
||||
!ifndef CFLAGS
|
||||
CFLAGS = -q -tWR -tWC $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG) -w- -wsus -wcpt -wdup -wext -wrng -wrpt -wzdi
|
||||
!endif
|
||||
|
@ -214,10 +215,10 @@ VPATH = $(arch_hdrdir)/ruby;$(hdrdir)/ruby;$(srcdir);$(srcdir)/enc;$(srcdir)/mis
|
|||
.path. = $(srcdir)
|
||||
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -c $(<:/=\)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -c $(<:/=\)
|
||||
|
||||
.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) -S $(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) -I. $(CPPFLAGS) $(COUTFLAG)$@ -S $(<:\=/)
|
||||
|
||||
.rc.res:
|
||||
$(RC) $(RFLAGS) -I. -I$(<D). $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:/=\)
|
||||
|
@ -431,13 +432,14 @@ s,@SOLIBS@,$(SOLIBS),;t t
|
|||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||
s,@ENABLE_SHARED@,yes,;t t
|
||||
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||
s,@COUTFLAG@,$(COUTFLAG),;t t
|
||||
s,@CPPOUTFILE@,,;t t
|
||||
s,@LIBPATHFLAG@, -L"%s",;t t
|
||||
s,@RPATHFLAG@,,;t t
|
||||
s,@LIBARG@,%s.lib,;t t
|
||||
s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE), $$(RESFILE),;t t
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) -c $$(<:/=\),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -P -c $$(<:/=\),;t t
|
||||
s,@LINK_SO@,$$(LDSHARED) $$(DLDFLAGS) $$(LIBPATH) $$(OBJS:/=\), $$(@:/=\), nul, $$(LIBS) $$(LOCAL_LIBS), $$(DEFFILE:/=\), $$(RESFILE:/=\),;t t
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -P $(COUTFLAG)$$(@) -c $$(<:/=\),;t t
|
||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
|
||||
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
|
||||
s,@COMMON_LIBS@,m advapi32 avicap32 avifil32 cap comctl32 comdlg32 dlcapi gdi32 glu32 imagehlp imm32 inetmib1 kernel32 loadperf lsapi32 lz32 mapi32 mgmtapi mpr msacm32 msvfw32 nddeapi netapi32 ole32 oleaut32 oledlg olepro32 opengl32 pdh pkpd32 rasapi32 rasdlg rassapi rpcrt4 setupapi shell32 shfolder snmpapi sporder tapi32 url user32 vdmdbg version win32spl winmm wintrust wsock32,;t t
|
||||
|
@ -460,7 +462,7 @@ s,@top_srcdir@,$(srcdir),;t t
|
|||
|
||||
miniruby$(EXEEXT):
|
||||
@echo $(LIBS)
|
||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT),$@,nul,$(LIBS)
|
||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS:/=\) $(DMYEXT),$@,nul,$(LIBS)
|
||||
|
||||
$(PROGRAM): $(MAINOBJ) $(LIBRUBY_SO) $(RUBY_INSTALL_NAME).res
|
||||
$(LD) $(LDFLAGS) $(XLDFLAGS) $(MAINOBJ),$@,nul,$(LIBRUBYARG) $(LIBS),,$(RUBY_INSTALL_NAME).res
|
||||
|
@ -518,7 +520,7 @@ distclean-local::
|
|||
@$(RM) $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc
|
||||
|
||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -o$@ -c ext/extinit.c
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
|
||||
|
||||
main.$(OBJEXT): win32.h
|
||||
ascii.$(OBJEXT): win32.h
|
||||
|
|
|
@ -341,7 +341,7 @@ $(RBCONFIG): $(srcdir)/mkconfig.rb config.status $(PREP)
|
|||
-so_name=$(RUBY_SO_NAME) rbconfig.rb
|
||||
|
||||
encs: enc.mk
|
||||
$(MINIRUBY) -I$(srcdir)/lib -run -e mkdir -- -p "$(EXTOUT)/$(arch)/enc"
|
||||
$(MINIRUBY) -I$(srcdir)/lib -run -e mkdir -- -p "$(EXTOUT)/$(arch)/enc/trans" enc/trans
|
||||
$(MAKE) -f enc.mk $(MFLAGS)
|
||||
|
||||
enc.mk: $(srcdir)/enc/make_encmake.rb $(srcdir)/enc/Makefile.in $(srcdir)/enc/depend \
|
||||
|
|
|
@ -180,7 +180,9 @@ RUBY_PROG_GNU_LD
|
|||
RUBY_CPPOUTFILE
|
||||
|
||||
: ${OUTFLAG='-o '}
|
||||
: ${COUTFLAG=${OUTFLAG}}
|
||||
AC_SUBST(OUTFLAG)
|
||||
AC_SUBST(COUTFLAG)
|
||||
|
||||
RUBY_MINGW32
|
||||
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
srcdir = @srcdir@
|
||||
encsrcdir = @srcdir@
|
||||
topdir = .
|
||||
libdir = @libdir@
|
||||
top_srcdir = $(srcdir:/enc=)
|
||||
top_srcdir = $(encsrcdir:/enc=)
|
||||
srcdir = $(top_srcdir)
|
||||
arch = @arch@
|
||||
EXTOUT = @EXTOUT@
|
||||
hdrdir = $(top_srcdir)/include
|
||||
hdrdir = $(srcdir)/include
|
||||
arch_hdrdir = $(EXTOUT)/include/$(arch)
|
||||
ENCSODIR = $(EXTOUT)/$(arch)/enc
|
||||
TRANSSODIR = $(ENCSODIR)/trans
|
||||
DLEXT = @DLEXT@
|
||||
OBJEXT = @OBJEXT@
|
||||
|
||||
|
@ -22,6 +24,7 @@ LIBRUBYARG_STATIC = $(LIBRUBYARG_SHARED)
|
|||
empty =
|
||||
CC = @CC@
|
||||
OUTFLAG = @OUTFLAG@$(empty)
|
||||
COUTFLAG = @COUTFLAG@$(empty)
|
||||
CFLAGS = $(CCDLFLAGS) @CFLAGS@ @ARCH_FLAG@
|
||||
CCDLFLAGS = @CCDLFLAGS@
|
||||
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir) -I$(top_srcdir)
|
||||
|
@ -34,3 +37,10 @@ LDSHARED = @LDSHARED@
|
|||
DLDFLAGS = @DLDFLAGS@ $(EXTLDFLAGS) @ARCH_FLAG@
|
||||
|
||||
RM = @RM@
|
||||
|
||||
all:
|
||||
|
||||
clean:
|
||||
|
||||
distclean: clean
|
||||
$(RM) enc.mk
|
||||
|
|
65
enc/depend
65
enc/depend
|
@ -1,54 +1,63 @@
|
|||
% deffile = (true if /\$\(DEFFILE\)/ =~ CONFIG["LINK_SO"])
|
||||
% encs = Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)} - BUILTIN_ENCS
|
||||
% encs.each {|e| e.chomp!(".c")}
|
||||
% encs = encs.sort_by {|e| e.split(/(\d+)/).map {|n| Integer(n) rescue n}}
|
||||
% alphanumeric_order = proc {|e| e.split(/(\d+)/).map {|n| Integer(n) rescue n}}
|
||||
% encs = encs.sort_by(&alphanumeric_order)
|
||||
% trans = Dir.open($srcdir+"/trans") {|d| d.select {|e| e.chomp!('.c')}}
|
||||
% trans = trans.sort_by(&alphanumeric_order)
|
||||
% trans.map! {|e| "trans/#{e}"}
|
||||
% dependencies = encs + trans
|
||||
|
||||
VPATH = <%=%w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(top_srcdir) $(srcdir)].join(CONFIG["PATH_SEPARATOR"])%>
|
||||
VPATH = <%=%w[$(arch_hdrdir)/ruby $(hdrdir)/ruby $(srcdir) $(encsrcdir)].join(CONFIG["PATH_SEPARATOR"])%>
|
||||
LIBPATH = <%=libpathflag($DEFLIBPATH)%>
|
||||
|
||||
ENCOBJS = <%=encs.map {|e|"#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%="\n" if encs.size>1%>
|
||||
ENCDEFS = <%=encs.map {|e|"#{e}.def"}.join(" \\\n\t ") if DEFFILE%><%="\n" if encs.size>1%>
|
||||
ENCOBJS = <%=encs.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%="\n" if encs.size>1%>
|
||||
ENCDEFS = <%=encs.map {|e|"enc/#{e}.def"}.join(" \\\n\t ") if deffile%><%="\n" if encs.size>1%>
|
||||
ENCSOS = <%=encs.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%>
|
||||
|
||||
all: $(ENCSOS)
|
||||
TRANSOBJS = <%=trans.map {|e|"enc/#{e}.$(OBJEXT)"}.join(" \\\n\t ")%><%="\n" if trans.size>1%>
|
||||
TRANSDEFS = <%=trans.map {|e|"enc/#{e}.def"}.join(" \\\n\t ") if deffile%><%="\n" if trans.size>1%>
|
||||
TRANSSOS = <%=trans.map {|e|"$(ENCSODIR)/#{e}.$(DLEXT)"}.join(" \\\n\t ")%>
|
||||
|
||||
all: $(ENCSOS) $(TRANSSOS)
|
||||
|
||||
% COMPILE_RULES.each do |rule|
|
||||
<%= rule % %w[c $(OBJEXT)] %>
|
||||
<%=COMPILE_C%>
|
||||
|
||||
% end
|
||||
% unless encs.empty?
|
||||
% unless encs.empty? or trans.empty?
|
||||
|
||||
% unless encs.empty?
|
||||
$(ENCOBJS): regenc.h oniguruma.h config.h defines.h
|
||||
|
||||
% encs.each do |e|
|
||||
<%=e%>.so: $(ENCSODIR)/<%=e%>.$(DLEXT)
|
||||
% end
|
||||
% end
|
||||
% unless trans.empty?
|
||||
$(TRANSOBJS): ruby.h intern.h config.h defines.h transcode_data.h
|
||||
% end
|
||||
|
||||
% end
|
||||
% link_so = LINK_SO.gsub(/\n/, "\n\t")
|
||||
% encs.each do |e|
|
||||
% deps = "#{e}.$(OBJEXT)"
|
||||
% deps << " #{e}-$(arch).def" if DEFFILE
|
||||
$(ENCSODIR)/<%=e%>.$(DLEXT): <%=deps%>
|
||||
<%=link_so.sub(/\$\(OBJS\)/, deps)%>
|
||||
|
||||
% end
|
||||
% if DEFFILE
|
||||
% encs.each do |e|
|
||||
<%=e%>-$(arch).def: enc.mk
|
||||
echo EXPORTS > $@
|
||||
echo <%=EXPORT_PREFIX%>Init_<%=e%> >> $@
|
||||
|
||||
% link_so.gsub!(/(-(?:implib|pdb):\S+)-\$\(arch\)\./, '\1.')
|
||||
% dependencies.each do |e|
|
||||
% obj = "enc/#{e}.$(OBJEXT)"
|
||||
% df = ("enc/#{e}.def" if deffile)
|
||||
$(ENCSODIR)/<%=e%>.$(DLEXT): <%=obj%>
|
||||
% if df
|
||||
echo EXPORTS > <%=df%>
|
||||
echo <%=EXPORT_PREFIX%>Init_<%=File.basename(e)%> >> <%=df%>
|
||||
% end
|
||||
<%=link_so.sub(/\$\(OBJS\)/) {obj}.sub(/\$\(DEFFILE\)/) {df}.gsub(/-(?:implib|pdb):/) {|s|"#{s}enc/#{e.sub(/[^\/]+\z/, '')}"}%>
|
||||
|
||||
% end
|
||||
% encs.each do |e|
|
||||
<%=e%>.$(OBJEXT): <%=e%>.c
|
||||
% dependencies.each do |e|
|
||||
enc/<%=e%>.$(OBJEXT): $(srcdir)/enc/<%=e%>.c
|
||||
<%=COMPILE_C.sub(/\$\(<(?:.*)\)/) {"$(srcdir)/enc/#{e}.c"}%>
|
||||
% end
|
||||
|
||||
clean:
|
||||
$(RM) $(ENCSOS)
|
||||
$(RM) $(ENCDEFS)
|
||||
$(RM) $(ENCOBJS)
|
||||
|
||||
distclean: clean
|
||||
$(RM) enc.mk
|
||||
$(RM) $(TRANSSOS)
|
||||
$(RM) $(TRANSDEFS)
|
||||
$(RM) $(TRANSOBJS)
|
||||
|
|
|
@ -14,16 +14,16 @@ else
|
|||
BUILTIN_ENCS = []
|
||||
end
|
||||
|
||||
DEFFILE = (true if CONFIG["DLDFLAGS"].sub!(/\s+-def:\$\(DEFFILE\)\s+/, ' '))
|
||||
|
||||
mkin = File.read(File.join($srcdir, "Makefile.in"))
|
||||
mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
|
||||
if File.exist?(depend = File.join($srcdir, "depend"))
|
||||
erb = ERB.new(File.read(depend), nil, '%')
|
||||
erb.filename = depend
|
||||
tmp = erb.result(binding)
|
||||
mkin << "\n#### depend ####\n\n" << depend_rules(tmp).join
|
||||
dep = "\n#### depend ####\n\n" << depend_rules(tmp).join
|
||||
else
|
||||
dep = ""
|
||||
end
|
||||
mkin = File.read(File.join($srcdir, "Makefile.in"))
|
||||
mkin.gsub!(/@(#{CONFIG.keys.join('|')})@/) {CONFIG[$1]}
|
||||
open(ARGV[0], 'wb') {|f|
|
||||
f.puts mkin
|
||||
f.puts mkin, dep
|
||||
}
|
||||
|
|
|
@ -160,6 +160,7 @@ else
|
|||
end
|
||||
|
||||
OUTFLAG = CONFIG['OUTFLAG']
|
||||
COUTFLAG = CONFIG['COUTFLAG']
|
||||
CPPOUTFILE = CONFIG['CPPOUTFILE']
|
||||
|
||||
CONFTEST_C = "conftest.c".freeze
|
||||
|
@ -1211,6 +1212,8 @@ LIBRUBY = #{CONFIG['LIBRUBY']}
|
|||
LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
|
||||
LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
|
||||
LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
|
||||
OUTFLAG = #{OUTFLAG}
|
||||
COUTFLAG = #{COUTFLAG}
|
||||
|
||||
RUBY_EXTCONF_H = #{$extconf_h}
|
||||
CFLAGS = #{$static ? '' : CONFIG['CCDLFLAGS']} #$CFLAGS #$ARCH_FLAG
|
||||
|
@ -1289,7 +1292,7 @@ def depend_rules(depend)
|
|||
implicit = [[m[1], m[2]], [m.post_match]]
|
||||
next
|
||||
elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
|
||||
line.gsub!(%r"(?<=\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)", &RULE_SUBST.method(:%))
|
||||
line.gsub!(%r"(?<=\s)(?![./\\])([^$(){}+=:\s,]+)(?=\s|\z)", &RULE_SUBST.method(:%))
|
||||
end
|
||||
depout << line
|
||||
end
|
||||
|
@ -1700,8 +1703,8 @@ COMMON_LIBS = config_string('COMMON_LIBS', &split) || []
|
|||
|
||||
COMPILE_RULES = config_string('COMPILE_RULES', &split) || %w[.%s.%s:]
|
||||
RULE_SUBST = config_string('RULE_SUBST')
|
||||
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<'
|
||||
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $<'
|
||||
COMPILE_C = config_string('COMPILE_C') || '$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $<'
|
||||
COMPILE_CXX = config_string('COMPILE_CXX') || '$(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $<'
|
||||
TRY_LINK = config_string('TRY_LINK') ||
|
||||
"$(CC) #{OUTFLAG}conftest $(INCFLAGS) $(CPPFLAGS) " \
|
||||
"$(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(ARCH_FLAG) $(LOCAL_LIBS) $(LIBS)"
|
||||
|
|
|
@ -132,6 +132,7 @@ RDOCTARGET = install-doc
|
|||
!endif
|
||||
|
||||
OUTFLAG = -Fe
|
||||
COUTFLAG = -Fo
|
||||
!if !defined(CFLAGS)
|
||||
CFLAGS = -MD $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||
!endif
|
||||
|
@ -439,7 +440,7 @@ s,@EXEEXT@,.exe,;t t
|
|||
s,@OBJEXT@,$(OBJEXT),;t t
|
||||
s,@XCFLAGS@,$(XCFLAGS),;t t
|
||||
s,@XLDFLAGS@,$(XLDFLAGS),;t t
|
||||
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH) -def:$$(DEFFILE) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb,;t t
|
||||
s,@DLDFLAGS@,$(DLDFLAGS) $$(LIBPATH),;t t
|
||||
s,@ARCH_FLAG@,$(ARCH_FLAG),;t t
|
||||
s,@STATIC@,$(STATIC),;t t
|
||||
s,@CCDLFLAGS@,,;t t
|
||||
|
@ -472,17 +473,18 @@ s,@SOLIBS@,$(SOLIBS),;t t
|
|||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||
s,@ENABLE_SHARED@,yes,;t t
|
||||
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||
s,@COUTFLAG@,$(COUTFLAG),;t t
|
||||
s,@CPPOUTFILE@,-P,;t t
|
||||
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
|
||||
s,@LINK_SO@,$$(LDSHARED) -Fe$$(@) $$(OBJS) $$(LIBS) $$(LOCAL_LIBS) $$(DLDFLAGS) -implib:$$(*F:.so=)-$$(arch).lib -pdb:$$(*F:.so=)-$$(arch).pdb -def:$$(DEFFILE),;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) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $$(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
||||
s,@COMPILE_RULES@,{$$(hdrdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(srcdir)}.%s{}.%s: .%s.%s:,;t t
|
||||
s,@RULE_SUBST@,{.;$$(VPATH)}%s,;t t
|
||||
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
||||
|
@ -502,11 +504,12 @@ s,@configure_args@,--with-make-prog=nmake --enable-shared $(configure_args),;t t
|
|||
s,@configure_input@,$$configure_input,;t t
|
||||
s,@srcdir@,$(srcdir),;t t
|
||||
s,@top_srcdir@,$(srcdir),;t t
|
||||
<<KEEP
|
||||
<<
|
||||
|
||||
miniruby$(EXEEXT):
|
||||
@echo. $(LIBS)
|
||||
$(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(DMYEXT) $(LIBS) -Fe$@ $(LDFLAGS)
|
||||
miniruby.exe -v
|
||||
$(LDSHARED_1)
|
||||
$(LDSHARED_2)
|
||||
|
||||
|
@ -562,24 +565,24 @@ $(RUBY_INSTALL_NAME).rc $(RUBYW_INSTALL_NAME).rc $(RUBY_SO_NAME).rc: $(RBCONFIG)
|
|||
. $(icondirs) $(srcdir)/win32
|
||||
|
||||
{$(srcdir)/enc}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/missing}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/win32}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
|
||||
{$(srcdir)/missing}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/win32}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
|
||||
.rc.res:
|
||||
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
||||
|
@ -592,4 +595,4 @@ $(OBJS): {$(hdrdir)/ruby}win32.h
|
|||
dir.$(OBJEXT) win32.$(OBJEXT): {$(srcdir)}win32/dir.h
|
||||
|
||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
|
||||
|
|
|
@ -113,6 +113,7 @@ RDOCTARGET = install-doc
|
|||
!endif
|
||||
|
||||
OUTFLAG = -Fe
|
||||
COUTFLAG = -Fo
|
||||
!if !defined(CFLAGS)
|
||||
CFLAGS = $(DEBUGFLAGS) $(OPTFLAGS) $(PROCESSOR_FLAG)
|
||||
!endif
|
||||
|
@ -426,13 +427,14 @@ s,@SOLIBS@,$(SOLIBS),;t t
|
|||
s,@DLDLIBS@,$(DLDLIBS),;t t
|
||||
s,@ENABLE_SHARED@,yes,;t t
|
||||
s,@OUTFLAG@,$(OUTFLAG),;t t
|
||||
s,@COUTFLAG@,$(COUTFLAG),;t t
|
||||
s,@CPPOUTFILE@,-P,;t t
|
||||
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
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) -c -Tc$$(<:\=/),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) -c -Tp$$(<:\=/),;t t
|
||||
s,@COMPILE_C@,$$(CC) $$(INCFLAGS) $$(CFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c -Tc$$(<:\=/),;t t
|
||||
s,@COMPILE_CXX@,$$(CXX) $$(INCFLAGS) $$(CXXFLAGS) $$(CPPFLAGS) $(COUTFLAG)$$(@) -c -Tp$$(<:\=/),;t t
|
||||
s,@COMPILE_RULES@,{$$(srcdir)}.%s{}.%s: {$$(topdir)}.%s{}.%s: {$$(hdrdir)}.%s{}.%s: .%s.%s:,;t t
|
||||
s,@RULE_SUBST@,{.;$$(srcdir);$$(topdir);$$(hdrdir)}%s,;t t
|
||||
s,@TRY_LINK@,$$(CC) -Feconftest $$(INCFLAGS) -I$$(hdrdir) $$(CPPFLAGS) $$(CFLAGS) $$(src) $$(LOCAL_LIBS) $$(LIBS) -link $$(LDFLAGS) $$(LIBPATH) $$(XLDFLAGS),;t t
|
||||
|
@ -510,28 +512,28 @@ end
|
|||
<<KEEP
|
||||
|
||||
{$(srcdir)/enc}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/missing}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/win32}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/wince}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/wince/sys}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)}.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
.c.obj:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
|
||||
{$(srcdir)/missing}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)/win32}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
{$(srcdir)}.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
.c.asm:
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa -c -Tc$(<:\=/)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fa $(COUTFLAG)$@ -c -Tc$(<:\=/)
|
||||
|
||||
.rc.res:
|
||||
$(RC) -I. -I$(<D) $(iconinc) -I$(srcdir)/win32 $(RFLAGS) -fo$@ $(<:\=/)
|
||||
|
@ -546,4 +548,4 @@ $(OBJS): {$(srcdir)}win32/win32.h
|
|||
dir.$(OBJEXT): {$(srcdir)}win32/dir.h
|
||||
|
||||
ext/extinit.obj: ext/extinit.c $(SETUP)
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) -Fo$@ -c ext/extinit.c
|
||||
$(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c
|
||||
|
|
Loading…
Reference in a new issue