summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorljo <ljo@FreeBSD.org>1994-01-29 00:48:19 +0000
committerljo <ljo@FreeBSD.org>1994-01-29 00:48:19 +0000
commite394fc261eeca27f5c41b8490a5e7d43ad90852a (patch)
treeb86858c4f27b43b88daa6eb3db9320260e89a1b7 /usr.bin
parent1e8ff0f8181d889aab683624bdabf92f112ca113 (diff)
downloadFreeBSD-src-e394fc261eeca27f5c41b8490a5e7d43ad90852a.zip
FreeBSD-src-e394fc261eeca27f5c41b8490a5e7d43ad90852a.tar.gz
Sprinkled with ${.CURDIR} to get the builds of gram.c and tokdefs.h
correct.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/f2c/Makefile15
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.bin/f2c/Makefile b/usr.bin/f2c/Makefile
index 0a8cbca..210ba94 100644
--- a/usr.bin/f2c/Makefile
+++ b/usr.bin/f2c/Makefile
@@ -3,7 +3,7 @@
PROG= f2c
g = -O -g
-CFLAGS = $g -DANSI_Libraries
+CFLAGS = $g -DANSI_Libraries -I${.CURDIR} -I.
SHELL = /bin/sh
SRCSd = main.c init.c gram.c lex.c proc.c equiv.c data.c format.c \
@@ -12,16 +12,19 @@ SRCSd = main.c init.c gram.c lex.c proc.c equiv.c data.c format.c \
parse_args.c niceprintf.c cds.c sysdep.c version.c
SRCS = $(SRCSd) malloc.c
-gram.c: gram.head gram.dcl gram.expr gram.exec gram.io defs.h tokdefs.h
- ( sed <tokdefs.h "s/#define/%token/" ;\
- cat gram.head gram.dcl gram.expr gram.exec gram.io ) >gram.in
+GRAMFILES = ${.CURDIR}/gram.head ${.CURDIR}/gram.dcl ${.CURDIR}/gram.expr\
+ ${.CURDIR}/gram.exec ${.CURDIR}/gram.io
+
+gram.c: ${GRAMFILES} ${.CURDIR}/defs.h tokdefs.h
+ (sed < tokdefs.h "s/#define/%token/" ; \
+ cat ${GRAMFILES}) > gram.in
$(YACC) $(YFLAGS) gram.in
echo "(expect 4 shift/reduce)"
sed 's/^# line.*/\/* & *\//' y.tab.c >gram.c
rm -f gram.in y.tab.c
-tokdefs.h: tokens
- grep -n . <tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h
+tokdefs.h: ${.CURDIR}/tokens
+ grep -n . <${.CURDIR}/tokens | sed "s/\([^:]*\):\(.*\)/#define \2 \1/" >tokdefs.h
CLEANFILES+=\
gram.c tokdefs.h
OpenPOWER on IntegriCloud