-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) ;\
- do\
- echo $$f ;\
- astyle --options=contrib/utilities/astyle.rc $$f ;\
- done
+#!/bin/bash
+if test ! -d source -o ! -d include -o ! -d examples ; then
+ echo "*** This script must be run from the top-level directory of deal.II."
+ exit
+fi
-#
-# Target for build tests:
-#
-TMPDIR=/tmp
-CMAKE=cmake
-SVN=svn info .
-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)/$(date).$(firstword $(notdir $(CONFIGFILE)) automatic).log
-CLEANUP=true
-TEEnTRAP:= | tee -a $(logfile) || (if ${CLEANUP}; then rm -rf $(testdir); fi; false)
-PIPEnTRAP:= >>$(logfile) 2>&1 || (if ${CLEANUP}; then rm -rf $(testdir); fi; false)
+if test ! -f contrib/utilities/astyle.rc ; then
+ echo "*** No style file contrib/utilities/astyle.rc found."
+ exit
+fi
-.PHONY: build_test
-build_test:
- 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) | perl -ne 'print "dealii-feature: revision=$$_" if s/Last Changed Rev: //; print "dealii-feature: branch=$$1\n" if m/svn\.dealii\.org\/(.+)\/deal.II/;' $(TEEnTRAP)
- @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) $(PWD) $(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)
- 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)
- 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)
- 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)
- cd $(installdir)/examples && make $(MAKEOPTS) 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)
- cd $(installdir)/examples && make $(MAKEOPTS) run_examples $(PIPEnTRAP)
- @echo "END RUN EXAMPLES OUTPUT `date -u '+%Y-%m-%d %T'`" | tee -a $(logfile)
- rm -rf $(testdir)
+echo "--- Indenting all deal.II header and source files"
+astyle --options=contrib/utilities/astyle.rc \
+ include/deal.II/*/*.h \
+ source/*/*.cc \
+ examples/*/*.cc