From: Greg King Date: Wed, 1 Mar 2017 11:29:53 +0000 (-0500) Subject: Fixed a makefile: "yaccdbg.c" includes "yacc.c". So, yaccdbg must depend on both... X-Git-Tag: V2.16~37^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=99f3c7d01d598061ff386a3b057b6db43e759eb0;p=cc65 Fixed a makefile: "yaccdbg.c" includes "yacc.c". So, yaccdbg must depend on both of them. --- diff --git a/test/ref/Makefile b/test/ref/Makefile index 09dd96d44..6f0bd1bc1 100644 --- a/test/ref/Makefile +++ b/test/ref/Makefile @@ -1,4 +1,3 @@ - # makefile for the regression tests that generate output which has to be # compared with reference output @@ -24,7 +23,7 @@ WORKDIR := ..$S..$Stestwrk DIFF := $(WORKDIR)/bdiff CC := gcc -CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow +CFLAGS := -O2 -Wall -W -Wextra -funsigned-char -fwrapv -fno-strict-overflow .PHONY: all clean @@ -34,6 +33,11 @@ TESTS := $(foreach option,. .o. .os. .osi. .osir. .oi. .oir. .or.,$(SOURCES:%.c= all: $(REFS) $(TESTS) +# "yaccdbg.c" includes "yacc.c". +# yaccdbg's built files must depend on both of them. + +$(WORKDIR)/yaccdbg.ref: yacc.c + $(WORKDIR)/%.ref: %.c $(CC) $(CFLAGS) $< -o $(WORKDIR)/$*.host $(WORKDIR)$S$*.host > $@ @@ -48,6 +52,8 @@ $(WORKDIR)/switch.%rg: CC65FLAGS += -Wc --all-cdecl $(WORKDIR)/yacc.%rg: CC65FLAGS += -Wc --all-cdecl $(WORKDIR)/yaccdbg%prg: CC65FLAGS += -Wc --all-cdecl +$(WORKDIR)/yaccdbg%prg: yacc.c + $(WORKDIR)/%.prg: %.c $(WORKDIR)/%.ref $(CL65) $(CC65FLAGS) $< -o $@ $(SIM65) $(SIM65FLAGS) $@ > $(WORKDIR)/$*.out