From: Oliver Schmidt
Date: Fri, 10 Jul 2015 22:01:39 +0000 (+0200)
Subject: Ignore return values only with CMD.EXE MkII.
X-Git-Tag: V2.16~253
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=50b0536222ee8cc417fdd7cb2bc2edb669a4a70b;p=cc65
Ignore return values only with CMD.EXE MkII.
CMD.EXE considers file deletion commands not able to delete anything as there's nothing to delete as failed. Of course we don't want to bail out of the Makefile because of missing files to delete. Therefore we ignore the return values with '-'. This change limits this workaround to CMD.EXE.
---
diff --git a/test/Makefile b/test/Makefile
index 95c9a9194..702b332d5 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -10,13 +10,11 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
- M := -
EXE := .exe
- DEL = del /f $(subst /,\,$1)
+ DEL = -del /f $(subst /,\,$1)
MKDIR = mkdir $(subst /,\,$1)
- RMDIR = rmdir /s /q $(subst /,\,$1)
+ RMDIR = -rmdir /s /q $(subst /,\,$1)
else
- M :=
EXE :=
DEL = $(RM) $1
MKDIR = mkdir $1
@@ -54,5 +52,5 @@ mostly-clean:
@$(MAKE) -C misc clean
clean: mostly-clean
- $M@$(call DEL,$(WORKDIR)/bdiff$(EXE))
- $M@$(call RMDIR,$(WORKDIR))
+ @$(call DEL,$(WORKDIR)/bdiff$(EXE))
+ @$(call RMDIR,$(WORKDIR))
diff --git a/test/err/Makefile b/test/err/Makefile
index 6ac457114..454a560ce 100644
--- a/test/err/Makefile
+++ b/test/err/Makefile
@@ -6,11 +6,9 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
- M := -
NOT := - # Hack
- DEL = del /f $(subst /,\,$1)
+ DEL = -del /f $(subst /,\,$1)
else
- M :=
NOT := !
DEL = $(RM) $1
endif
@@ -46,5 +44,5 @@ $(WORKDIR)/%.or.prg: %.c
$(NOT) $(CL65) -Or $(CC65FLAGS) $< -o $@
clean:
- $M@$(call DEL,$(TESTS))
- $M@$(call DEL,$(SOURCES:.c=.o))
+ @$(call DEL,$(TESTS))
+ @$(call DEL,$(SOURCES:.c=.o))
diff --git a/test/misc/Makefile b/test/misc/Makefile
index dfd937ad3..918316c6c 100644
--- a/test/misc/Makefile
+++ b/test/misc/Makefile
@@ -6,12 +6,10 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
- M := -
S := $(subst /,\,/)
NOT := - # Hack
- DEL = del /f $(subst /,\,$1)
+ DEL = -del /f $(subst /,\,$1)
else
- M :=
S := /
NOT := !
DEL = $(RM) $1
@@ -60,6 +58,6 @@ $(WORKDIR)/cc65141011%prg: cc65141011.c
-$(SIM65) $(SIM65FLAGS) $@
clean:
- $M@$(call DEL,$(TESTS))
- $M@$(call DEL,$(SOURCES:.c=.o))
- $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
+ @$(call DEL,$(TESTS))
+ @$(call DEL,$(SOURCES:.c=.o))
+ @$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
diff --git a/test/ref/Makefile b/test/ref/Makefile
index 83b81f9cc..09dd96d44 100644
--- a/test/ref/Makefile
+++ b/test/ref/Makefile
@@ -7,11 +7,9 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
- M := -
S := $(subst /,\,/)
- DEL = del /f $(subst /,\,$1)
+ DEL = -del /f $(subst /,\,$1)
else
- M :=
S := /
DEL = $(RM) $1
endif
@@ -91,8 +89,8 @@ $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref
$(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref
clean:
- $M@$(call DEL,$(TESTS))
- $M@$(call DEL,$(SOURCES:.c=.o))
- $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
- $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.ref))
- $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.host))
+ @$(call DEL,$(TESTS))
+ @$(call DEL,$(SOURCES:.c=.o))
+ @$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
+ @$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.ref))
+ @$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.host))
diff --git a/test/val/Makefile b/test/val/Makefile
index b82d8fb51..4ad8160ef 100644
--- a/test/val/Makefile
+++ b/test/val/Makefile
@@ -6,10 +6,8 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
- M := -
- DEL = del /f $(subst /,\,$1)
+ DEL = -del /f $(subst /,\,$1)
else
- M :=
DEL = $(RM) $1
endif
@@ -68,5 +66,5 @@ $(WORKDIR)/%.or.prg: %.c
$(SIM65) $(SIM65FLAGS) $@
clean:
- $M@$(call DEL,$(TESTS))
- $M@$(call DEL,$(SOURCES:.c=.o))
+ @$(call DEL,$(TESTS))
+ @$(call DEL,$(SOURCES:.c=.o))