From: Tom Tromey Date: Mon, 2 Jul 2018 13:06:27 +0000 (-0600) Subject: Use a stamp file for version.c X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d3c3a68c3ffe37c06a7a8dad30c19241bd39f7a;p=binutils-gdb.git Use a stamp file for version.c This introduces a stamp file for version.c, preventing unnecessary version.o rebuilds. gdb/ChangeLog 2018-07-09 Tom Tromey * Makefile.in (clean mostlyclean): Remove stamp-version. (version.c): Depend on stamp-version. (stamp-version): New rule, from version.c rule. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7e39800cfd4..75a8f67f13f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2018-07-09 Tom Tromey + + * Makefile.in (clean mostlyclean): Remove stamp-version. + (version.c): Depend on stamp-version. + (stamp-version): New rule, from version.c rule. + 2018-07-09 Tom Tromey * Makefile.in (init.c): Depend on stamp-init. diff --git a/gdb/Makefile.in b/gdb/Makefile.in index d14e86727b8..fa93ac36c8f 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1948,7 +1948,7 @@ tags: TAGS clean mostlyclean: $(CONFIG_CLEAN) @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do rm -f *.o *.a $(ADD_FILES) *~ init.c-tmp init.l-tmp version.c-tmp - rm -f init.c stamp-init version.c + rm -f init.c stamp-init version.c stamp-version rm -f gdb$(EXEEXT) core make.log rm -f gdb[0-9]$(EXEEXT) rm -f test-cp-name-parser$(EXEEXT) @@ -2138,9 +2138,15 @@ $(srcdir)/copying.c: @MAINTAINER_MODE_TRUE@ $(srcdir)/../COPYING3 $(srcdir)/copy < $(srcdir)/../COPYING3 > $(srcdir)/copying.tmp mv $(srcdir)/copying.tmp $(srcdir)/copying.c -version.c: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh +version.c: stamp-version; @true +# Note that the obvious names for the temp file are taken by +# create-version.sh. +stamp-version: Makefile version.in $(srcdir)/../bfd/version.h $(srcdir)/common/create-version.sh $(ECHO_GEN) $(SHELL) $(srcdir)/common/create-version.sh $(srcdir) \ - $(host_alias) $(target_alias) version.c + $(host_alias) $(target_alias) version-t.t + @$(SHELL) $(srcdir)/../move-if-change version-t.t version.c + @echo stamp > stamp-version + lint: $(LINTFILES) $(LINT) $(INCLUDE_CFLAGS) $(LINTFLAGS) $(LINTFILES) \