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
|
2018-08-28 15:00:40 +01:00
|
|
|
cd $home/Grid
|
2017-01-30 17:10:49 +00:00
|
|
|
HFILES=`find . -type f -name '*.h' -not -name '*Hdf5*' -not -path '*/gamma-gen/*' -not -path '*/Old/*' -not -path '*/Eigen/*'`
|
2016-07-30 17:53:18 +01:00
|
|
|
HFILES="$HFILES"
|
2018-01-08 11:29:20 +00:00
|
|
|
CCFILES=`find . -type f -name '*.cc' -not -path '*/gamma-gen/*' -not -name '*Communicator*.cc' -not -name '*SharedMemory*.cc' -not -name '*Hdf5*'`
|
2017-02-02 22:04:42 +00:00
|
|
|
HPPFILES=`find . -type f -name '*.hpp'`
|
|
|
|
echo HFILES=$HFILES $HPPFILES > 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
|
|
|
|
2017-02-02 22:04:42 +00: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`
|
2017-05-05 19:54:38 +01:00
|
|
|
echo "tests-local: ${TESTLIST} " > Make.inc
|
2016-09-23 11:12:45 +01:00
|
|
|
echo ${PREF}_PROGRAMS = ${TESTLIST} >> Make.inc
|
|
|
|
echo >> Make.inc
|
2016-12-15 12:26:53 +00:00
|
|
|
HADLINK=`[ $subdir = './hadrons' ] && echo '-lHadrons '`
|
2016-09-23 11:12:45 +01:00
|
|
|
for f in $TESTS; do
|
2016-11-04 22:32:25 +00:00
|
|
|
BNAME=`basename $f .cc`
|
2016-12-01 12:36:29 +00:00
|
|
|
echo ${BNAME}_SOURCES=$f >> Make.inc
|
2016-12-15 12:26:53 +00:00
|
|
|
echo ${BNAME}_LDADD=${HADLINK}-lGrid >> Make.inc
|
2016-11-04 22:32:25 +00:00
|
|
|
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
|
2019-04-18 11:53:26 +01:00
|
|
|
cd ..
|
|
|
|
|
2015-06-04 10:11:32 +01:00
|
|
|
|
2019-04-18 11:53:26 +01:00
|
|
|
# HMC Make.inc
|
|
|
|
cd $home/HMC
|
|
|
|
echo> Make.inc
|
|
|
|
TESTS=`ls *.cc`
|
|
|
|
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
|
|
|
echo bin_PROGRAMS = ${TESTLIST} > Make.inc
|
|
|
|
echo >> Make.inc
|
|
|
|
for f in $TESTS; do
|
|
|
|
BNAME=`basename $f .cc`
|
|
|
|
echo ${BNAME}_SOURCES=$f >> Make.inc
|
|
|
|
echo ${BNAME}_LDADD=-lGrid>> Make.inc
|
|
|
|
echo >> Make.inc
|
|
|
|
done
|
2015-06-04 10:11:32 +01:00
|
|
|
cd ..
|