2009-01-15 04:55:41 +03:00
|
|
|
YACC = bison
|
2009-02-04 20:31:44 +03:00
|
|
|
IFCHANGE = cmd /C $(srcdir)\win32\ifchange.bat
|
2009-01-15 04:55:41 +03:00
|
|
|
RM = del
|
2009-02-04 20:31:44 +03:00
|
|
|
MV = cmd /C move
|
|
|
|
VCS = svn
|
2009-01-15 04:55:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
parse.c: $(srcdir)\parse.y $(srcdir)\tool\ytab.sed
|
|
|
|
$(YACC) -d $(YFLAGS) -o y.tab.c $(<:\\=/)
|
|
|
|
sed -f $(srcdir)/tool/ytab.sed -e "/^#/s!y\.tab\.c!$@!" y.tab.c > $@.new
|
|
|
|
@$(MV) $@.new $(@)
|
|
|
|
sed -e "/^#line.*y\.tab\.h/d;/^#line.*parse\.y/d" y.tab.h > $(@:.c=.h).new
|
|
|
|
@$(IFCHANGE) $(@:.c=.h) $(@:.c=.h).new
|
|
|
|
@$(RM) y.tab.c y.tab.h
|
|
|
|
|
|
|
|
INSNS = optinsn.inc insns.inc insns_info.inc vmtc.inc vm.inc
|
|
|
|
|
|
|
|
INSNS2VMOPT = --srcdir="$(srcdir)"
|
|
|
|
|
|
|
|
$(INSNS): $(srcdir)/insns.def $(srcdir)/vm_opts.h $(srcdir)/defs/opt_operand.def $(srcdir)/defs/opt_insn_unif.def
|
|
|
|
$(BASERUBY) -Ks $(srcdir)/tool/insns2vm.rb $(INSNS2VMOPT) $@
|
|
|
|
|
|
|
|
minsns.inc: $(srcdir)/template/minsns.inc.tmpl
|
|
|
|
|
|
|
|
opt_sc.inc: $(srcdir)/template/opt_sc.inc.tmpl
|
|
|
|
|
|
|
|
optinsn.inc: $(srcdir)/template/optinsn.inc.tmpl
|
|
|
|
|
|
|
|
optunifs.inc: $(srcdir)/template/optunifs.inc.tmpl
|
|
|
|
|
|
|
|
insns.inc: $(srcdir)/template/insns.inc.tmpl
|
|
|
|
|
|
|
|
insns_info.inc: $(srcdir)/template/insns_info.inc.tmpl
|
|
|
|
|
|
|
|
vmtc.inc: $(srcdir)/template/vmtc.inc.tmpl
|
|
|
|
|
|
|
|
vm.inc: $(srcdir)/template/vm.inc.tmpl
|
|
|
|
|
2009-09-13 21:37:14 +04:00
|
|
|
$(srcdir)/id.h: parse.h $(srcdir)/tool/generic_erb.rb $(srcdir)/template/id.h.tmpl
|
|
|
|
$(BASERUBY) $(srcdir)/tool/generic_erb.rb --output=$@ $(srcdir)/template/id.h.tmpl parse.h
|
|
|
|
|
2009-01-15 04:55:41 +03:00
|
|
|
node_name.inc: $(srcdir)/node.h
|
|
|
|
$(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@
|
|
|
|
|
|
|
|
known_errors.inc: $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
|
|
|
|
$(BASERUBY) $(srcdir)/tool/generic_erb.rb -c -o $@ $(srcdir)/template/known_errors.inc.tmpl $(srcdir)/defs/known_errors.def
|
|
|
|
|
|
|
|
newline.c:
|
|
|
|
$(BASERUBY) "$(srcdir)/tool/transcode-tblgen.rb" -vo newline.c $(srcdir)/enc/trans/newline.trans
|
|
|
|
|
|
|
|
miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb
|
|
|
|
$(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@
|
|
|
|
|
2009-02-04 20:31:44 +03:00
|
|
|
$(srcdir)/ext/socket/constants.h: $(srcdir)/ext/socket/mkconstants.rb
|
|
|
|
$(BASERUBY) $(srcdir)/ext/socket/mkconstants.rb >$@
|
|
|
|
|
2009-01-15 04:55:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
$(srcdir)/revision.h: $(srcdir)/version.h $(srcdir)/ChangeLog
|
|
|
|
@set LC_MESSAGES=C
|
|
|
|
-@$(SET_LC_MESSAGES) $(VCS) info "$(@D)" | \
|
|
|
|
sed -n "s/.*Rev:/#define RUBY_REVISION/p" > "$@.tmp"
|
|
|
|
@$(IFCHANGE) "$@" "$@.tmp"
|
|
|
|
|
|
|
|
incs: $(srcdir)/revision.h $(INSNS) node_name.inc known_errors.inc
|
|
|
|
|
2009-09-13 21:37:14 +04:00
|
|
|
ids: $(srcdir)/id.h
|
|
|
|
|
2009-01-15 04:55:41 +03:00
|
|
|
srcs: parse.c newline.c lex.c miniprelude.c
|
|
|
|
|
|
|
|
lex.c: $(srcdir)\lex.c.blt
|
|
|
|
copy $(?:/=\) $@
|
|
|
|
|
2009-02-04 20:31:44 +03:00
|
|
|
socket_const: $(srcdir)/ext/socket/constants.h
|
|
|
|
|
2009-09-13 21:37:14 +04:00
|
|
|
MAKMAKE: incs srcs ids socket_const
|
2009-01-15 04:55:41 +03:00
|
|
|
|
|
|
|
CLEAN :
|
2009-02-04 20:31:44 +03:00
|
|
|
del $(INSNS) node_name.inc known_errors.inc
|
2009-09-13 21:37:14 +04:00
|
|
|
$(RM) parse.c parse.h newline.c lex.c miniprelude.c $(srcdir)\revision.h $(srcdir)\id.h
|
2009-01-15 04:55:41 +03:00
|
|
|
|
|
|
|
BLD LIB CLEANLIB RESOURCE FREEZE SAVESPACE RELEASABLES FINAL :
|
|
|
|
|