diff --git a/test/patches/gb-starter-kit.patch b/test/patches/gb-starter-kit.patch new file mode 100644 index 0000000000..a60147b220 --- /dev/null +++ b/test/patches/gb-starter-kit.patch @@ -0,0 +1,23 @@ +diff --git a/Makefile b/Makefile +index fc5b476..67f6a36 100644 +--- a/Makefile ++++ b/Makefile +@@ -102,12 +102,16 @@ bin/%.${ROMEXT}: $(patsubst src/%.asm,obj/%.o,${SRCS}) + # (and produce weird errors). + obj/%.mk: src/%.asm + @${MKDIR_P} ${@D} +- ${RGBASM} ${ASFLAGS} -M $@ -MG -MP -MQ ${@:.mk=.o} -MQ $@ -o ${@:.mk=.o} $< ++ ${RGBASM} ${ASFLAGS} -M $@ -MG -MP -MQ $@ -MQ obj/$*.o -o obj/$*.o $< + # DO NOT merge this with the rule above, otherwise Make will assume that the `.o` file is generated, + # even when it isn't! + # This causes weird issues that depend, among other things, on the version of Make. ++# The rule is duplicated to work around a bug on certain OSes, where Make truncates timestamps to ++# 1-second resolution; this causes the rule above not to always be re-run when all dependencies have ++# been created... which means the `.o` file doesn't exist. + obj/%.o: obj/%.mk +- @touch $@ ++ @${MKDIR_P} ${@D} ++ ${RGBASM} ${ASFLAGS} -o $@ src/$*.asm + + ifeq ($(filter clean,${MAKECMDGOALS}),) + include $(patsubst src/%.asm,obj/%.mk,${SRCS}) diff --git a/test/run-tests.sh b/test/run-tests.sh index 716ec8ab10..5cd8ccd044 100755 --- a/test/run-tests.sh +++ b/test/run-tests.sh @@ -60,7 +60,7 @@ test_downstream() { # owner/repo make-target return 1 fi make clean - make -j4 $2 RGBDS=../../ + make -drj4 $2 RGBDS=../../ popd }