fix handling of QUIET in the "test" directory

This commit is contained in:
mrdudz
2025-06-26 19:48:16 +02:00
parent 73869a6f38
commit 7a85575158
14 changed files with 86 additions and 49 deletions

View File

@@ -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))

View File

@@ -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)

View File

@@ -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

View File

@@ -30,6 +30,7 @@ ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 200000000

View File

@@ -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)

View File

@@ -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

View File

@@ -14,14 +14,19 @@ ifdef CMD_EXE
EXE = .exe
MKDIR = mkdir $(subst /,\,$1)
RMDIR = -rmdir /q /s $(subst /,\,$1)
NULLDEV = nul:
else
EXE =
MKDIR = mkdir -p $1
RMDIR = $(RM) -r $1
NULLDEV = /dev/null
endif
ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65)

View File

@@ -26,9 +26,12 @@ endif
ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
WORKDIR = ../../testwrk/err
@@ -45,7 +48,7 @@ $(WORKDIR):
$(WORKDIR)/%.s: %.c | $(WORKDIR)
$(if $(QUIET),echo err/$*.s)
$(NOT) $(CC65) -o $@ $< $(NULLERR)
$(NOT) $(CC65) -o $@ $< $(NULLOUT) $(CATERR)
clean:
@$(call RMDIR,$(WORKDIR))

View File

@@ -30,6 +30,7 @@ ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 200000000
@@ -68,7 +69,7 @@ define PRG_template
$(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1209-ind-goto-rev.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
@@ -76,7 +77,7 @@ $(WORKDIR)/bug1209-ind-goto-rev.$1.$2.prg: bug1209-ind-goto-rev.c | $(WORKDIR)
$(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1209-ind-goto-rev-2.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
@@ -84,7 +85,7 @@ $(WORKDIR)/bug1209-ind-goto-rev-2.$1.$2.prg: bug1209-ind-goto-rev-2.c | $(WORKDI
$(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1209-ind-goto-rev-3.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(NOT) $(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
@@ -92,40 +93,40 @@ $(WORKDIR)/bug1209-ind-goto-rev-3.$1.$2.prg: bug1209-ind-goto-rev-3.c | $(WORKDI
$(WORKDIR)/pptest2.$1.$2.prg: pptest2.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/pptest2.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
# should compile, but compiler exits with internal error
$(WORKDIR)/bug1211-ice-move-refs-2.$1.$2.prg: bug1211-ice-move-refs-2.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(if $(QUIET),echo misc/bug1211-ice-move-refs-2.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
# this one requires --std=c89, it fails with --std=c99
$(WORKDIR)/bug1265.$1.$2.prg: bug1265.c | $(WORKDIR)
$(if $(QUIET),echo misc/bug1265.$1.$2.prg)
$(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) --standard c89 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
# should not compile, but gives different diagnostics in C99 mode than in others
$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c | $(WORKDIR)
$(WORKDIR)/bug2515.$1.$2.prg: bug2515.c $(ISEQUAL) | $(WORKDIR)
$(if $(QUIET),echo misc/bug2515.$1.$2.prg)
$(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
$(NOT) $(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.c99.ref
$(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2515.$1.$2.out
$(NOT) $(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2515.$1.$2.out
$(ISEQUAL) $(WORKDIR)/bug2515.$1.$2.out bug2515.ref
# should not issue any warnings in C99 mode
$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c | $(WORKDIR)
$(WORKDIR)/bug2637.$1.$2.prg: bug2637.c $(ISEQUAL) | $(WORKDIR)
$(if $(QUIET),echo misc/bug2637.$1.$2.prg)
$(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< 2>$(WORKDIR)/bug2637.$1.$2.out
$(CC65) --standard c99 -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) 2>$(WORKDIR)/bug2637.$1.$2.out
$(ISEQUAL) $(WORKDIR)/bug2637.$1.$2.out bug2637.ref
# this one requires -Werror
$(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
$(if $(QUIET),echo misc/bug1768.$1.$2.prg)
$(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -Werror -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
$(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
@@ -133,7 +134,7 @@ $(WORKDIR)/bug1768.$1.$2.prg: bug1768.c | $(WORKDIR)
# should compile, but then hangs in an endless loop
$(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
$(if $(QUIET),echo misc/endless.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
$(NOT) $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT) $(NULLERR)
@@ -142,12 +143,12 @@ $(WORKDIR)/endless.$1.$2.prg: endless.c | $(WORKDIR)
# in a useful way
$(WORKDIR)/bug2655.$1.$2.prg: bug2655.c $(ISEQUAL) | $(WORKDIR)
$(if $(QUIET),echo misc/bug2655.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/bug2655.$1.$2.out
$(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/bug2655.$1.$2.out
$(ISEQUAL) $(WORKDIR)/bug2655.$1.$2.out bug2655.ref
$(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR)
$(if $(QUIET),echo misc/limits.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CC65) -t sim$2 -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
$(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/limits.$1.$2.out
@@ -155,24 +156,24 @@ $(WORKDIR)/limits.$1.$2.prg: limits.c $(ISEQUAL) | $(WORKDIR)
$(WORKDIR)/goto.$1.$2.prg: goto.c $(ISEQUAL) | $(WORKDIR)
$(if $(QUIET),echo misc/goto.$1.$2.prg)
$(CC65) -t sim$2 -$1 -o $$@ $$< 2>$(WORKDIR)/goto.$1.$2.out
$(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) 2>$(WORKDIR)/goto.$1.$2.out
$(ISEQUAL) $(WORKDIR)/goto.$1.$2.out goto.ref
# this one requires failure with --std=c89, it fails with --std=cc65 due to
# stricter checks
$(WORKDIR)/bug2304-implicit-func.$1.$2.prg: bug2304-implicit-func.c | $(WORKDIR)
$(if $(QUIET),echo misc/bug2304-implicit-func.$1.$2.prg)
$(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLERR)
$(NOT) $(CC65) --standard c89 -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
# should not compile until 3-byte struct by value tests are re-enabled
$(WORKDIR)/struct-by-value.$1.$2.prg: struct-by-value.c | $(WORKDIR)
$(if $(QUIET),echo misc/struct-by-value.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
# the rest are tests that fail currently for one reason or another
$(WORKDIR)/sitest.$1.$2.prg: sitest.c | $(WORKDIR)
@echo "FIXME: " $$@ "currently does not compile."
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLERR)
$(NOT) $(CC65) -t sim$2 -$1 -o $$@ $$< $(NULLOUT) $(CATERR)
# $(SIM65) $(SIM65FLAGS) $$@ $(NULLOUT)
endef # PRG_template

View File

@@ -29,7 +29,9 @@ endif
ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 200000000

View File

@@ -26,6 +26,7 @@ ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 4000000000 -c

View File

@@ -26,9 +26,12 @@ endif
ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
WORKDIR = ../../testwrk/standard_err
@@ -49,7 +52,7 @@ define PRG_template
$(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR)
$(if $(QUIET),echo standard_err/$$*.$1.$2.prg)
$(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(NOT) $(CC65) -t sim$2 $$(CC65FLAGS) -Osir --add-source --standard $1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
endef # PRG_template

View File

@@ -28,8 +28,10 @@ ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 200000000
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)

View File

@@ -28,6 +28,7 @@ ifdef QUIET
.SILENT:
NULLOUT = >$(NULLDEV)
NULLERR = 2>$(NULLDEV)
CATERR = 2> $(WORKDIR)/$$@.errlog || (cat $(WORKDIR)/$$@.errlog && false)
endif
SIM65FLAGS = -x 4000000000 -c
@@ -56,10 +57,10 @@ define PRG_template
$(WORKDIR)/%.$1.$2.prg: %.c | $(WORKDIR)
$(if $(QUIET),echo val/$$*.$1.$2.prg)
$(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLERR)
$(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out $(CATRES)
$(CC65) -t sim$2 $$(CC65FLAGS) --add-source -$1 -o $$(@:.prg=.s) $$< $(NULLOUT) $(CATERR)
$(CA65) -t sim$2 -o $$(@:.prg=.o) $$(@:.prg=.s) $(NULLOUT) $(CATERR)
$(LD65) -t sim$2 -o $$@ $$(@:.prg=.o) sim$2.lib $(NULLOUT) $(CATERR)
$(SIM65) $(SIM65FLAGS) $$@ > $(WORKDIR)/$$@.out 2> $(WORKDIR)/$$@.out $(CATRES)
endef # PRG_template