]> Cypherpunks repositories - gostls13.git/commitdiff
better yacc rule in Makefile
authorRuss Cox <rsc@golang.org>
Mon, 22 Sep 2008 17:56:54 +0000 (10:56 -0700)
committerRuss Cox <rsc@golang.org>
Mon, 22 Sep 2008 17:56:54 +0000 (10:56 -0700)
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

src/cmd/6a/Makefile
src/cmd/cc/Makefile
src/cmd/gc/Makefile

index d4bfd210cb8687e5399d2c889362d30be74a1c6c..db541578150ddc256977ce727f27232c532f8e28 100644 (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
index 4247a8b971fe6a6c15d8ea9ad8ed7ce06035cb9c..61aec26a72274d34cd7bd35d0738f097fa9255ec 100644 (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)
index 4a7445a91d17795c58aa0cc18f8db2c66fd833fd..600c3b44204fcea291a602a852fdd1b5a410bf45 100644 (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