Fix ytab.[ch] dependencies to allow parallel make.
The old ytab.o rule produced ytab.c and ytab.h too, but this wasn't visible as dependencies, so make -j would fail. Make this explicit, and use the implicit .c.o rule rather than writing out the $(CC) command.
This commit is contained in:
parent
837b8da3a5
commit
9a4aa89176
5
makefile
5
makefile
|
@ -54,11 +54,12 @@ a.out: ytab.o $(OFILES)
|
|||
|
||||
$(OFILES): awk.h ytab.h proto.h
|
||||
|
||||
ytab.o: awk.h proto.h awkgram.y
|
||||
ytab.c: awk.h proto.h awkgram.y
|
||||
$(YACC) $(YFLAGS) awkgram.y
|
||||
mv y.tab.c ytab.c
|
||||
mv y.tab.h ytab.h
|
||||
$(CC) $(CFLAGS) -c ytab.c
|
||||
|
||||
ytab.h: ytab.c
|
||||
|
||||
proctab.c: maketab
|
||||
./maketab >proctab.c
|
||||
|
|
Loading…
Reference in New Issue