From: Ralf Hartmann Date: Mon, 28 Nov 2005 12:48:24 +0000 (+0000) Subject: New %/ref and refs targets. X-Git-Tag: v8.0.0~12838 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e3aafbe8b906ab025a030fc4b2485c19184c2e9;p=dealii.git New %/ref and refs targets. git-svn-id: https://svn.dealii.org/trunk@11797 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/Makefile b/tests/Makefile index cbba80f2c3..2cdb329258 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -83,6 +83,29 @@ output-multigrid: abort.o +# update/generate references + +refs: refs-base refs-lac refs-fe refs-deal.II refs-bits + +refs-base: abort.o + cd base ; $(MAKE) refs + +refs-lac: abort.o + cd lac ; $(MAKE) refs + +refs-fe: abort.o + cd fe ; $(MAKE) refs + +refs-bits: abort.o + cd bits ; $(MAKE) refs + +refs-deal.II: abort.o + cd deal.II ; $(MAKE) refs + +refs-multigrid: abort.o + cd multigrid ; $(MAKE) refs + + resultname: @echo $(TARGET)+$(GXX-VERSION) diff --git a/tests/Makefile.rules b/tests/Makefile.rules index c0288beed3..65b74620ed 100644 --- a/tests/Makefile.rules +++ b/tests/Makefile.rules @@ -149,6 +149,28 @@ report+mail: @rm testresults +############################################################ +# Generating references: Useful when creating references for +# a new platform or when updating several non-generic +# references. +############################################################ + + +%/ref : %/output + @$(PERL) -pi $(normalize) $< + @for i in $(PLATFORM-HIERARCHY) ; do \ + testname=$(<:%/output=%) ; \ + if test -f $$testname/cmp/$$i ; then \ + cmd="diff -w $< $$testname/cmp/$$i > /dev/null" ; \ + if eval ! $$cmd ; then \ + echo '=====Creating======' $$testname/cmp/$(PLATFORM) ; \ + cp $$testname/output $$testname/cmp/$(PLATFORM); \ + fi ; \ + break ; \ + fi ; \ + done + + ############################################################ # After all these general rules, here is the target to be # executed by make: for each entry in the list $(tests) @@ -160,6 +182,8 @@ output: $(tests:%=%/output) build: $(tests:%=%/exe) +refs: $(tests:%=%/ref) + ############################################################ # Link and copy files in ./results/* to generate checked # checked files for new hardware/compiler platform. @@ -205,7 +229,7 @@ Makefile.tests: $(shell echo *.cc) > $@ -.PHONY: report show-tests clean distclean +.PHONY: report show-tests clean distclean %/ref subdirs: for i in $(tests) ; do \