From 9a4aa891763a9894825395871e231defc6aacd51 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 27 Aug 2018 20:28:29 +0100 Subject: [PATCH] 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. --- makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index f0568e2..ae80e4d 100644 --- a/makefile +++ b/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