fix handling of QUIET in the "test" directory
This commit is contained in:
@@ -20,8 +20,12 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
endif
|
||||
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
|
||||
@@ -52,8 +56,8 @@ define CPUDETECT_template
|
||||
|
||||
$(WORKDIR)/$1-cpudetect.bin: cpudetect.s $1-cpudetect.ref $(ISEQUAL)
|
||||
$(if $(QUIET),echo asm/$1-cpudetect.bin)
|
||||
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$<
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib
|
||||
$(CA65) -t none --cpu $1 -l $$(@:.bin=.lst) -o $$(@:.bin=.o) $$< $(CATERR)
|
||||
$(LD65) -t none -o $$@ $$(@:.bin=.o) none.lib $(CATERR)
|
||||
$(ISEQUAL) $1-cpudetect.ref $$@
|
||||
|
||||
endef # CPUDETECT_template
|
||||
@@ -61,7 +65,7 @@ endef # CPUDETECT_template
|
||||
$(foreach cpu,$(CPUDETECT_CPUS),$(eval $(call CPUDETECT_template,$(cpu))))
|
||||
|
||||
$(WORKDIR)/%.o: %.s | $(WORKDIR)
|
||||
$(CA65) -l $(@:.o=.lst) -o $@ $<
|
||||
$(CA65) -l $(@:.o=.lst) -o $@ $< $(NULLOUT) $(CATERR)
|
||||
|
||||
clean:
|
||||
@$(call RMDIR,$(WORKDIR))
|
||||
|
||||
@@ -26,7 +26,9 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
|
||||
@@ -17,6 +17,7 @@ ifdef CMD_EXE
|
||||
RMDIR = -rmdir /q /s $(subst /,\,$1)
|
||||
TRUE = exit 0
|
||||
CAT = type $(subst /,\,$1)
|
||||
NULLDEV = nul:
|
||||
else
|
||||
S = /
|
||||
EXE =
|
||||
@@ -24,10 +25,14 @@ else
|
||||
RMDIR = $(RM) -r $1
|
||||
TRUE = true
|
||||
CAT = cat $1
|
||||
NULLDEV = /dev/null
|
||||
endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),..$S..$S..$Sbin$Sca65,ca65)
|
||||
@@ -82,48 +87,52 @@ endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err-ref),)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.err) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.err2) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.err2) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.bin-ref),)
|
||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@
|
||||
$(ISEQUAL) --binary ref/$1.bin-ref $$@ $(NULLERR)
|
||||
endif
|
||||
|
||||
# rem $(indfo $(CAT) $(subst /,$$S,$$$(@:.bin=.ld65-err)))
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err-ref),)
|
||||
ifndef QUIET
|
||||
@echo $(CAT) $$(@:.bin=.ld65-err)
|
||||
# FIXME: somehow this refuses to work in cmd.exe
|
||||
ifndef CMD_EXE
|
||||
$(call CAT,$$(@:.bin=.ld65-err))
|
||||
-diff -u ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.ld65-err) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||
ifndef QUIET
|
||||
@echo $(CAT) $$(@:.bin=.ld65-err2)
|
||||
# FIXME: somehow this refuses to work in cmd.exe
|
||||
ifndef CMD_EXE
|
||||
$(call CAT,$$(@:.bin=.ld65-err2))
|
||||
-diff -u ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2)
|
||||
endif
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.ld65-err2) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.ld65-err2),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.ld65-err2) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -149,37 +158,37 @@ endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err-ref),)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err)
|
||||
$(ISEQUAL) ref/$1.err-ref $$(@:.bin=.list-err) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err-ref),)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err-ref $$(@:.bin=.list-ld65-err) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.err2-ref),)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2)
|
||||
$(ISEQUAL) ref/$1.err2-ref $$(@:.bin=.list-err2) $(NULLERR)
|
||||
else
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-err2) $(NULLERR)
|
||||
endif
|
||||
|
||||
ifneq ($(wildcard ref/$1.ld65err2-ref),)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2)
|
||||
$(ISEQUAL) --wildcards ref/$1.ld65err2-ref $$(@:.bin=.list-ld65-err2) $(NULLERR)
|
||||
else
|
||||
ifneq ($(wildcard $(WORKDIR)/$1.list-ld65-err2),)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2)
|
||||
$(ISEQUAL) --empty $$(@:.bin=.list-ld65-err2) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
# check if the result bin is the same as without listing file
|
||||
ifeq ($(wildcard control/$1.err),)
|
||||
ifeq ($(wildcard control/$1.err2),)
|
||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin)
|
||||
$(ISEQUAL) $$@ $$(@:.bin=.list-bin) $(NULLERR)
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -187,7 +196,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=.list-lst)
|
||||
$(ISEQUAL) --skip=1 ref/$1.list-ref $$(@:.bin=.list-lst) $(NULLERR)
|
||||
endif
|
||||
|
||||
endef # LISTING_template
|
||||
|
||||
@@ -30,6 +30,7 @@ ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
|
||||
SIM65FLAGS = -x 200000000
|
||||
|
||||
@@ -22,6 +22,9 @@ endif
|
||||
|
||||
ifdef QUIET
|
||||
.SILENT:
|
||||
NULLOUT = >$(NULLDEV)
|
||||
NULLERR = 2>$(NULLDEV)
|
||||
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
|
||||
endif
|
||||
|
||||
CA65 := $(if $(wildcard ../../../bin/ca65*),../../../bin/ca65,ca65)
|
||||
|
||||
@@ -51,8 +51,8 @@ define PRG_template
|
||||
|
||||
$(WORKDIR)/%.$1.prg: %.s | $(WORKDIR)
|
||||
$(if $(QUIET),echo asm/val/$$*.$1.prg)
|
||||
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLERR)
|
||||
$(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLERR)
|
||||
$(CA65) -t sim$1 -o $$(@:.prg=.o) $$< $(NULLOUT) $(NULLERR)
|
||||
$(LD65) -C sim6502-asmtest.cfg -o $$@ $$(@:.prg=.o) sim$1.lib $(NULLOUT) $(NULLERR)
|
||||
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
|
||||
|
||||
endef # PRG_template
|
||||
|
||||
Reference in New Issue
Block a user