+2018-07-09 Tom Tromey <tom@tromey.com>
+
+ * 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 <tom@tromey.com>
* Makefile.in (init.c): Depend on stamp-init.
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)
< $(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) \