1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 23:29:39 +00:00

Complete check of ld65 output

ld65 output was only checked for listing build before. No, both builds
are tested separately for better test coverage.
This commit is contained in:
Spiro Trikaliotis 2022-06-20 22:19:22 +02:00
parent 343bc1a489
commit b3846ee1c4

View File

@ -52,12 +52,12 @@ $(WORKDIR)/$1.bin: $1.s $(ISEQUAL)
ifeq ($(wildcard control/$1.err),)
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1
ifeq ($(wildcard control/$1.no-ld65),)
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2>&1
endif
else
$(CA65) -t none -o $$(@:.bin=.o) $$< > $$(@:.bin=.err) 2>&1 || true
ifeq ($(wildcard control/$1.no-ld65),)
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib || true
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib > $$(@:.bin=.ld65-err) 2>&1 || true
endif
endif
@ -71,15 +71,24 @@ ifneq ($(wildcard ref/$1.bin-ref),)
$(ISEQUAL) --binary ref/$1.bin-ref $$@
endif
ifneq ($(wildcard ref/$1.ld65err-ref),)
$(ISEQUAL) ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
else
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
$(ISEQUAL) --empty $$(@:.bin=.ld65-err)
endif
endif
# compile with listing file
ifeq ($(wildcard control/$1.err),)
$(CA65) -t none -l $$(@:.bin=.lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1
ifeq ($(wildcard control/$1.no-ld65),)
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.ld65-err) 2>&1
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2>&1
endif
else
$(CA65) -t none -l $$(@:.bin=.lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1 || true
$(CA65) -t none -l $$(@:.bin=.list-lst) -o $$(@:.bin=.list-o) $$< > $$(@:.bin=.list-err) 2>&1 || true
ifeq ($(wildcard control/$1.no-ld65),)
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.ld65-err) 2>&1 || true
$(LD65) -t none -o $$(@:.bin=.list-bin) $$(@:.bin=.list-o) none.lib > $$(@:.bin=.list-ld65-err) 2>&1 || true
endif
endif
@ -90,10 +99,10 @@ else
endif
ifneq ($(wildcard ref/$1.ld65err-ref),)
$(ISEQUAL) ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
$(ISEQUAL) ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err)
else
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
$(ISEQUAL) --empty $$(@:.bin=.ld65-err)
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),)
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err)
endif
endif
@ -106,7 +115,7 @@ ifneq ($(wildcard ref/$1.list-ref),)
# we have a reference file, compare that, too
# remove first line which contains a version number
$(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.lst)
$(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst)
endif
endef # LISTING_template