From 837b8da3a5080c21479457d7fde693e8f5b211cc Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 27 Aug 2018 20:27:34 +0100 Subject: [PATCH 1/2] Fix comment syntax for pmake. GNU make is happy with leading tabs before a comment, but pmake says "Unassociated shell command". --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 3e29e66..f0568e2 100644 --- a/makefile +++ b/makefile @@ -36,7 +36,7 @@ CC = gcc -g -Wall -pedantic #YFLAGS = -d -S #YACC = bison -d -y YACC = yacc -d - # -S uses sprintf in yacc parser instead of sprint +# -S uses sprintf in yacc parser instead of sprint OFILES = b.o main.o parse.o proctab.o tran.o lib.o run.o lex.o From 9a4aa891763a9894825395871e231defc6aacd51 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Mon, 27 Aug 2018 20:28:29 +0100 Subject: [PATCH 2/2] 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