# HG changeset patch # User John W. Eaton # Date 1520359272 18000 # Node ID fc21ac9cd9982e20eca01e98e50370e4729b602b # Parent bf1bace6d01dc21e22fae107e66f0eb8c29aae77 only skip .gdbinit install if files differ (bug #53241) * Makefile.am (gdb-install-rule): Rename from gdb_install_rule. Change all uses. Don't skip installation if files are the same. (.gdbinit): Use $(AM_V_GEN) for more consistent output. * test/module.mk: Don't install .gdbinit file in test subdirectory of build tree. diff -r bf1bace6d01d -r fc21ac9cd998 Makefile.am --- a/Makefile.am Sun Mar 04 03:52:58 2018 -0600 +++ b/Makefile.am Tue Mar 06 13:01:12 2018 -0500 @@ -344,7 +344,7 @@ .PHONY: nonexistent-file .gdbinit: etc/gdbinit - @$(gdbinit_install_rule) + $(AM_V_GEN)$(gdbinit-install-rule) define changelog-from-hg-log rm -f $@-t && \ @@ -481,11 +481,10 @@ mv $@-t $@ endef -define gdbinit_install_rule - if [ -f $@ ]; then \ +define gdbinit-install-rule + if [ -f $@ ] && ! cmp -s $< $@; then \ echo "refusing to overwrite $@ with newer version from $<" 1>&2; \ else \ - echo "Installing $@ from version at $<" ; \ cp $< $@; \ fi endef diff -r bf1bace6d01d -r fc21ac9cd998 test/module.mk --- a/test/module.mk Sun Mar 04 03:52:58 2018 -0600 +++ b/test/module.mk Tue Mar 06 13:01:12 2018 -0500 @@ -74,11 +74,6 @@ include %reldir%/nest/module.mk include %reldir%/publish/module.mk -ALL_LOCAL_TARGETS += %reldir%/.gdbinit - -%reldir%/.gdbinit: etc/gdbinit - @$(gdbinit_install_rule) - define run-octave-tests ( cd %reldir% && $(SHELL) ../run-octave $(RUN_OCTAVE_OPTIONS) $(1) --norc --silent --no-history $(abs_top_srcdir)/%reldir%/fntests.m $(abs_top_srcdir)/%reldir% ); \ if $(AM_V_P); then \ @@ -199,7 +194,6 @@ $(GENERATED_TEST_FILES) %canon_reldir%_DISTCLEANFILES += \ - %reldir%/.gdbinit \ %reldir%/fntests.log CLEANFILES += $(%canon_reldir%_CLEANFILES)