1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:44:40 -07:00

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
This commit is contained in:
Russ Cox 2008-09-22 10:56:54 -07:00
parent 8a9752dcfb
commit b676b0e125
3 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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)

View File

@ -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