#
# Usage: /bin/sh cgen.sh {"arch"|"cpu"|"decode"|"defs"|"cpu-decode"} \
# srcdir cgen cgendir cgenflags \
-# arch archflags cpu mach suffix extrafiles
+# arch archflags cpu mach suffix archfile extrafiles
#
# We store the generated files in the source directory until we decide to
# ship a Scheme interpreter (or other implementation) with gdb/binutils.
# portably bring parameters beyond $9 into view
shift ; mach=$9
shift ; suffix=$9
+shift ; archfile=$9
shift ; extrafiles=$9
rootdir=${srcdir}/../..
${cgenflags} \
-f "${archflags}" \
-m ${mach} \
- -a ${arch} \
+ -a ${archfile} \
-i ${isa} \
-A tmp-arch.h1 \
-B tmp-arch.c1 \
${cgenflags} \
-f "${archflags}" \
-m ${mach} \
- -a ${arch} \
+ -a ${archfile} \
-i ${isa} \
${fileopts}
${cgenflags} \
-f "${archflags}" \
-m ${mach} \
- -a ${arch} \
+ -a ${archfile} \
-i ${isa} \
-G tmp-defs.h1
sed $sedscript < tmp-defs.h1 > tmp-defs.h
${cgenflags} \
-f "${archflags}" \
-m ${mach} \
- -a ${arch} \
+ -a ${archfile} \
-i ${isa} \
-H tmp-desc.h1 \
-C tmp-desc.c1 \