From c5337219eedc6ed2f56bcd4de2fae2373f3db0c2 Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 28 Feb 2013 20:22:08 +0000 Subject: [PATCH] First half of a "build-test" target git-svn-id: https://svn.dealii.org/branches/branch_cmake@28649 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/GNUmakefile | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/deal.II/GNUmakefile b/deal.II/GNUmakefile index dda411bbbf..042d420fe7 100644 --- a/deal.II/GNUmakefile +++ b/deal.II/GNUmakefile @@ -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 + -- 2.39.5