(desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
(html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
* Makefile.in: Regenerate.
+2003-09-11 Doug Evans <dje@sebabeach.org>
+
+ * Makefile.am (ARCHFILE): New var.
+ (desc): Pass $(ARCHFILE) for -a parm, not $(ARCH).
+ (html,opcodes,sim-arch,sim-cpu,gas-test,sim-test): Ditto.
+ * Makefile.in: Regenerate.
+
2003-09-08 Dave Brolley <brolley@redhat.com>
On behalf of Doug Evans <dje@sebabeach.org>
GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
ARCH = @arch@
+ARCHFILE = $(srcroot)/../cpu/$(ARCH).cpu
# for various utility rules
MACHS = all
# though most of these are for development purposes only.
# When actually building the toolchain, the Makefile in the appropriate
# directory will run cgen.
+#
+# NOTE: If running for a cpu other than the configured one you may wish to
+# override ISAS and MACHS.
# Build the basic description support.
# We just stuff them in tmp-* files.
-# Usage: make desc ARCH=<arch> OPTIONS="<option list>"
+# Usage: make desc [ARCHFILE=<arch-file>] OPTIONS="<option list>"
.PHONY: desc
# FIXME: needs more dependencies
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-H tmp-desc.h -C tmp-desc.c
+# Build the machine generated cpu documentation.
+# Usage: make html [ARCH=<arch>] [ARCHFILE=<arch-file>]
.PHONY: html
html: desc.scm html.scm cgen-doc.scm
rm -f tmp-doc.html
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-N $(INSN_FILE_NAME) \
# Build the opcodes files.
# We just stuff them in tmp-* files.
-# Usage: make opcodes ARCH=<arch> OPTIONS="<option list>"
+# Usage: make opcodes [ARCHFILE=<arch-file>] OPTIONS="<option list>"
.PHONY: opcodes
# FIXME: needs more dependencies
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS) opinst" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-O tmp-opc.h -P tmp-opc.c -Q tmp-opinst.c \
# Build the simulator files.
# We just stuff them in tmp-* files.
-# Usage: make sim-arch ARCH=<arch> OPTIONS="<option list>"
-# make sim-cpu ARCH=<arch> ISAS="<isa>" MACHS="<mach list>" \
+# Usage: make sim-arch [ARCHFILE=<arch-file>] OPTIONS="<option list>"
+# make sim-cpu [ARCHFILE=<arch-file>] ISAS="<isa>" MACHS="<mach list>" \
# OPTIONS="<option list>"
.PHONY: sim-arch sim-cpu
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-A tmp-arch.h -B tmp-arch.c -N tmp-cpuall.h
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-C tmp-cpu.h -U tmp-cpu.c \
-S tmp-semantics.c -X tmp-sem-switch.c
# Build GAS testcase generator.
+# Usage: make gas-test [ARCHFILE=<arch-file>]
.PHONY: gas-test
gas-test: gas-test.scm cgen-gas.scm
$(GUILE) -s $(srcdir)/cgen-gas.scm \
-s $(srcdir) \
$(CGENFLAGS) \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-B gas-build.sh \
-E gas-allinsn.exp
# Build simulator testcase generator.
+# Usage: make sim-test [ARCHFILE=<arch-file>]
.PHONY: sim-test
sim-test: sim-test.scm cgen-stest.scm
$(GUILE) -s $(srcdir)/cgen-stest.scm \
-s $(srcdir) \
$(CGENFLAGS) \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-B sim-build.sh \
GUILE = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
ARCH = @arch@
+ARCHFILE = $(srcroot)/../cpu/$(ARCH).cpu
# for various utility rules
MACHS = all
@for file in $(DISTFILES); do \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
- cp -pr $$d/$$file $(distdir)/$$file; \
+ cp -pr $$/$$file $(distdir)/$$file; \
else \
test -f $(distdir)/$$file \
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
# though most of these are for development purposes only.
# When actually building the toolchain, the Makefile in the appropriate
# directory will run cgen.
+#
+# NOTE: If running for a cpu other than the configured one you may wish to
+# override ISAS and MACHS.
# Build the basic description support.
# We just stuff them in tmp-* files.
-# Usage: make desc ARCH=<arch> OPTIONS="<option list>"
+# Usage: make desc [ARCHFILE=<arch-file>] OPTIONS="<option list>"
.PHONY: desc
# FIXME: needs more dependencies
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-H tmp-desc.h -C tmp-desc.c
+# Build the machine generated cpu documentation.
+# Usage: make html [ARCH=<arch>] [ARCHFILE=<arch-file>]
.PHONY: html
html: desc.scm html.scm cgen-doc.scm
rm -f tmp-doc.html
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-N $(INSN_FILE_NAME) \
# Build the opcodes files.
# We just stuff them in tmp-* files.
-# Usage: make opcodes ARCH=<arch> OPTIONS="<option list>"
+# Usage: make opcodes [ARCHFILE=<arch-file>] OPTIONS="<option list>"
.PHONY: opcodes
# FIXME: needs more dependencies
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS) opinst" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-O tmp-opc.h -P tmp-opc.c -Q tmp-opinst.c \
# Build the simulator files.
# We just stuff them in tmp-* files.
-# Usage: make sim-arch ARCH=<arch> OPTIONS="<option list>"
-# make sim-cpu ARCH=<arch> ISAS="<isa>" MACHS="<mach list>" \
+# Usage: make sim-arch [ARCHFILE=<arch-file>] OPTIONS="<option list>"
+# make sim-cpu [ARCHFILE=<arch-file>] ISAS="<isa>" MACHS="<mach list>" \
# OPTIONS="<option list>"
.PHONY: sim-arch sim-cpu
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-A tmp-arch.h -B tmp-arch.c -N tmp-cpuall.h
-s $(srcdir) \
$(CGENFLAGS) \
-f "$(OPTIONS)" \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-C tmp-cpu.h -U tmp-cpu.c \
-S tmp-semantics.c -X tmp-sem-switch.c
# Build GAS testcase generator.
+# Usage: make gas-test [ARCHFILE=<arch-file>]
.PHONY: gas-test
gas-test: gas-test.scm cgen-gas.scm
$(GUILE) -s $(srcdir)/cgen-gas.scm \
-s $(srcdir) \
$(CGENFLAGS) \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-B gas-build.sh \
-E gas-allinsn.exp
# Build simulator testcase generator.
+# Usage: make sim-test [ARCHFILE=<arch-file>]
.PHONY: sim-test
sim-test: sim-test.scm cgen-stest.scm
$(GUILE) -s $(srcdir)/cgen-stest.scm \
-s $(srcdir) \
$(CGENFLAGS) \
- -a $(ARCH) \
+ -a $(ARCHFILE) \
-i "$(ISAS)" \
-m "$(MACHS)" \
-B sim-build.sh \