Avoid cl65 in tests.

cl65 creates intermediate files based on the source file name in the source file directory. Calling cl65 in parallel with the same source file causes those intermediate files to get overwritten.

Fixes #1080
This commit is contained in:
Oliver Schmidt
2020-08-26 20:37:28 +02:00
parent 4c912a0fbe
commit c658acbf85
6 changed files with 61 additions and 71 deletions

View File

@@ -8,12 +8,10 @@ ifdef CMD_EXE
EXE = .exe
MKDIR = mkdir $(subst /,\,$1)
RMDIR = -rmdir /s /q $(subst /,\,$1)
DEL = del /f $(subst /,\,$1)
else
EXE =
MKDIR = mkdir -p $1
RMDIR = $(RM) -r $1
DEL = $(RM) $1
endif
ifdef QUIET
@@ -25,7 +23,7 @@ DA65 := $(if $(wildcard ../../bin/da65*),../../bin/da65,da65)
WORKDIR = ../../testwrk/dasm
DIFF = $(WORKDIR)/isequal$(EXE)
ISEQUAL = $(WORKDIR)/isequal$(EXE)
CC = gcc
CFLAGS = -O2
@@ -44,7 +42,7 @@ all: $(BINS)
$(WORKDIR):
$(call MKDIR,$(WORKDIR))
$(DIFF): ../isequal.c | $(WORKDIR)
$(ISEQUAL): ../isequal.c | $(WORKDIR)
$(CC) $(CFLAGS) -o $@ $<
define DISASS_template
@@ -55,10 +53,10 @@ $(WORKDIR)/$1-disass.bin: $1-disass.s | $(WORKDIR)
$(WORKDIR)/$1-reass.s: $(WORKDIR)/$1-disass.bin
$(DA65) --cpu $1 $(START) -o $$@ $$<
$(WORKDIR)/$1-reass.bin: $(WORKDIR)/$1-reass.s $(DIFF)
$(WORKDIR)/$1-reass.bin: $(WORKDIR)/$1-reass.s $(ISEQUAL)
$(if $(QUIET),echo dasm/$1-reass.bin)
$(CL65) --cpu $1 -t none $(START) -o $$@ $$<
$(DIFF) $$@ $(WORKDIR)/$1-disass.bin
$(ISEQUAL) $$@ $(WORKDIR)/$1-disass.bin
endef # DISASS_template
@@ -66,4 +64,3 @@ $(foreach cpu,$(CPUS),$(eval $(call DISASS_template,$(cpu))))
clean:
@$(call RMDIR,$(WORKDIR))
@$(call DEL,$(SOURCES:.s=.o))