shithub: rgbds

Download patch

ref: 73e44cb803809f1dacaeb1de203ecf42ab1e96a4
parent: 3e4350afa4a855b9c33f971cc5484a911b4ca987
author: Anthony J. Bentley <[email protected]>
date: Fri Sep 26 11:27:52 EDT 2014

Fix dependencies for Yacc files. Improve Makefile POSIX compliance.

Parallel building issue pointed out by murphm8 and chastai.

--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,5 @@
+.POSIX:
+
 REALCFLAGS =	${CFLAGS} -Wall -Iinclude -Iinclude/asm/gameboy -g -std=c99
 
 # User-defined variables
@@ -77,11 +79,14 @@
 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 @@
 		rgbfix.html
 	$Qmandoc ${MANDOC} src/link/rgblink.1 | sed s/OpenBSD/General/ > \
 		rgblink.html
-
-.POSIX: