# CLEAN_TMPDIR - defaults to "true"
#
+#
+# Specify default values:
+#
SOURCEDIR=$(CURDIR)
+LOGDIR=$(PWD)
TMPDIR=/tmp
CMAKE=cmake
SVN=svn info
+
+branch:=$(shell $(SVN) $(SOURCEDIR) | perl -ne 'print "$$1" if m/svn\.dealii\.org\/(.+)\/deal.II/;')
+revision:=$(shell $(SVN) $(SOURCEDIR) | perl -ne 'print "$$_" if s/Last Changed Rev: //;')
+
date:= $(shell date +%s)
random:=$(shell echo "$$RANDOM")
testdir:= "$(TMPDIR)"/deal-build-test.$(date)-$(random)
builddir:= $(testdir)/build
installdir:= $(testdir)/install
-LOGDIR=$(PWD)
-LOGFILE=$(LOGDIR)/$(firstword $(notdir $(CONFIGFILE)) automatic).$(date).log
+LOGFILE=$(LOGDIR)/$(firstword $(branch) unknown_branch).$(firstword $(notdir $(CONFIGFILE)) no_configuration).$(date).log
CLEAN_TMPDIR=true
PIPEnTRAP:= >>$(LOGFILE) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false)
mkdir -p $(installdir)
@echo "AUTOMATED DEAL.II BUILD TEST" | tee $(LOGFILE)
@echo "BEGIN HEADER `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
- @$(SVN) $(SOURCEDIR) | perl -ne 'print "dealii-feature: revision=$$_" if s/Last Changed Rev: //; print "dealii-feature: branch=$$1\n" if m/svn\.dealii\.org\/(.+)\/deal.II/;' | tee -a $(LOGFILE)
+ @echo "dealii-feature: branch=$(branch)" | tee -a $(LOGFILE)
+ @echo "dealii-feature: revision=$(revision)" | tee -a $(LOGFILE)
@echo "dealii-feature: user=$(USER)" | tee -a $(LOGFILE)
@echo "dealii-feature: host=`hostname`" | tee -a $(LOGFILE)
@echo "dealii-feature: configuration=`basename \"$(CONFIGFILE)\"`" | tee -a $(LOGFILE)