-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_all.sh
More file actions
executable file
·28 lines (26 loc) · 1.05 KB
/
make_all.sh
File metadata and controls
executable file
·28 lines (26 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
#This script works but is a little sketchy, mainly due to differing makefiles for each subdirectory. recommended to keep an eye on the compilation for errors
#but ostensibly works
#If it is the first time compiling and it fails, try running again before debugging
CLEAN=true
MAKE=true
MAKEDIR=$PWD
DIRS=(DmtpcCore DmtpcMath DmtpcPhysics DmtpcWaveform DmtpcImage DmtpcQuality DmtpcAnalysis)
#DmtpcMonteCarlo/MCAmp DmtpcMonteCarlo/WimpSpectrum DmtpcMonteCarlo/retrim DmtpcMonteCarlo/mctpc)
NDIRS=${#DIRS[@]}
for i in `seq 0 $NDIRS`
do
#make clean if set true above
#check for build dir for cleaners that delete dirs
#ls command checks the directory is empty for makers that empty dirs
if $CLEAN && [ -d ${DIRS[$i]}/build ] && [ "$(ls -A ${DIRS[$i]}/build)" ]; then
echo .............................cleaning ${DIRS[$i]}...........................
make -C ${DIRS[$i]} clean
fi
#make if build directory empty
if $MAKE ; then
echo .............................making ${DIRS[$i]}.............................
echo $PWD
make -C ${DIRS[$i]}
fi
done