-#
-# Copyright (c) 1980 Regents of the University of California.
-# All rights reserved. The Berkeley software License Agreement
-# specifies the terms and conditions for redistribution.
-#
-# @(#)Makefile 5.4 (Berkeley) %G%
-#
-SCCSID = "@(#)Makefile 5.4 (Berkeley) %G%"
-DESTDIR=
-ED= -ex
-AS= -as
-RM= rm -f
-EYACC= ../eyacc/eyacc
-CFLAGS= -O -I. -I${SRCDIR} -w -DRMOTHERS
-SRCDIR= ../src
-BINDIR= ../pxp
-#
-# Files which are specific to PXP
-#
-LOCOBJ= Version.o call.o case.o const.o cset.o error.o fdec.o func.o \
- lab.o lval.o main.o pmon.o pp.o proc.o rec.o rval.o stat.o \
- type.o var.o y.tab.o yycomm.o yyerror.o \
- yymain.o yyput.o rmothers.o
-#
-# Files which are shared with pi and pc0
-#
-SRCOBJ= TRdata.o hash.o nl.o string.o subr.o tree.o treen.o yycopy.o \
- yycosts.o yyget.o yyid.o yylex.o yypanic.o yyparse.o yyprint.o \
- yyrecover.o yyseman.o yytree.o
-SRCSRC= TRdata.c hash.c nl.c string.c subr.c tree.c treen.c yycopy.c \
- yycosts.c yyget.c yyid.c yylex.c yypanic.c yyparse.c yyprint.c \
- yyrecover.c yyseman.c yytree.c
-
-all: a.out
-
-a.out: ${LOCOBJ} ${SRCOBJ}
- ${CC} ${CFLAGS} ${LOCOBJ} ${SRCOBJ}
-
-${SRCOBJ}:
- -ln ${SRCDIR}/$*.c $*.c
- ${CC} ${CFLAGS} -c $*.c
- ${RM} $*.c
-
-y.tab.h y.tab.c: ${SRCDIR}/pas.y
- ${EYACC} ${SRCDIR}/pas.y >/dev/null
- ${ED} - y.tab.c < ${SRCDIR}/gram
+# @(#)Makefile 8.2 (Berkeley) 5/27/94
+
+PROG= pxp
+SRCDIR= ${.CURDIR}/../src
+.PATH: ${SRCDIR}
+EYACC= ${.CURDIR}/../eyacc/obj/eyacc
+
+CFLAGS+=-DRMOTHERS -w -I. -I${.CURDIR} -I${SRCDIR}
+SRCS= TRdata.c Version.c call.c case.c const.c cset.c error.c fdec.c \
+ func.c hash.c lab.c lval.c main.c nl.c pmon.c pp.c proc.c rec.c \
+ rmothers.c rval.c stat.c string.c subr.c tree.c treen.c type.c \
+ var.c y.tab.c yycomm.c yycopy.c yycosts.c yyerror.c yyget.c yyid.c \
+ yylex.c yymain.c yypanic.c yyparse.c yyprint.c yyput.c yyrecover.c \
+ yyseman.c yytree.c
+CLEANFILES=opc y.tab.c y.tab.h opcode.h version
+
+y.tab.h: ${SRCDIR}/pas.y ${SRCDIR}/gram
+ if [ -f ${EYACC} ]; then \
+ echo make y.tab.h and y.tab.c; \
+ rm -f y.tab.h y.tab.c; \
+ ${EYACC} ${SRCDIR}/pas.y > /dev/null; \
+ else \
+ echo copy y.tab.h and y.tab.c; \
+ cp ${SRCDIR}/y.tab.c ${SRCDIR}/y.tab.h .; \
+ fi
+ ex - y.tab.c < ${SRCDIR}/gram