From: mrdudz Date: Sun, 23 Nov 2014 11:18:19 +0000 (+0100) Subject: added some windows/cmd.exe stuff X-Git-Tag: V2.15~29^2~10 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a66605d5efd64828f75d5b4e3346a49d452e370;p=cc65 added some windows/cmd.exe stuff --- diff --git a/test/Makefile b/test/Makefile index 65df4da4c..d71d5fda4 100644 --- a/test/Makefile +++ b/test/Makefile @@ -6,10 +6,10 @@ MAKE := make --no-print-dir .PHONY: all clean all: - @$(MAKE) -C val all - @$(MAKE) -C ref all - @$(MAKE) -C err all - @$(MAKE) -C misc all + @$(MAKE) -C val clean all + @$(MAKE) -C ref clean all + @$(MAKE) -C err clean all + @$(MAKE) -C misc clean all clean: @$(MAKE) -C val clean diff --git a/test/err/Makefile b/test/err/Makefile index 6f919b3d1..3ced60bc8 100644 --- a/test/err/Makefile +++ b/test/err/Makefile @@ -1,14 +1,21 @@ # makefile for the tests that MUST NOT compile +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + CC65FLAGS = -t sim6502 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) -SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65) +ifdef CMD_EXE +RM := del /f +else RM := rm -f +endif -.PHONY: all +.PHONY: all clean TESTS := $(patsubst %.c,%.prg,$(wildcard *.c)) TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c)) diff --git a/test/misc/Makefile b/test/misc/Makefile index 02f264cc6..b9e4637d0 100644 --- a/test/misc/Makefile +++ b/test/misc/Makefile @@ -1,14 +1,25 @@ +# makefile for the remaining tests that need special care in one way or another + +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + CC65FLAGS = -t sim6502 SIM65FLAGS = -x 200000000 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65) +ifdef CMD_EXE +RM := del /f +DIFF := fc +else RM := rm -f DIFF := diff -q +endif -.PHONY: all +.PHONY: all clean TESTS := $(patsubst %.c,%.prg,$(wildcard *.c)) TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c)) diff --git a/test/readme.txt b/test/readme.txt index 308b2fa90..673ecabdb 100644 --- a/test/readme.txt +++ b/test/readme.txt @@ -12,5 +12,5 @@ compiler. /misc - a few tests that need special care of some sort -to run the tests use "make clean all" in this (top) directory, the makefile -should exit with no error. +to run the tests use "make" in this (top) directory, the makefile should exit +with no error. diff --git a/test/ref/Makefile b/test/ref/Makefile index 88d54a296..b3b555aef 100644 --- a/test/ref/Makefile +++ b/test/ref/Makefile @@ -2,18 +2,27 @@ # makefile for the regression tests that generate output which has to be # compared with reference output +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + CC65FLAGS = -t sim6502 SIM65FLAGS = -x 200000000 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65) +ifdef CMD_EXE +RM := del /f +DIFF := fc +else RM := rm -f DIFF := diff -q +endif CFLAGS := -O2 -Wall -W -Wextra -fwrapv -fno-strict-overflow -.PHONY: all +.PHONY: all clean REFS := $(patsubst %.c,%.ref,$(wildcard *.c)) diff --git a/test/todo b/test/todo index 911eacdd3..75245507e 100644 --- a/test/todo +++ b/test/todo @@ -1,10 +1,4 @@ -- the tests in ./misc need special care - - check all tests in ./ref and make them return their results as exit code -- in ./val use some other tool than "diff" for comparing the results - -- fixup makefiles to use "del" instead of "rm -f" on windows - - reduce usage of "common.h" to a minimum diff --git a/test/val/Makefile b/test/val/Makefile index 0e4a6e94c..e4841bd35 100644 --- a/test/val/Makefile +++ b/test/val/Makefile @@ -1,15 +1,23 @@ # makefile for the regression tests that return an error code on failure +ifneq ($(shell echo),) + CMD_EXE = 1 +endif + CC65FLAGS = -t sim6502 SIM65FLAGS = -x 200000000 CL65 := $(if $(wildcard ../../bin/cl65*),../../bin/cl65,cl65) SIM65 := $(if $(wildcard ../../bin/sim65*),../../bin/sim65,sim65) +ifdef CMD_EXE +RM := del /f +else RM := rm -f +endif -.PHONY: all +.PHONY: all clean TESTS := $(patsubst %.c,%.prg,$(wildcard *.c)) TESTS += $(patsubst %.c,%.o.prg,$(wildcard *.c))