[nolimips: 134,135] Include nodes.mk

To avoid svn failure, I suggest you to remove src/inst/Makefile.am before to `svn update'. `bootstrap' must also be launch to create `nodes.mk' for the first time. Index: ChangeLog from Benoît Perrot <benoit@lrde.epita.fr> * dev/inst-nodes-mk-gen.py: Split into... * src/inst/Makefile.am: This file. * bootstrap: Ask for nodes.mk generation. 2004-10-03 Benoît Perrot <benoit@lrde.epita.fr> Index: src/inst/Makefile.am --- src/inst/Makefile.am (revision 0) +++ src/inst/Makefile.am (revision 134) @@ -0,0 +1,59 @@ +include $(srcdir)/nodes.mk + +INCLUDES = -I $(top_srcdir)/src -I $(top_builddir)/src + +BUILT_SOURCES = \ + $(FROM_INST_NODES_GEN_PY) inst-nodes-gen.stamp \ + program_builder.hh inst-builder-gen.stamp \ + program_solver.hh program_solver.cc inst-solver-gen.stamp + +# This code comes from "Handling Tools that Produce Many Outputs", +# from the Automake documentation. + +nodes.mk: $(top_srcdir)/dev/inst-nodes-mk-gen.py $(top_srcdir)/dev/nolimips.xml + $(top_srcdir)/dev/inst-nodes-mk-gen.py < $(top_srcdir)/dev/nolimips.xml >$@.tmp + mv -f $@.tmp $@ + +inst-nodes-gen.stamp: $(top_srcdir)/dev/inst-nodes-gen.py $(top_srcdir)/dev/nolimips.xml + @rm -rf $@.tmp + @touch $@.tmp + $(top_srcdir)/dev/inst-nodes-gen.py < $(top_srcdir)/dev/nolimips.xml + @mv -f $@.tmp $@ +$(FROM_INST_NODES_GEN_PY): inst-nodes-gen.stamp + +inst-builder-gen.stamp: $(top_srcdir)/dev/inst-builder-gen.py $(top_srcdir)/dev/nolimips.xml + @rm -rf $@.tmp + @touch $@.tmp + $(top_srcdir)/dev/inst-builder-gen.py < $(top_srcdir)/dev/nolimips.xml + @mv -f $@.tmp $@ +program_builder.hh: inst-builder-gen.stamp + +inst-solver-gen.stamp: $(top_srcdir)/dev/inst-solver-gen.py $(top_srcdir)/dev/nolimips.xml + @rm -rf $@.tmp + @touch $@.tmp + $(top_srcdir)/dev/inst-solver-gen.py < $(top_srcdir)/dev/nolimips.xml + @mv -f $@.tmp $@ +program_solver.hh program_solver.cc: inst-solver-gen.stamp + + +MAINTAINERCLEANFILES = \ + $(FROM_INST_NODES_GEN_PY) \ + program_builder.hh \ + program_solver.hh program_solver.cc + +noinst_LIBRARIES = libinst.a +libinst_a_SOURCES = \ + $(FROM_INST_NODES_GEN_PY) inst-nodes-gen.stamp \ + register.hh \ + exp.hh exp.cc \ + exp-visitor.hh \ + inst.hh \ + program.hh \ + label.hh label.cc \ + section.hh \ + text_section.hh text_section.cc \ + data_section.hh data_section.cc \ + program.hh \ + program_builder.hh program_builder.cc inst-builder-gen.stamp \ + program_solver.hh program_solver.cc inst-solver-gen.stamp \ + inst-tasks.hh inst-tasks.cc Index: bootstrap --- bootstrap (revision 133) +++ bootstrap (working copy) @@ -1,4 +1,4 @@ #!/bin/sh -cd src/inst && ../../dev/inst-nodes-mk-gen.py < ../../dev/nolimips.xml && cd - +cd src/inst && ../../dev/inst-nodes-mk-gen.py < ../../dev/nolimips.xml > nodes.mk && cd - autoreconf -f -v -i -m Index: dev/inst-nodes-mk-gen.py --- dev/inst-nodes-mk-gen.py (revision 133) +++ dev/inst-nodes-mk-gen.py (working copy) @@ -29,11 +29,7 @@ parser = nolimips.InstructionSetParser() instructions = parser.parse(sys.stdin) -sys.stdout = file("Makefile.am.tmp", "w") - -print """INCLUDES = -I $(top_srcdir)/src -I $(top_builddir)/src - -FROM_INST_NODES_GEN_PY = \\""" +print "FROM_INST_NODES_GEN_PY = \\" for i in range(0, len(instructions)): if instructions[i].level == "native": line = "\t" @@ -43,62 +39,3 @@ print """ decl.hh \\ all.hh \\ visitor.hh""" - -print """ -BUILT_SOURCES = \\ - $(FROM_INST_NODES_GEN_PY) inst-nodes-gen.stamp \\ - program_builder.hh inst-builder-gen.stamp \\ - program_solver.hh program_solver.cc inst-solver-gen.stamp - -# This code comes from \"Handling Tools that Produce Many Outputs\", -# from the Automake documentation. - -inst-nodes-gen.stamp: $(top_srcdir)/dev/inst-nodes-gen.py $(top_srcdir)/dev/nolimips.xml - @rm -rf $@.tmp - @touch $@.tmp - $(top_srcdir)/dev/inst-nodes-gen.py < $(top_srcdir)/dev/nolimips.xml - @mv -f $@.tmp $@ -$(FROM_INST_NODES_GEN_PY): inst-nodes-gen.stamp - -inst-builder-gen.stamp: $(top_srcdir)/dev/inst-builder-gen.py $(top_srcdir)/dev/nolimips.xml - @rm -rf $@.tmp - @touch $@.tmp - $(top_srcdir)/dev/inst-builder-gen.py < $(top_srcdir)/dev/nolimips.xml - @mv -f $@.tmp $@ -program_builder.hh: inst-builder-gen.stamp - -inst-solver-gen.stamp: $(top_srcdir)/dev/inst-solver-gen.py $(top_srcdir)/dev/nolimips.xml - @rm -rf $@.tmp - @touch $@.tmp - $(top_srcdir)/dev/inst-solver-gen.py < $(top_srcdir)/dev/nolimips.xml - @mv -f $@.tmp $@ -program_solver.hh program_solver.cc: inst-solver-gen.stamp - - -MAINTAINERCLEANFILES = \\ - $(FROM_INST_NODES_GEN_PY) \\ - program_builder.hh \\ - program_solver.hh program_solver.cc - -noinst_LIBRARIES = libinst.a -libinst_a_SOURCES = \\ - $(FROM_INST_NODES_GEN_PY) inst-nodes-gen.stamp \\ - register.hh \\ - exp.hh exp.cc \\ - exp-visitor.hh \\ - inst.hh \\ - program.hh \\ - label.hh label.cc \\ - section.hh \\ - text_section.hh text_section.cc \\ - data_section.hh data_section.cc \\ - program.hh \\ - program_builder.hh program_builder.cc inst-builder-gen.stamp \\ - program_solver.hh program_solver.cc inst-solver-gen.stamp \\ - inst-tasks.hh inst-tasks.cc""" - -## Epilogue -sys.stdout.close() -sys.stdout = sys.__stdout__ -nolimips.lazy_overwrite("Makefile.am", "Makefile.am.tmp") -os.remove("Makefile.am.tmp")
participants (1)
-
Noe