Commit b676b0e1 authored by Russ Cox's avatar Russ Cox

better yacc rule in Makefile

if y.tab.c is older than y.tab.h, make
interprets doing nothing as a failure,
because y.tab.c hasn't been updated.
so update it.

R=r
DELTA=4  (0 added, 0 deleted, 4 changed)
OCL=15615
CL=15622
parent 8a9752dc
......@@ -33,7 +33,7 @@ y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
test -f y.tab.c && touch y.tab.c
clean:
rm -f $(OFILES) $(TARG) *.6 enam.c 6.out a.out y.tab.h y.tab.c
......
......@@ -42,7 +42,7 @@ y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
test -f y.tab.c && touch y.tab.c
clean:
rm -f $(OFILES) *.6 enam.c 6.out a.out y.tab.h y.tab.c $(LIB)
......
......@@ -37,7 +37,7 @@ y.tab.h: $(YFILES)
yacc $(YFLAGS) $(YFILES)
y.tab.c: y.tab.h
# do nothing
test -f y.tab.c && touch y.tab.c
sysimport.c: sys.go mksys.bash
bash mksys.bash
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment