]> https://gitweb.dealii.org/ - dealii.git/commitdiff
New %/ref and refs targets.
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 28 Nov 2005 12:48:24 +0000 (12:48 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Mon, 28 Nov 2005 12:48:24 +0000 (12:48 +0000)
git-svn-id: https://svn.dealii.org/trunk@11797 0785d39b-7218-0410-832d-ea1e28bc413d

tests/Makefile
tests/Makefile.rules

index cbba80f2c3bb41db35f2da45230fe23bae8b5617..2cdb329258414f622b1358654586aabc93fcb7b3 100644 (file)
@@ -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)
index c0288beed3e7f2301b4d6f04c607a646a89ebec4..65b74620edf973550e49a6bf06daa996d4d9c776 100644 (file)
@@ -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 \

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.