mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-10 15:55:37 +00:00
54 lines
1.3 KiB
Bash
Executable File
54 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
home=`pwd`
|
|
|
|
# library Make.inc
|
|
cd $home/lib
|
|
HFILES=`find . -type f -name '*.h' -not -path '*/Old/*' -not -path '*/Eigen/*'`
|
|
HFILES="$HFILES"
|
|
CCFILES=`find . -type f -name '*.cc' -not -name '*ommunicator*.cc'`
|
|
echo HFILES=$HFILES > Make.inc
|
|
echo >> Make.inc
|
|
echo CCFILES=$CCFILES >> Make.inc
|
|
|
|
# tests Make.inc
|
|
cd $home/tests
|
|
dirs=`find . -type d -not -path '*/\.*'`
|
|
for subdir in $dirs; do
|
|
cd $home/tests/$subdir
|
|
pwd
|
|
TESTS=`ls T*.cc`
|
|
TESTLIST=`echo ${TESTS} | sed s/.cc//g `
|
|
PREF=`[ $subdir = '.' ] && echo noinst || echo EXTRA`
|
|
SUB=`[ $subdir = '.' ] && echo subtests`
|
|
echo "tests: ${TESTLIST} ${SUB}" > Make.inc
|
|
echo ${PREF}_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
|
|
if [ $subdir != '.' ]; then
|
|
echo CLEANFILES = ${TESTLIST} >> Make.inc
|
|
echo >> Make.inc
|
|
fi
|
|
done
|
|
|
|
# benchmarks Make.inc
|
|
cd $home/benchmarks
|
|
echo> Make.inc
|
|
TESTS=`ls B*.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
|
|
|
|
cd ..
|