From 99f3c7d01d598061ff386a3b057b6db43e759eb0 Mon Sep 17 00:00:00 2001 From: Greg King Date: Wed, 1 Mar 2017 06:29:53 -0500 Subject: [PATCH] Fixed a makefile: "yaccdbg.c" includes "yacc.c". So, yaccdbg must depend on both of them. --- test/ref/Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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 -- 2.39.5