comparison 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
comparison
equal deleted inserted replaced
16602:2c11d7c6cc21 16603:e5c0acc31640
716 define test-file-commands 716 define test-file-commands
717 ( echo "## DO NOT EDIT! Generated automatically from $(<F) by Make."; $(GREP) '^%!' $< ) > $@-t 717 ( echo "## DO NOT EDIT! Generated automatically from $(<F) by Make."; $(GREP) '^%!' $< ) > $@-t
718 mv $@-t $@ 718 mv $@-t $@
719 endef 719 endef
720 720
721 define gdbinit_install_rule
722 if [ -f .gdbinit ]; then \
723 echo "refusing to overwrite .gdbinit with newer version from $<" 1>&2; \
724 else \
725 echo "Installing .gdbinit from version at $<" ; \
726 cp $< $@; \
727 fi
728 endef
729
721 %.cc-tst : %.cc 730 %.cc-tst : %.cc
722 $(test-file-commands) 731 $(test-file-commands)
723 732
724 %.yy-tst : %.yy 733 %.yy-tst : %.yy
725 $(test-file-commands) 734 $(test-file-commands)