diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-13 02:42:08 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-05-13 02:42:08 +0000 |
commit | b4630eceb7c025ec14428642fe463e0015e158ed (patch) | |
tree | c0ee499476b4f1a36dc10999fb400c74a27526e7 /bin/g++dep | |
parent | cfbe64cf3f56bd0a1fed88648fd601a5cf000cd2 (diff) | |
download | ATCD-b4630eceb7c025ec14428642fe463e0015e158ed.tar.gz |
changed PATH to pick up /project/doc/pkg/gnu/bin/g++, and removed GNUG_INCLUDE
Diffstat (limited to 'bin/g++dep')
-rwxr-xr-x | bin/g++dep | 68 |
1 files changed, 30 insertions, 38 deletions
diff --git a/bin/g++dep b/bin/g++dep index d4c1450e304..ad2c187e2e2 100755 --- a/bin/g++dep +++ b/bin/g++dep @@ -8,47 +8,45 @@ # @(#)mkdep.sh 1.7 (Berkeley) 10/13/87 # -PATH=/bin:/usr/bin:/usr/ucb:/usr/gnu:/usr/gnu/bin:/opt/gnu/bin:/pkg/gnu/bin:$PATH +PATH=/usr/local/bin:/project/doc/pkg/gnu/bin:/bin:/usr/bin:/usr/ucb:\ +/usr/gnu:/usr/gnu/bin:/opt/gnu/bin:/pkg/gnu/bin:$PATH export PATH if [ $# = 0 ] ; then - echo 'usage: g++dep [-p] [-f makefile] [flags] file ...' - exit 1 + echo 'usage: g++dep [-p] [-f makefile] [flags] file ...' + exit 1 fi -MAKE=Makefile # default makefile name is "Makefile" +MAKE=Makefile case $1 in - # -f allows you to select a makefile name - -f) - MAKE=$2 - shift; shift ;; - - # the -p flag produces "program: program.c" style dependencies - # so .o's don't get produced - -p) - SED='-e s;\.o;;' - shift ;; - # -r allows the use of relative pathnames... - -r) - REL="-e s;$ACE_ROOT;\$(ACE_ROOT);g " - if [ ${TAO_ROOT:-no_tao_root} = "no_tao_root" ] - then - echo no TAO_ROOT - else - REL="-e s;$TAO_ROOT;\$(TAO_ROOT);g "$REL - echo REL=$REL - fi - shift ;; + # -f allows you to select a makefile name + -f) MAKE=$2 + shift; shift ;; + + # the -p flag produces "program: program.c" style dependencies + # so .o's don't get produced + -p) SED='-e s;\.o;;' + shift ;; + + # -r allows the use of relative pathnames... + -r) REL="-e s;$ACE_ROOT;\$(ACE_ROOT);g " + if [ ${TAO_ROOT:-no_tao_root} = "no_tao_root" ]; then + echo no TAO_ROOT + else + REL="-e s;$TAO_ROOT;\$(TAO_ROOT);g "$REL + echo REL=$REL + fi + shift ;; esac if [ ! -w $MAKE ]; then - echo "g++dep: no writeable file \"$MAKE\"" - exit 1 + echo "g++dep: no writeable file \"$MAKE\"" + exit 1 fi TMP=/tmp/g++dep$$ -trap 'rm -f $TMP ; exit 1' 1 2 3 13 15 +trap 'rm -f $TMP; exit 1' 1 2 3 13 15 cp $MAKE ${MAKE}.bak @@ -60,20 +58,14 @@ cat << _EOF_ >> $TMP _EOF_ -#### For some reason, gcc -MM and g++ -MM don't pick up the g++-include -#### directory, so add it explicitly. The following uses the path of -#### g++, then up two directories and down to lib/g++-include. -GNUG_INCLUDE=\ --I`type g++ | sed 's%g\+\+ is \(.*/\)[^/]*/[^/]*%\1%'`lib/g++-include - -gcc -MM $GNUG_INCLUDE $* \ -| sed -e "s; \./; ;g" $SED $REL \ -| awk '{ if ($1 != prev) \ +g++ -MM $* | \ + sed -e "s; \./; ;g" $SED $REL | \ + awk '{ if ($1 != prev) \ { if (rec != "") print rec; rec = $0; prev = $1; } \ else \ { if (length(rec $2) > 78) { print rec; rec = $0; } \ else rec = rec " " $2 } } \ -END { print rec }' >> $TMP + END { print rec }' >> $TMP cat << _EOF_ >> $TMP |