delete mention of ^Y; currently don't allow ^Y or ^E.
[unix-history] / usr / src / usr.bin / pascal / pdx / Makefile
index 09df303..da51d18 100644 (file)
@@ -1,6 +1,8 @@
-# Copyright (c) 1982 Regents of the University of California
+# Copyright (c) 1982 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
 #
 #
-#      @(#)Makefile    1.11    (Berkeley)      %G%
+#      @(#)Makefile    1.19 (Berkeley) %G%
 #
 # make file for pdx
 #
 #
 # make file for pdx
 #
 #      to touch the C files that include it.
 #
 
 #      to touch the C files that include it.
 #
 
+DESTDIR        =
 HOME   = /usr/src/ucb/pdx
 LIB    = library.o cerror.o
 HOME   = /usr/src/ucb/pdx
 LIB    = library.o cerror.o
-PASCAL = /usr/src/ucb/pascal/
-INSTALL        = /usr/ucb/pdx
+SRCDIR = ../src/
+INSTALL        = ${DESTDIR}/usr/ucb/pdx
 
 RM     = /bin/rm -f
 
 RM     = /bin/rm -f
-CFLAGS = -Disvaxpx -I.. -I${PASCAL} -DOBJ -DVAX -O
+CFLAGS = -I.. -I../${SRCDIR} -DOBJ -DADDR32 -O
+LINTFLAGS= -I. -I${SRCDIR} -DOBJ -DADDR32
 LDFLAGS        = # -i for pdp-11
 
 .c.o:
        @echo "compiling $*.c"
        @csh -f -c ' \
            set a=$*.c; \
 LDFLAGS        = # -i for pdp-11
 
 .c.o:
        @echo "compiling $*.c"
        @csh -f -c ' \
            set a=$*.c; \
-           if ($$a:h != $$a) chdir $$a:h; \
+           if ($$a:h != $$a) cd $$a:h; \
            ${CC} ${CFLAGS} -c $$a:t \
        '
 
            ${CC} ${CFLAGS} -c $$a:t \
        '
 
-.s.o:
-       @echo "assembling $*.s"
-       @cc -c $*.s
-
 #
 # source directory specifications
 #
 #
 # source directory specifications
 #
@@ -100,8 +100,7 @@ MACHOBJ =\
        ${MACHINE}optab.o\
        ${MACHINE}printdata.o\
        ${MACHINE}printerror.o\
        ${MACHINE}optab.o\
        ${MACHINE}printdata.o\
        ${MACHINE}printerror.o\
-       ${MACHINE}printinst.o\
-       ${MACHINE}pxerrors.o
+       ${MACHINE}printinst.o
 
 PROCOBJ =\
        ${PROCESS}runcont.o\
 
 PROCOBJ =\
        ${PROCESS}runcont.o\
@@ -154,12 +153,21 @@ profile: ${OBJS}
        @echo "linking with -p"
        @cc ${LDFLAGS} -p ${OBJS} ${LIB}
 
        @echo "linking with -p"
        @cc ${LDFLAGS} -p ${OBJS} ${LIB}
 
+lint:
+       @cd ${COMMAND}; yacc -d grammar.yacc; lex token.lex
+       -@lint ${LINTFLAGS} `echo ${OBJS} library.c | sed 's/\.o/.c/g'`
+       @${RM} ${COMMAND}lex.yy.c ${COMMAND}y.tab.c
+
+cerror.o:
+       @echo "assembling `machine`/$*.s"
+       @cc -c `machine`/$*.s
+
 ${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
 ${COMMAND}y.tab.o: ${COMMAND}grammar.yacc
-       chdir ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
+       cd ${COMMAND}; yacc -d grammar.yacc; cc -c ${CFLAGS} y.tab.c
        ${RM} ${COMMAND}y.tab.c
 
 ${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
        ${RM} ${COMMAND}y.tab.c
 
 ${COMMAND}lex.yy.o: ${COMMAND}token.lex ${COMMAND}y.tab.h
-       chdir ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
+       cd ${COMMAND}; lex token.lex; cc -c ${CFLAGS} lex.yy.c
        ${RM} ${COMMAND}lex.yy.c
 
 ${BPOBJ}:      ${BREAKPOINT}bp.rep
        ${RM} ${COMMAND}lex.yy.c
 
 ${BPOBJ}:      ${BREAKPOINT}bp.rep
@@ -168,13 +176,15 @@ ${PROCOBJ}:       ${PROCESS}process.rep
 ${SYMOBJ}:     ${SYM}sym.rep
 ${TREEOBJ}:    ${TREE}tree.rep
 ${OBJOBJ}:     ${OBJECT}objsym.rep
 ${SYMOBJ}:     ${SYM}sym.rep
 ${TREEOBJ}:    ${TREE}tree.rep
 ${OBJOBJ}:     ${OBJECT}objsym.rep
-${OBJECT}readobj.o ${OBJECT}readsym.o: ${PASCAL}objfmt.h
+${OBJECT}readobj.o ${OBJECT}readsym.o: ${SRCDIR}objfmt.h
 
 install: a.out
 
 install: a.out
-       mv a.out ${INSTALL}
+       install -s a.out ${INSTALL}
 
 clean:
 
 clean:
-       ${RM} a.out */*.o
+       ${RM} a.out *.o */*.o
+
+depend:
 
 #
 # Warning:  This will produce a very long listing.  You would be better
 
 #
 # Warning:  This will produce a very long listing.  You would be better