aboutsummaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorL Jonas Olsson <ljo@FreeBSD.org>1994-01-29 00:48:19 +0000
committerL Jonas Olsson <ljo@FreeBSD.org>1994-01-29 00:48:19 +0000
commit0f47f4199d84d4c270442a7aad37d0e39677fcd1 (patch)
treeb86858c4f27b43b88daa6eb3db9320260e89a1b7 /usr.bin
parentf657493cee245ed8327a8a5f36911101af20c64c (diff)
downloadsrc-0f47f4199d84d4c270442a7aad37d0e39677fcd1.tar.gz
src-0f47f4199d84d4c270442a7aad37d0e39677fcd1.zip
Sprinkled with ${.CURDIR} to get the builds of gram.c and tokdefs.h
correct.
Notes
Notes: svn path=/head/; revision=1031
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 0a8cbcad1e56..210ba9404e24 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