From 11075c9332204eb7a722e36e740c19967b6cdfa0 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Mar 2009 02:52:21 +0000 Subject: [PATCH] * win32/Makefile.sub (make_insns_rules): rule to make rules for insns. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ Makefile.in | 3 +++ common.mk | 20 ++++++++------------ win32/Makefile.sub | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0f06085fb7..2bd5d9f86a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Mar 5 11:52:16 2009 Nobuyoshi Nakada + + * win32/Makefile.sub (make_insns_rules): rule to make rules for insns. + Thu Mar 5 11:27:16 2009 Nobuyoshi Nakada * win32/Makefile.sub (miniruby.exe): workaround for a failure of diff --git a/Makefile.in b/Makefile.in index df43ca22fe..eaa9f9749f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -271,3 +271,6 @@ update-rubyspec: test-rubyspec: @if [ ! -d $(srcdir)/spec/rubyspec ]; then echo No rubyspec here. make update-rubyspec first.; exit 1; fi $(RUNRUBY) $(srcdir)/spec/mspec/bin/mspec -B $(srcdir)/spec/default.mspec $(MSPECOPT) + +$(INSNS): $(srcdir)/insns.def vm_opts.h $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def + $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@ diff --git a/common.mk b/common.mk index 0c06ee548a..f64bc7f821 100644 --- a/common.mk +++ b/common.mk @@ -637,25 +637,21 @@ INSNS2VMOPT = --srcdir="$(srcdir)" INSNS = opt_sc.inc optinsn.inc optunifs.inc insns.inc insns_info.inc \ vmtc.inc vm.inc -$(INSNS): $(srcdir)/insns.def {$(VPATH)}vm_opts.h $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def - @$(RM) $(PROGRAM) - $(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@ +{$(VPATH)}minsns.inc: $(srcdir)/template/minsns.inc.tmpl -minsns.inc: $(srcdir)/template/minsns.inc.tmpl +{$(VPATH)}opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl -opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl +{$(VPATH)}optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl -optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl +{$(VPATH)}optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl -optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl +{$(VPATH)}insns.inc: $(srcdir)/template/insns.inc.tmpl -insns.inc: $(srcdir)/template/insns.inc.tmpl +{$(VPATH)}insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl -insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl +{$(VPATH)}vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl -vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl - -vm.inc: $(srcdir)/template/vm.inc.tmpl +{$(VPATH)}vm.inc: $(srcdir)/template/vm.inc.tmpl srcs: {$(VPATH)}parse.c {$(VPATH)}lex.c {$(VPATH)}newline.c $(srcdir)/ext/ripper/ripper.c srcs-enc diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 0512df4308..a876ab2d72 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -810,3 +810,19 @@ dir.$(OBJEXT) win32.$(OBJEXT): {$(srcdir)}win32/dir.h ext/extinit.obj: ext/extinit.c $(SETUP) $(CC) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(COUTFLAG)$@ -c ext/extinit.c + +!ifdef insns +make_insns_rules: + @type << +$(insns): $$(srcdir)/insns.def {$$(VPATH)}vm_opts.h $$(srcdir)/defs/opt_operand.def $$(srcdir)/defs/opt_insn_unif.def + @$$(RM) $$(PROGRAM) + $$(BASERUBY) -Ks $$(srcdir)/tool/insns2vm.rb $$(INSNS2VMOPT) $(insns) + +<< +!else if [exit > insns_rules.mk] +!else if [for %I in ($(INSNS)) do @$(MAKE) -l insns=%I make_insns_rules >> insns_rules.mk] +!else +! include insns_rules.mk +! if [del insns_rules.mk > nul] +! endif +!endif