]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
First half of a "build-test" target
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 20:22:08 +0000 (20:22 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 20:22:08 +0000 (20:22 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@28649 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/GNUmakefile

index dda411bbbf6e3b7ef805665c7bb67bfe4147d745..042d420fe77abab00e8f28793ff0d4aa5d628ab0 100644 (file)
@@ -13,6 +13,7 @@ style-h-files:= $(wildcard include/deal.II/*/*.h)
 style-cc-files:= $(wildcard source/*/*.cc)
 style-examples:= $(wildcard examples/*/*.cc)
 
+.PHONY: indent
 indent:
        @echo "============ Indenting all files"
        @for f in  $(style-h-files) $(style-cc-files) $(style-examples) ;\
@@ -21,6 +22,8 @@ indent:
          astyle --options=contrib/utilities/astyle.rc $$f ;\
        done
 
+
+.PHONY: cmake
 cmake:
        @cd bundled/cmake && make
        @echo
@@ -35,5 +38,30 @@ cmake:
        @echo =======================================================
        @echo
 
-.PHONY: indent cmake
+
+#
+# Target for build tests
+#
+# Environment variables:
+#      CMAKE
+#      TMPDIR
+#      CONFIGFILE
+#      MAKEOPTS
+#
+
+TMPDIR=/tmp
+CMAKE=cmake
+
+random:= $(shell echo "$$RANDOM$$RANDOM")
+builddir:= "$(TMPDIR)"/deal-build.$(random)
+installdir:= "$(TMPDIR)"/deal-install.$(random)
+
+.PHONY: build-test
+build-test:
+       @mkdir -p $(builddir)
+       @mkdir -p $(installdir)
+       @cd $(builddir) && "$(CMAKE)" -C "$(CONFIGFILE)" -DCMAKE_INSTALL_PREFIX=$(installdir) $(PWD) >$(builddir)/configuration.log 2>&1
+       @cd $(builddir) && make $(MAKEOPTS) install >$(builddir)/build.log 2>&1
+       @cd $(builddir) && make log >/dev/null 2>&1
+
 

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.