]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
A preliminary version for a build_test target
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 23:41:57 +0000 (23:41 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 28 Feb 2013 23:41:57 +0000 (23:41 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_cmake@28656 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/GNUmakefile
deal.II/bundled/cmake/Makefile
deal.II/examples/CMakeLists.txt
deal.II/examples/GNUmakefile

index 72f058eecff3c1dfbe772b69116a2c75c04da944..8982b590602de1cad751d7c0d4c9e7e3a1a2e728 100644 (file)
@@ -25,7 +25,7 @@ indent:
 
 .PHONY: cmake
 cmake:
-       @cd bundled/cmake && make
+       cd bundled/cmake && make
        @echo
        @echo =======================================================
        @echo
@@ -58,14 +58,14 @@ testdir:= "$(TMPDIR)"/deal-build-test.$(date)-$(random)
 builddir:= $(testdir)/build
 installdir:= $(testdir)/install
 
-.PHONY: build-test
+.PHONY: build_test
 build-test:
-       @mkdir -p $(builddir)
-       @mkdir -p $(installdir)
-       @cd $(builddir) && "$(CMAKE)" -C "$(CONFIGFILE)" -DCMAKE_INSTALL_PREFIX=$(installdir) $(PWD) >$(testdir)/configure.log 2>&1
-       @cp $(builddir)/summary.log $(testdir)
-       @cd $(builddir) && make log >/dev/null 2>&1
-       @cp $(builddir)/cmake.log $(testdir)
-       @cd $(builddir) && make $(MAKEOPTS) install >$(testdir)/build.log 2>&1
-
+       mkdir -p $(builddir)
+       mkdir -p $(installdir)
+       cd $(builddir) && "$(CMAKE)" -C "$(CONFIGFILE)" -DCMAKE_INSTALL_PREFIX=$(installdir) $(PWD) >$(testdir)/configure.log 2>&1
+       cp $(builddir)/summary.log $(testdir)
+       cd $(builddir) && make log >/dev/null 2>&1
+       cp $(builddir)/cmake.log $(testdir)
+       cd $(builddir) && make $(MAKEOPTS) install >$(testdir)/build.log 2>&1
+       cd $(installdir)/examples && make run_examples >$(testdir)/examples.log 2>&1
 
index de8608f3e83fb3e2608b3f801110e637a9bae28d..30d8d55615b9f090fea4c70cda4d9d1303e9d899 100644 (file)
@@ -13,4 +13,5 @@ bin/cmake:
 clean:
        rm -rf bin cmake-2.8.8 cmake-2.8.8.tar.gz doc man share
 
+.PHONY: all
 all: bin/cmake
index 00c55439116653afb2ac71361724e4c9e56693da..3d89b4ac39d119188dd12a8f0451b734f3142427 100644 (file)
@@ -29,4 +29,9 @@ IF(DEAL_II_COMPONENT_EXAMPLES)
       )
   ENDFOREACH()
 
+  INSTALL(FILES GNUmakefile
+    DESTINATION ${DEAL_II_EXAMPLES_RELDIR}
+    COMPONENT examples
+    )
+
 ENDIF()
index f51445e590995e079bb0f15d1b484a70e131be03..1516700a088fc112930fa640f47e6598ce623e19 100644 (file)
@@ -9,16 +9,17 @@ else
   default:
 endif
 
-steps:= $(wildcard step-*)
 
-configure_examples:
-       @echo "============ Configure all examples"
-       @for f in  $(steps);\
-       do\
-         cd $(PWD)/$$f ;\
-         cmake .;\
-         cd $(PWD);\
-       done
+steps:= $(wildcard step-*)
 
 .PHONY: configure_examples
+configure_examples: $(steps:%=%/Makefile)
+
+%/Makefile:
+       -cd $(@D) && cmake . > /dev/null 2>&1
+
+.PHONY: run_examples
+run_examples: $(steps:%=%/Output)
 
+%/Output: %/Makefile
+       cd $(@D) && if [ -f Makefile ]; then make run; fi > Output 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.