Annotation of 43BSDTahoe/new/rn/makedepend.SH, revision 1.1

1.1     ! root        1: case $CONFIG in
        !             2:     '') . config.sh ;;
        !             3: esac
        !             4: echo "Extracting makedepend (with variable substitutions)"
        !             5: $spitshell >makedepend <<!GROK!THIS!
        !             6: $startsh
        !             7: # $Header: makedepend.SH,v 4.3.1.2 85/05/13 15:53:42 lwall Exp $
        !             8: #
        !             9: # $Log:        makedepend.SH,v $
        !            10: # Revision 4.3.1.2  85/05/13  15:53:42  lwall
        !            11: # Made cpp look in /usr/local/include too.
        !            12: # 
        !            13: # Revision 4.3.1.1  85/05/10  11:35:10  lwall
        !            14: # Branch for patches.
        !            15: # 
        !            16: # Revision 4.3  85/05/01  11:42:26  lwall
        !            17: # Baseline for release with 4.3bsd.
        !            18: # 
        !            19: 
        !            20: export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh \$0; kill \$\$)
        !            21: 
        !            22: $cat /dev/null >.deptmp
        !            23: $echo "(Note: this is going to take a while.)"
        !            24: $rm -f X*.c
        !            25: for file in *.c; do
        !            26:     filebase=\`basename \$file .c\`
        !            27:     $echo "Finding dependencies for \$filebase.o."
        !            28:     $sed -n <\$file >X\$file \\
        !            29:        -e "/^\${filebase}_init(/q" \\
        !            30:        -e '/^#/{' \\
        !            31:        -e 's|/\*.*$||' \\
        !            32:        -e p \\
        !            33:        -e '}'
        !            34:     $cpp -I/usr/local/include X\$file | $sed  \\
        !            35:        -e '/^# *[0-9]/!d' \\
        !            36:        -e 's/^.*"\(.*\)".*\$/'\$filebase'.o: \1/' \\
        !            37:        -e 's|: \./|: |' \\
        !            38:        -e 's|: X|: |' | \\
        !            39:        $uniq | $sort | $uniq >> .deptmp
        !            40: done
        !            41: 
        !            42: for file in *.SH; do
        !            43:     $echo \`basename \$file .SH\`: \$file config.sh \; /bin/sh \$file >> .deptmp
        !            44: done
        !            45: 
        !            46: $sed <Makefile >Makefile.new -e '1,/^# AUTOMATICALLY/!d'
        !            47: 
        !            48: if $test -s .deptmp; then
        !            49:     echo "Updating Makefile..."
        !            50:     echo "# If this runs make out of memory, delete /usr/include lines." >>Makefile.new
        !            51:     $cat .deptmp >>Makefile.new
        !            52: else
        !            53:     $echo "You don't seem to have a proper C preprocessor.  Using grep instead."
        !            54:     $egrep '^#include ' *.c *.h >.deptmp
        !            55:     echo "Updating Makefile..."
        !            56:     <.deptmp $sed -n 's|c:#include "\(.*\)".*\$\$|o: \1|p' >> Makefile.new
        !            57:     <.deptmp $sed -n 's|c:#include <\(.*\)>.*\$\$|o: /usr/include/\1|p' >> Makefile.new
        !            58:     <.deptmp $sed -n 's|h:#include "\(.*\)".*\$\$|h: \1|p' >> Makefile.new
        !            59:     <.deptmp $sed -n 's|h:#include <\(.*\)>.*\$\$|h: /usr/include/\1|p' >> Makefile.new
        !            60: fi
        !            61: $mv Makefile Makefile.old
        !            62: $mv Makefile.new Makefile
        !            63: $echo "# WARNING: Put nothing here or make depend will gobble it up!" >> Makefile
        !            64: rm .deptmp X*.c
        !            65: 
        !            66: !GROK!THIS!
        !            67: $eunicefix makedepend
        !            68: chmod 755 makedepend

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.