echo " IGNORED!"
continue
fi
- if [ ${dir}/${f} -nt ./testHeaderDeps_${f/.h/}.o ]; then
+ hdr=`echo "${f}" | sed s/.h//`
+ if [ ${dir}/${f} -nt ./testHeaderDeps_${hdr}.o ]; then
( echo "/* This file is AUTOMATICALLY GENERATED. DO NOT ALTER IT */"
echo "#include \"${dir}/${f}\" "
echo "int main( int argc, char* argv[] ) { return 0; } "
- ) >./testHeaderDeps_${f/.h/}.cc
+ ) >./testHeaderDeps_${hdr}.cc
# run compile test on the new file.
- # DEBUG: echo "TRY: ${cc} -o testHeaderDeps.o ./testHeaderDeps_${f/.h/}.cc"
- ${cc} -o testHeaderDeps_${f/.h/}.o ./testHeaderDeps_${f/.h/}.cc
- rm ./testHeaderDeps_${f/.h/}.cc
+ # DEBUG: echo "TRY: ${cc} -o testHeaderDeps.o ./testHeaderDeps_${hdr}.cc"
+ ${cc} -o testHeaderDeps_${hdr}.o ./testHeaderDeps_${hdr}.cc
+ rm ./testHeaderDeps_${hdr}.cc
fi
- if [ ! -f testHeaderDeps_${f/.h/}.o ]; then
+ if [ ! -f testHeaderDeps_${hdr}.o ]; then
rm testHeaders
exit 1
fi
echo "OK."
# unit-tests require an app to run.
# our most-recent object suits this purpose
- cp ./testHeaderDeps_${f/.h/}.o ./testHeaders
+ cp ./testHeaderDeps_${hdr}.o ./testHeaders
done