#
# SOURCEDIR - the source directory to use (if not invoked in a source
# directory)
-# LOGDIR - directory for the log file
# CONFIGFILE - A cmake configuration file for the build test
+# LOGDIR - directory for the log file
+# LOGFILE - the logfile to use, default to $LOGDIR/$CONFIGFILE.<epoc>.log
#
# CMAKE - the cmake executable to use
# SVN - svn info command to use
builddir:= $(testdir)/build
installdir:= $(testdir)/install
LOGDIR=$(PWD)
-logfile:=$(LOGDIR)/$(date).$(firstword $(notdir $(CONFIGFILE)) automatic).log
+LOGFILE=$(LOGDIR)/$(firstword $(notdir $(CONFIGFILE)) automatic).$(date).log
CLEAN_TMPDIR=true
-PIPEnTRAP:= >>$(logfile) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false)
+PIPEnTRAP:= >>$(LOGFILE) 2>&1 || (if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi; false)
.PHONY: main
main:
mkdir -p $(LOGDIR)
mkdir -p $(builddir)
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: user=$(USER)" | tee -a $(logfile)
- @echo "dealii-feature: host=`hostname`" | tee -a $(logfile)
- @echo "dealii-feature: configuration=`basename \"$(CONFIGFILE)\"`" | tee -a $(logfile)
- @echo END HEADER `date -u '+%Y-%m-%d %T'`\n | tee -a $(logfile)
- @echo "BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @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: user=$(USER)" | tee -a $(LOGFILE)
+ @echo "dealii-feature: host=`hostname`" | tee -a $(LOGFILE)
+ @echo "dealii-feature: configuration=`basename \"$(CONFIGFILE)\"`" | tee -a $(LOGFILE)
+ @echo END HEADER `date -u '+%Y-%m-%d %T'`\n | tee -a $(LOGFILE)
+ @echo "BEGIN CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
cd $(builddir) && "$(CMAKE)" -C "$(CONFIGFILE)" -DCMAKE_INSTALL_PREFIX=$(installdir) $(SOURCEDIR) $(PIPEnTRAP)
- @echo "END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- @echo "BEGIN CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "END CONFIGURE OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ @echo "BEGIN CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
cd $(builddir) && "$(CMAKE)" --system-information $(PIPEnTRAP)
- @echo "END CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- @echo "BEGIN REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "END CMAKE SYSTEM INFORMATION `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ @echo "BEGIN REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
cd $(builddir) && make $(MAKEOPTS) run_report_features $(PIPEnTRAP)
- @echo "END REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- @echo "BEGIN BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "END REPORT FEATURES `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ @echo "BEGIN BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
cd $(builddir) && make $(MAKEOPTS) install $(PIPEnTRAP)
- @echo "END BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- @echo "BEGIN BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "END BUILD INSTALL OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ @echo "BEGIN BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
cd $(installdir)/examples && make -f $(SOURCEDIR)/contrib/utilities/build_test DEAL_II_DIR=$(installdir) build_examples $(PIPEnTRAP)
- @echo "END BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- #@echo "BEGIN RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ @echo "END BUILD EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ #@echo "BEGIN RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
#cd $(installdir)/examples && make -f $(SOURCEDIR)/contrib/utilities/build_test run_examples $(PIPEnTRAP)
- #@echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- @echo "BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
+ #@echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
+ @echo "BUILD TEST SUCCESSFUL `date -u '+%Y-%m-%d %T'`" | tee -a $(LOGFILE)
if ${CLEAN_TMPDIR}; then rm -rf $(testdir); fi