[RFC] add regenerate Makefile target
Simon Marchi
simark@simark.ca
Sat Mar 16 17:30:34 GMT 2024
On 2024-03-15 10:25, Tom Tromey wrote:
> gdb used to use a mish-mash of different approaches, some quite strange,
> but over the last few years we standardized on Python scripts that
> generate files. They're written to be seamless -- just invoke in the
> source dir; the output is then just part of your patch. No special
> configure options are needed. On the whole this has been a big
> improvement.
The two that come in mind for gdb are (there are more but I don't know
them):
- gdb/gdbarch.py
- gdb/make-target-delegates.py
gdbarch.py used to be a shell script, but moving it to Python made it
much faster, easier to maintain (as in change how gdbarch hooks are
generated) and easier to update (as in modifying the gdbarch hook list).
Now, a wishlist I have for generated files (I might do that one day):
- Make all generated files (regardless of if they are checked in the
repo or not) end with the -gen suffix (like gdbarch-gen.h), so it's
easier to know that a file is generated.
- make all generator tools have the same name pattern (e.g.
make-gdbarch.py, make-target-delegates.py, make-init-c.sh, etc).
Simon
More information about the Gdb
mailing list