diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-14 20:38:52 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-15 17:06:46 -0400 |
commit | 015f7b7462391fdaa9320bbbba0fc34487909e1a (patch) | |
tree | 78d1ae003bd5152c3e59d10f7413eb60767c2097 | |
parent | 6645c8ce71cc9709dcaee1ea42686d20075ad88b (diff) | |
download | gdb-015f7b7462391fdaa9320bbbba0fc34487909e1a.zip gdb-015f7b7462391fdaa9320bbbba0fc34487909e1a.tar.gz gdb-015f7b7462391fdaa9320bbbba0fc34487909e1a.tar.bz2 |
sim: switch modules.c & version.c to stamp files
This fixes remaking of these files and avoids unnecessary rebuilds.
Also add both to `make clean` to match other stamp files.
-rw-r--r-- | sim/ChangeLog | 4 | ||||
-rw-r--r-- | sim/Makefile.in | 8 | ||||
-rw-r--r-- | sim/common/ChangeLog | 7 | ||||
-rw-r--r-- | sim/common/Make-common.in | 6 | ||||
-rw-r--r-- | sim/common/local.mk | 8 |
5 files changed, 26 insertions, 7 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog index 8df4fde..79e9656 100644 --- a/sim/ChangeLog +++ b/sim/ChangeLog @@ -1,3 +1,7 @@ +2021-06-15 Mike Frysinger <vapier@gentoo.org> + + * Makefile.in: Regenerate. + 2021-06-14 Mike Frysinger <vapier@gentoo.org> * configure.ac: Call AM_SILENT_RULES. diff --git a/sim/Makefile.in b/sim/Makefile.in index b5a2c26..3ba80a4 100644 --- a/sim/Makefile.in +++ b/sim/Makefile.in @@ -730,7 +730,8 @@ AM_MAKEFLAGS = SIM_PRIMARY_TARGET=$(SIM_PRIMARY_TARGET) # NB: libcommon.a isn't used directly by ports. We need a target for common # objects to be a part of, and ports use the individual objects directly. noinst_LIBRARIES = common/libcommon.a $(am__append_2) -CLEANFILES = testsuite/common/bits-gen testsuite/common/bits32m0.c \ +CLEANFILES = common/version.c common/version.c-stamp \ + testsuite/common/bits-gen testsuite/common/bits32m0.c \ testsuite/common/bits32m31.c testsuite/common/bits64m0.c \ testsuite/common/bits64m63.c DISTCLEANFILES = @@ -1584,9 +1585,10 @@ nltvals: $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot) $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def -common/version.c: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/common/create-version.sh +common/version.c: common/version.c-stamp ; @true +common/version.c-stamp: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/common/create-version.sh $(AM_V_GEN)$(SHELL) $(srcdir)/common/create-version.sh $(srcroot)/gdb $@.tmp - $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=) $(AM_V_at)touch $@ # Alias for developers. diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 14914dc..7e21703 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,3 +1,10 @@ +2021-06-15 Mike Frysinger <vapier@gentoo.org> + + * Make-common.in: Add stamp-modules rule to avoid rebuilds. + (clean): Delete modules.c files. + * local.mk: Add version.c-stamp rule to avoid rebuilds. + (CLEANFILES): Add version.c files. + 2021-06-14 Mike Frysinger <vapier@gentoo.org> * local.mk (%D%/version.c): Use AM_V_GEN & AM_V_at wrappers. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 3dab9ca..12fb233 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -465,7 +465,8 @@ test-hw-events: $(srccom)/hw-events.c libsim.a $(srccom)/hw-events.c libsim.a $(EXTRA_LIBS) # See sim_pre_argv_init and sim_module_install in sim-module.c for more details. -modules.c: Makefile $(SIM_OBJS:.o=.c) +modules.c: stamp-modules ; @true +stamp-modules: Makefile $(SIM_OBJS:.o=.c) @echo Generating $@ @LANG=C ; export LANG ; \ LC_ALL=C ; export LC_ALL ; \ @@ -481,7 +482,7 @@ modules.c: Makefile $(SIM_OBJS:.o=.c) echo '};'; \ echo 'const int sim_modules_detected_len = ARRAY_SIZE (sim_modules_detected);'; \ ) >$@.tmp - $(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(SHELL) $(srcroot)/move-if-change $@.tmp modules.c @rm -f $@.l-tmp $@.tmp touch $@ @@ -543,6 +544,7 @@ mostlyclean clean: $(SIM_EXTRA_CLEAN) rm -f *.[oa] *~ core rm -f run$(EXEEXT) libsim.a rm -f hw-config.h stamp-hw + rm -f modules.c stamp-modules rm -f gentmap targ-map.c targ-vals.h stamp-tvals if [ ! -f Make-common.in ] ; then \ rm -f $(BUILT_SRC_FROM_COMMON) ; \ diff --git a/sim/common/local.mk b/sim/common/local.mk index fc11497..25c7e5b 100644 --- a/sim/common/local.mk +++ b/sim/common/local.mk @@ -38,7 +38,11 @@ noinst_LIBRARIES += %D%/libcommon.a %D%/sim-load.c \ %D%/version.c -%D%/version.c: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh +%D%/version.c: %D%/version.c-stamp ; @true +%D%/version.c-stamp: $(srcroot)/gdb/version.in $(srcroot)/bfd/version.h $(srcdir)/%D%/create-version.sh $(AM_V_GEN)$(SHELL) $(srcdir)/%D%/create-version.sh $(srcroot)/gdb $@.tmp - $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $@ + $(AM_V_at)$(SHELL) $(srcroot)/move-if-change $@.tmp $(@:-stamp=) $(AM_V_at)touch $@ + +CLEANFILES += \ + %D%/version.c %D%/version.c-stamp |