(Answer) (Category) CGEN Faq-O-Matic :
How does one regenerate the CGEN-related parts of a toolchain?
When a target needs a change applied to its .cpu or .opc files, or cgen's
own .scm files, cgen must be rerun in order to propagate the changes to the
generated files elsewhere.

While some dependencies are recorded in the Makefiles, most or all are
approximate and incomplete (e.g., including only the .cpu file but not .opc;
including some .scm files of cgen itself but not all).  The safest way is to
regenerate cgen stuff by hand.  The problem is remembering what each build
directory's regeneration make target is:

opcodes:                         make stamp-TARGET
sim/TARGET:                      make stamp-arch stamp-cpu stamp-desc
sid/component/cgen-cpu/TARGET:   make cgen-all   

cgen puts the modified files back in the source tree.  When committing a
change to cgen inputs, one should commit the changes to regenerated files also.
Before you execute these 'make ...' commands your build tree
has to be built. Otherwise you'll get errors like:

make: *** No rule to make target `../cgen/stamp-cgen', needed by `stamp-vpe4k'.
[Append to This Answer]
Previous: (Answer) How does one build and run cgen?
Next: (Category) To-do items
This document is: http://sourceware.org/fom/cgen?file=7
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
This FAQ administered by ...