diff build-aux/common.mk @ 16603:e5c0acc31640

install .gdbinit in test directory * build-aux/common.mk (gdbinit_install_rule): New macro. * Makefile.am (.gdbinit): Use it. * test/Makefile.am (all-local, .gdbinit): New targets.
author John W. Eaton <jwe@octave.org>
date Fri, 03 May 2013 00:29:07 -0400
parents bfff338c56d1
children 06a850f83dd4
line wrap: on
line diff
--- a/build-aux/common.mk	Fri May 03 00:27:55 2013 -0400
+++ b/build-aux/common.mk	Fri May 03 00:29:07 2013 -0400
@@ -718,6 +718,15 @@
 mv $@-t $@
 endef
 
+define gdbinit_install_rule
+if [ -f .gdbinit ]; then \
+  echo "refusing to overwrite .gdbinit with newer version from $<" 1>&2; \
+else \
+  echo "Installing .gdbinit from version at $<" ; \
+  cp $< $@; \
+fi
+endef
+
 %.cc-tst : %.cc
 	$(test-file-commands)