# HG changeset patch # User Michael Pavone # Date 1739516936 28800 # Node ID b63059c1921c985e8ec515eee76d67d82ae4d3cc # Parent c768bbd912f1cc87505be900961df34cc2e29d45 Use grouped targets to specify that CPU dsl rules produce both .c and .h files diff -r c768bbd912f1 -r b63059c1921c Makefile --- a/Makefile Thu Feb 13 23:07:31 2025 -0800 +++ b/Makefile Thu Feb 13 23:08:56 2025 -0800 @@ -372,12 +372,12 @@ vos_prog_info : $(OBJDIR)/vos_prog_info.o $(OBJDIR)/vos_program_module.o $(CC) -o $@ $^ $(OPT) -m68k.c : m68k.cpu cpu_dsl.py - ./cpu_dsl.py -d call $< > $@ +m68k.c m68k.h &: m68k.cpu cpu_dsl.py + ./cpu_dsl.py -d call $< > m68k.c .PRECIOUS: %.c -%.c : %.cpu cpu_dsl.py - ./cpu_dsl.py -d $(Z80_DISPATCH) $< > $@ +%.c %.h &: %.cpu cpu_dsl.py + ./cpu_dsl.py -d $(Z80_DISPATCH) $< > $(shell echo $@ | sed -E 's/\.[ch]$$/./')c %.db.c : %.db sed $< -e 's/"/\\"/g' -e 's/^\(.*\)$$/"\1\\n"/' -e'1s/^\(.*\)$$/const char $(shell echo $< | tr '.' '_')_data[] = \1/' -e '$$s/^\(.*\)$$/\1;/' > $@