file reorg, pathnames.h, paths.h
[unix-history] / usr / src / old / pcc / lint / Makefile
index 519b823..ce417eb 100644 (file)
@@ -1,21 +1,22 @@
 #
 #
-#      @(#)Makefile    1.12    (Berkeley)      %G%
+#      @(#)Makefile    1.24    (Berkeley)      %G%
 #
 #
-M=/usr/src/lib/mip
-P=/usr/src/lib/pcc
+M=../../libexec/mip
+P=../../libexec/pcc
 CFLAGS=-O
 LINTLIBS=llib-port.ln llib-lc.ln llib-lcurses.ln llib-ldbm.ln llib-lm.ln \
        llib-lmp.ln llib-lplot.ln llib-ltermcap.ln
 SRCS=  $M/cgram.y $M/common.c $M/optim.c $M/pftn.c $M/scan.c $M/trees.c \
        $M/xdefs.c lint.c hash.c $M/pass1.h $M/manifest.h macdefs.h \
        lpass2.c
 CFLAGS=-O
 LINTLIBS=llib-port.ln llib-lc.ln llib-lcurses.ln llib-ldbm.ln llib-lm.ln \
        llib-lmp.ln llib-lplot.ln llib-ltermcap.ln
 SRCS=  $M/cgram.y $M/common.c $M/optim.c $M/pftn.c $M/scan.c $M/trees.c \
        $M/xdefs.c lint.c hash.c $M/pass1.h $M/manifest.h macdefs.h \
        lpass2.c
+MAN=   lint.0
 
 
-all:   lpass1 lpass2 ${LINTLIBS}
+all: lpass1 lpass2 ${LINTLIBS}
 
 lpass1: cgram.o rodata.o comm1.o optim.o pftn.o scan.o trees.o xdefs.o \
 
 lpass1: cgram.o rodata.o comm1.o optim.o pftn.o scan.o trees.o xdefs.o \
-       lint.o hash.o
+       lint.o hash.o rel.o
        ${CC} ${CFLAGS} cgram.o rodata.o comm1.o optim.o pftn.o scan.o \
        ${CC} ${CFLAGS} cgram.o rodata.o comm1.o optim.o pftn.o scan.o \
-               trees.o xdefs.o lint.o hash.o -o lpass1
+               trees.o xdefs.o lint.o hash.o rel.o -o lpass1
 
 cgram.o: $M/manifest.h $M/pass1.h pcclocal.h macdefs.h cgram.c
        $(CC) -c $(CFLAGS) -I$M -I. cgram.c
 
 cgram.o: $M/manifest.h $M/pass1.h pcclocal.h macdefs.h cgram.c
        $(CC) -c $(CFLAGS) -I$M -I. cgram.c
@@ -24,7 +25,7 @@ rodata.o: rodata.c
        $(CC) -c $(CFLAGS) -R rodata.c
 
 comm1.o: $M/manifest.h $M/pass1.h pcclocal.h $M/common.c macdefs.h
        $(CC) -c $(CFLAGS) -R rodata.c
 
 comm1.o: $M/manifest.h $M/pass1.h pcclocal.h $M/common.c macdefs.h
-       ln $M/common.c comm1.c
+       ln -s $M/common.c comm1.c
        $(CC) -c $(CFLAGS) -I$M -I. -DPASS1COMMON comm1.c
        rm -f comm1.c
 
        $(CC) -c $(CFLAGS) -I$M -I. -DPASS1COMMON comm1.c
        rm -f comm1.c
 
@@ -67,44 +68,47 @@ llib-port.ln: llib-port lpass1
        -(/lib/cpp -C -Dlint llib-port | ./lpass1 -puv > llib-port.ln )
 
 llib-ldbm.ln: llib-ldbm lpass1
        -(/lib/cpp -C -Dlint llib-port | ./lpass1 -puv > llib-port.ln )
 
 llib-ldbm.ln: llib-ldbm lpass1
-       -(/lib/cpp -C -Dlint llib-ldbm | ./lpass1 -puv > llib-ldbm.ln )
+       -(/lib/cpp -C -Dlint llib-ldbm | ./lpass1 -uv > llib-ldbm.ln )
 
 llib-lm.ln: llib-lm lpass1
 
 llib-lm.ln: llib-lm lpass1
-       -(/lib/cpp -C -Dlint llib-lm | ./lpass1 -puv > llib-lm.ln )
+       -(/lib/cpp -C -Dlint llib-lm | ./lpass1 -uv > llib-lm.ln )
 
 llib-lmp.ln: llib-lmp lpass1
 
 llib-lmp.ln: llib-lmp lpass1
-       -(/lib/cpp -C -Dlint llib-lmp | ./lpass1 -puv > llib-lmp.ln )
+       -(/lib/cpp -C -Dlint llib-lmp | ./lpass1 -uv > llib-lmp.ln )
 
 llib-lplot.ln: llib-lplot lpass1
 
 llib-lplot.ln: llib-lplot lpass1
-       -(/lib/cpp -C -Dlint llib-lplot | ./lpass1 -puv > llib-lplot.ln )
+       -(/lib/cpp -C -Dlint llib-lplot | ./lpass1 -uv > llib-lplot.ln )
 
 llib-ltermcap.ln: llib-ltermcap lpass1
 
 llib-ltermcap.ln: llib-ltermcap lpass1
-       -(/lib/cpp -C -Dlint llib-ltermcap | ./lpass1 -puv > llib-ltermcap.ln )
+       -(/lib/cpp -C -Dlint llib-ltermcap | ./lpass1 -uv > llib-ltermcap.ln )
 
 llib-lc.ln: llib-lc lpass1
        -(/lib/cpp -C -Dlint llib-lc | ./lpass1 -v > llib-lc.ln )
 
 llib-lcurses.ln: llib-lcurses lpass1
 
 llib-lc.ln: llib-lc lpass1
        -(/lib/cpp -C -Dlint llib-lc | ./lpass1 -v > llib-lc.ln )
 
 llib-lcurses.ln: llib-lcurses lpass1
-       -(/lib/cpp -C -Dlint llib-lcurses | ./lpass1 -v > llib-lcurses.ln )
+       -(/lib/cpp -C -Dlint -D__void__=__curses__ llib-lcurses | ./lpass1 -v > llib-lcurses.ln )
 
 lpass2: lpass2.o hash.o
        ${CC} ${CFLAGS} lpass2.o hash.o -o lpass2
 
 lpass2.o: $M/manifest.h lmanifest.h pcclocal.h macdefs.h
        ${CC} ${CFLAGS} -c -I$M -I. lpass2.c
 
 lpass2: lpass2.o hash.o
        ${CC} ${CFLAGS} lpass2.o hash.o -o lpass2
 
 lpass2.o: $M/manifest.h lmanifest.h pcclocal.h macdefs.h
        ${CC} ${CFLAGS} -c -I$M -I. lpass2.c
-       
+
+hash.o: hash.c
+       ${CC} ${CFLAGS} -c -I$M -I. hash.c
+
 lintall:
        lint -hpv -I. -I$M  $M/cgram.c $M/xdefs.c $M/scan.c \
                $M/pftn.c $M/trees.c $M/optim.c lint.c
 
 lintall:
        lint -hpv -I. -I$M  $M/cgram.c $M/xdefs.c $M/scan.c \
                $M/pftn.c $M/trees.c $M/optim.c lint.c
 
-install: all SHELL
-       install -s lpass1 ${DESTDIR}/usr/lib/lint/lint1
-       install -s lpass2 ${DESTDIR}/usr/lib/lint/lint2
-       for i in llib-*; do install -c -m 644 $$i ${DESTDIR}/usr/lib/lint; done
-       -rm -f ${DESTDIR}/usr/lib/lint/llib-ltermlib*
-       ln -s llib-ltermcap ${DESTDIR}/usr/lib/lint/llib-ltermlib
-       ln -s llib-ltermcap.ln ${DESTDIR}/usr/lib/lint/llib-ltermlib.ln
-       install -c SHELL ${DESTDIR}/usr/bin/lint
+install: all SHELL ${MAN}
+       install -s -o bin -g bin -m 755 lpass1 lpass2 /usr/libexec
+       install -c -o bin -g bin -m 444 llib-* /usr/libdata/lint
+       rm -f /usr/libdata/llib-ltermlib*
+       ln -s llib-ltermcap /usr/libdata/llib-ltermlib
+       ln -s llib-ltermcap.ln /usr/libdata/llib-ltermlib.ln
+       install -c -o bin -g bin -m 755 SHELL ${DESTDIR}/usr/bin/lint
+       install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
 
 shrink:
        rm -f *.o errs rodata.c pcctokens pcclocal.h
 
 shrink:
        rm -f *.o errs rodata.c pcctokens pcclocal.h
@@ -112,5 +116,10 @@ shrink:
 clean: shrink
        rm -f lpass1 lpass2 cgram.c gram.in tags ${LINTLIBS}
 
 clean: shrink
        rm -f lpass1 lpass2 cgram.c gram.in tags ${LINTLIBS}
 
-tags:  ${SRCS}
+cleandir: clean
+       rm -f ${MAN} tags .depend
+
+tags: ${SRCS}
        ctags -w ${SRCS}
        ctags -w ${SRCS}
+
+depend lint: