From: <sg...@us...> - 2003-12-10 21:14:42
|
Update of /cvsroot/libfunutil/libfunutil/toc/tests In directory sc8-pr-cvs1:/tmp/cvs-serv32211/toc/tests Modified Files: toc_make.sh Log Message: mass commit: an absolute boatload of build-related fixes. Index: toc_make.sh =================================================================== RCS file: /cvsroot/libfunutil/libfunutil/toc/tests/toc_make.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- toc_make.sh 10 Dec 2003 19:43:25 -0000 1.1 +++ toc_make.sh 10 Dec 2003 21:14:39 -0000 1.2 @@ -1,14 +1,22 @@ #!/do/not/bash -# toc_run_description = creating toc.make +# toc_run_description = creating included makefiles # Do not run this test manually: it is run by the toc core. TOC_MAKE=toc.make +TOC_QMAKE=toc.qmake + toc_add_make TOC_MAKE=${TOC_MAKE} +toc_add_make TOC_QMAKE=${TOC_QMAKE} +# set -x function toc_make_toc_make { # use a function because bash doesn't allow local vars outside of functions. + local usage="usage: arg1==target makefile basename. arg2=input template" + local themake=${1?$usage} + local themakein=${2?$usage} + echo "Creating $themake ... " local makeprops=${TOP_SRCDIR}/.toc.make.tmp toc_dump_make_properties > $makeprops local thedir @@ -16,9 +24,11 @@ local relpath local shortform local tocmakeprops - for d in $(find ${TOP_SRCDIR} -name Makefile -o -name GNUMakefile -o -name Makefile.toc | xargs grep -l "^include ${TOC_MAKE}" | sort); do + for d in $(find ${TOP_SRCDIR} -name Makefile -o -name GNUMakefile -o -name Makefile.toc -o -name '*.qmake' \ + | xargs grep -E -l "include.+${themake}" | sort -u); do + #echo "d=$d" >&2 thedir=$(dirname $d) - tocmake=${thedir}/${TOC_MAKE} + tocmake=${thedir}/$themake toc_makerelative $thedir relpath=${TOC_MAKERELATIVE} tocmake=${tocmake##$TOP_SRCDIR/} # make it short, for asthetic reasons :/ @@ -28,18 +38,36 @@ tocmakeprops=${cmake}.props cp $makeprops $tocmakeprops - cat <<EOF >> $tocmakeprops TOP_SRCDIR=${relpath##./} TOC_RELATIVE_DIR=${shortform##./} EOF - toc_atfilter_file $tocmakeprops ${TOC_HOME}/make/toc.make.at $tocmake \ - || toc_die $? "Error creating toc.make!" + toc_atfilter_file $tocmakeprops $themakein $tocmake \ + || toc_die $? "Error creating $themake!" rm $tocmakeprops touch $tocmake # required for proper auto-reconfigure :/ done } -toc_make_toc_make +toc_make_toc_make ${TOC_MAKE} ${TOC_HOME}/make/toc.make.at +err=$? +test $err != 0 && { + echo "Error creating ${TOC_MAKE} makefiles!" + return $err +} + +test -f ${TOP_SRCDIR}/toc.${PACKAGE_NAME}.qmake.at && { + toc_make_toc_make ${TOC_QMAKE} ${TOC_HOME}/make/toc.qmake.at + err=$? + test $err != 0 && { + echo "Error creating ${TOC_QMAKE} makefiles!" + return $err + } +} + +return $err + + + |