Fix dependencies for Yacc files. Improve Makefile POSIX compliance.

Parallel building issue pointed out by murphm8 and chastai.
This commit is contained in:
Anthony J. Bentley
2014-09-26 15:27:52 -06:00
parent 3e4350afa4
commit 73e44cb803

View File

@@ -1,3 +1,5 @@
.POSIX:
REALCFLAGS = ${CFLAGS} -Wall -Iinclude -Iinclude/asm/gameboy -g -std=c99
# User-defined variables
@@ -77,11 +79,14 @@ rgblink: ${rgblink_obj}
rgbfix: ${rgbfix_obj}
$Q${CC} ${REALCFLAGS} -o $@ ${rgbfix_obj}
.y.c:
$Q${YACC} -d ${YFLAGS} -o $@ $<
.c.o:
$Q${CC} ${REALCFLAGS} -c -o $@ $<
src/asm/asmy.c: src/asm/asmy.y
$Q${YACC} -d -o $@ $<
src/asm/gameboy/locallex.c src/asm/globlex.c src/asm/lexer.c: src/asm/asmy.h
src/asm/asmy.h: src/asm/asmy.c
src/asm/asmy.y: ${yacc_pre}
$Qcat ${yacc_pre} > $@
@@ -112,5 +117,3 @@ wwwman:
rgbfix.html
$Qmandoc ${MANDOC} src/link/rgblink.1 | sed s/OpenBSD/General/ > \
rgblink.html
.POSIX: