3 # travels down each subdirectory and cleans using make.
4 function clean_subdirectories()
6 # keep the variable local to avoid contaminating
10 # find all the subdirectories.
11 for smoot87 in $(find . -mindepth 1 -maxdepth 1 -type f); do
14 # # skip if not a directory.
15 # if [ ! -d "$smoot87" ]; then continue; fi
16 #echo "inside first check of it being dir: $smoot87"
18 # make sure there's a makefile there.
19 if [ -f "$smoot87/$MAKEFILE_NAME" ]; then
20 echo "inside barriers, with filename=$smoot87 and all conditions met."
22 make --silent NOT_FIRST_MAKE=t -f $MAKEFILE_NAME clean
24 echo "Skipping makefile-less directory $smoot87..."
29 # execute our function on current directory.