2016-08-02 12:14:28 +01:00
|
|
|
#!/usr/bin/env bash
|
2015-06-03 13:07:00 +01:00
|
|
|
|
2016-07-07 22:31:07 +01:00
|
|
|
home=`pwd`
|
2016-08-02 12:14:28 +01:00
|
|
|
|
|
|
|
# library Make.inc
|
2016-07-07 22:31:07 +01:00
|
|
|
cd $home/lib
|
2016-07-30 17:53:18 +01:00
|
|
|
HFILES=`find . -type f -name '*.h' -not -path '*/Old/*' -not -path '*/Eigen/*'`
|
|
|
|
HFILES="$HFILES"
|
2015-06-03 12:47:46 +01:00
|
|
|
CCFILES=`find . -type f -name '*.cc' -not -name '*ommunicator*.cc'`
|
2016-08-02 12:14:28 +01:00
|
|
|
echo HFILES=$HFILES > Make.inc
|
2015-06-03 12:47:46 +01:00
|
|
|
echo >> Make.inc
|
|
|
|
echo CCFILES=$CCFILES >> Make.inc
|
2015-06-03 13:07:00 +01:00
|
|
|
|
2016-08-02 12:14:28 +01:00
|
|
|
# tests Make.inc
|
2016-07-07 22:31:07 +01:00
|
|
|
cd $home/tests
|
2016-09-23 11:12:45 +01:00
|
|
|
dirs=`find . -type d -not -path '*/\.*'`
|
2016-08-02 12:14:28 +01:00
|
|
|
for subdir in $dirs; do
|
2016-09-23 11:12:45 +01:00
|
|
|
cd $home/tests/$subdir
|
|
|
|
pwd
|
|
|
|
TESTS=`ls T*.cc`
|
|
|
|
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
|
|
|
PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA`
|
2016-11-04 22:32:25 +00:00
|
|
|
SUB=`[ $subdir = '.' ] && echo subtests`
|
|
|
|
echo "tests: ${TESTLIST} ${SUB}" > Make.inc
|
2016-09-23 11:12:45 +01:00
|
|
|
echo ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc
|
|
|
|
echo >> Make.inc
|
|
|
|
for f in $TESTS; do
|
2016-11-04 22:32:25 +00:00
|
|
|
BNAME=`basename $f .cc`
|
|
|
|
echo ${BNAME}_SOURCES=$f >> Make.inc
|
|
|
|
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
|
|
|
echo >> Make.inc
|
2016-09-23 11:12:45 +01:00
|
|
|
done
|
2016-11-04 22:32:25 +00:00
|
|
|
if [ $subdir != '.' ]; then
|
|
|
|
echo CLEANFILES = ${TESTLIST} >> Make.inc
|
|
|
|
echo >> Make.inc
|
|
|
|
fi
|
2016-07-07 22:31:07 +01:00
|
|
|
done
|
2015-06-03 13:07:00 +01:00
|
|
|
|
2016-08-02 12:14:28 +01:00
|
|
|
# benchmarks Make.inc
|
2016-07-07 22:31:07 +01:00
|
|
|
cd $home/benchmarks
|
2015-06-03 13:07:00 +01:00
|
|
|
echo> Make.inc
|
|
|
|
TESTS=`ls B*.cc`
|
|
|
|
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
2016-08-02 12:14:28 +01:00
|
|
|
echo bin_PROGRAMS = ${TESTLIST} > Make.inc
|
2015-06-03 13:07:00 +01:00
|
|
|
echo >> Make.inc
|
2016-08-02 12:14:28 +01:00
|
|
|
for f in $TESTS; do
|
2016-09-23 11:12:45 +01:00
|
|
|
BNAME=`basename $f .cc`
|
|
|
|
echo ${BNAME}_SOURCES=$f >> Make.inc
|
|
|
|
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
|
|
|
echo >> Make.inc
|
2015-06-03 13:07:00 +01:00
|
|
|
done
|
2015-06-04 10:11:32 +01:00
|
|
|
|
|
|
|
cd ..
|