Skip to content

Commit b799d99

Browse files
committed
Fix rules for syscall parser for parallel makes
We must not try to compile scan.c until bison is finished generating pars.h
1 parent 958b441 commit b799d99

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

syscall/Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,16 @@ gen-syscall0:
4848
gen-syscall: $(gen_objs)
4949
$(CC) $(gen_objs) -o $@
5050

51-
%.c: %.y
52-
bison -d --output=$@ $<
51+
pars.c pars.h: pars.y
52+
if bison --defines=pars.h.tmp$$$$ --output=pars.c $<; then mv pars.h.tmp$$$$ pars.h; else rm -f pars.h.tmp$$$$; exit 1; fi
5353

54-
%.c: %.l
54+
pars.o: pars.c pars.h
55+
56+
scan.c: scan.l
5557
flex -o$@ $<
5658

59+
scan.o: scan.c pars.h
60+
5761
install: all-here
5862

5963
uninstall:

0 commit comments

Comments
 (0)