diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-02 02:18:53 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-02 02:22:07 -0500 |
commit | b22ee0e49ba2bac8a5295f0426c62e9bd2b311a1 (patch) | |
tree | 54a46a7ce8e0adc76a6676c392feeae772d36394 /sim/ppc | |
parent | 10f554512f768ce4af44fcdc82bb48356025c363 (diff) | |
download | gdb-b22ee0e49ba2bac8a5295f0426c62e9bd2b311a1.zip gdb-b22ee0e49ba2bac8a5295f0426c62e9bd2b311a1.tar.gz gdb-b22ee0e49ba2bac8a5295f0426c62e9bd2b311a1.tar.bz2 |
sim: ppc: hoist pk.h creation to top-level
Diffstat (limited to 'sim/ppc')
-rw-r--r-- | sim/ppc/Makefile.in | 37 | ||||
-rw-r--r-- | sim/ppc/local.mk | 24 | ||||
-rw-r--r-- | sim/ppc/pk.h | 2 |
3 files changed, 30 insertions, 33 deletions
diff --git a/sim/ppc/Makefile.in b/sim/ppc/Makefile.in index ed3185f..68be555 100644 --- a/sim/ppc/Makefile.in +++ b/sim/ppc/Makefile.in @@ -361,12 +361,6 @@ INLINE = \ inline.h \ inline.c -BUILT_SRC_WO_CONFIG = \ - pk.h - -BUILT_SRC = \ - $(BUILT_SRC_WO_CONFIG) - LIB_INLINE_SRC = \ psim.c \ bits.c \ @@ -483,7 +477,7 @@ interrupts.o: interrupts.c $(CPU_H) $(IDECODE_H) $(OS_EMUL_H) # Given that inlines are turned on now, rebuild idecode whenever # anything changes. -idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) $(BUILT_SRC) +idecode.o: idecode.c $(CPU_H) $(IDECODE_H) $(SEMANTICS_H) $(LIB_INLINE_SRC) # double.o: double.c dp-bit.c @@ -525,7 +519,7 @@ sim-fpu.o: $(srcdir)/../common/sim-fpu.c $(ECHO_CC) $(CC) -c $(STD_CFLAGS) -DHAVE_CONFIG_H $(srcdir)/../common/sim-fpu.c # Rebuild options whenever something changes so the date/time is up to date. -options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) $(BUILT_SRC) ../config.status Makefile +options.o: options.c $(CPU_H) $(OPTIONS_H) $(DEFINES_H) $(BASICS_H) $(IDECODE_H) $(INLINE) $(LIB_SRC) ../config.status Makefile $(ECHO_CC) $(CC) -c $(STD_CFLAGS) '-DOPCODE_RULES="@sim_ppc_opcode@"' '-DIGEN_FLAGS="$(ppc_IGEN_FLAGS)"' $(srcdir)/options.c hw_cpu.o: hw_cpu.c $(DEVICE_TABLE_H) $(HW_CPU_H) $(INTERRUPTS_H) $(CPU_H) @@ -552,27 +546,6 @@ hw_vm.o: hw_vm.c $(DEVICE_TABLE_H) $(CPU_H) -# real packages -$(srcdir)/pk.h: $(MAINT) tmp-pk - @true -tmp-pk: $(srcdir)/Makefile.in $(PACKAGE_SRC) $(srcroot)/move-if-change - $(ECHO_GEN)# The first for loop is to remove duplicates. - $(SILENCE) echo "/* Generated file by Makefile.in; do not edit. */" > tmp-pk.h; \ - f=""; \ - for i in $(PACKAGE_SRC) ; do \ - case " $$f " in \ - *" $$i "*) ;; \ - *) f="$$f $$i" ;; \ - esac ; \ - done ; \ - for pk in $$f ; do echo $$pk ; done \ - | sed -e 's/^.*pk_\(.*\)\.c/\1/' \ - -e 's/^/extern package_create_instance_callback pk_/' \ - -e 's/$$/_create_instance;/' \ - >> tmp-pk.h - $(SILENCE) $(SHELL) $(srcroot)/move-if-change tmp-pk.h $(srcdir)/pk.h - $(SILENCE) touch $@ - pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H) # ignore this line, it stops make from getting confused @@ -580,11 +553,11 @@ pk_disklabel.o: pk_disklabel.c $(DEVICE_TABLE_H) $(PK_H) tags etags: TAGS -TAGS: $(BUILT_SRC) - etags $(srcdir)/*.h $(srcdir)/*.c $(BUILT_SRC) +TAGS: + etags $(srcdir)/*.h $(srcdir)/*.c clean mostlyclean: - rm -f tmp-* *.[oasi] core $(BUILT_SRC_WO_CONFIG) + rm -f tmp-* *.[oasi] core distclean realclean: clean rm -f TAGS Makefile diff --git a/sim/ppc/local.mk b/sim/ppc/local.mk index 7d4ea35..155d83a 100644 --- a/sim/ppc/local.mk +++ b/sim/ppc/local.mk @@ -220,5 +220,29 @@ BUILT_SOURCES += \ SIM_ALL_RECURSIVE_DEPS += %D%/stamp-hw %D%/hw.c %D%/hw.h: %D%/stamp-igen +## Real packages +## NB: The first for loop is to remove duplicates. +%C%_PACKAGE_SRC = %D%/pk_disklabel.c +$(srcdir)/%D%/pk.h: @MAINT@ %D%/stamp-pk ; @true +%D%/stamp-pk: $(srcdir)/%D%/Makefile.in $(%C%_PACKAGE_SRC) $(srcroot)/move-if-change + $(AM_V_GEN)echo "/* Generated file by local.mk; do not edit. */" > %D%/pk.hin; \ + f=""; \ + for i in $(%C%_PACKAGE_SRC) ; do \ + case " $$f " in \ + *" $$i "*) ;; \ + *) f="$$f $$i" ;; \ + esac ; \ + done ; \ + for pk in $$f ; do echo $$pk ; done \ + | sed -e 's/^.*pk_\(.*\)\.c/\1/' \ + -e 's/^/extern package_create_instance_callback pk_/' \ + -e 's/$$/_create_instance;/' \ + >> %D%/pk.hin + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/pk.hin $(srcdir)/%D%/pk.h + $(AM_V_at)touch $@ + +%C%_BUILD_OUTPUTS += %D%/stamp-pk +SIM_ALL_RECURSIVE_DEPS += %D%/stamp-pk + %C%docdir = $(docdir)/%C% %C%doc_DATA = %D%/BUGS %D%/INSTALL %D%/README %D%/RUN diff --git a/sim/ppc/pk.h b/sim/ppc/pk.h index 92e49e9..2a67204 100644 --- a/sim/ppc/pk.h +++ b/sim/ppc/pk.h @@ -1,2 +1,2 @@ -/* Generated file by Makefile.in; do not edit. */ +/* Generated file by local.mk; do not edit. */ extern package_create_instance_callback pk_disklabel_create_instance; |