From: Oliver Schmidt
Date: Fri, 10 Jul 2015 20:39:33 +0000 (+0200)
Subject: Ignore return values only with CMD.EXE.
X-Git-Tag: V2.16~254
X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=992f0f03c5706fb91e60a8ebbcf5de2c79af68e9;p=cc65
Ignore return values only with CMD.EXE.
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 8c005a957..95c9a9194 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -10,11 +10,13 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
+ M := -
EXE := .exe
DEL = del /f $(subst /,\,$1)
MKDIR = mkdir $(subst /,\,$1)
RMDIR = rmdir /s /q $(subst /,\,$1)
else
+ M :=
EXE :=
DEL = $(RM) $1
MKDIR = mkdir $1
@@ -52,5 +54,5 @@ mostly-clean:
@$(MAKE) -C misc clean
clean: mostly-clean
- -@$(call DEL,$(WORKDIR)/bdiff$(EXE))
- -@$(call RMDIR,$(WORKDIR))
+ $M@$(call DEL,$(WORKDIR)/bdiff$(EXE))
+ $M@$(call RMDIR,$(WORKDIR))
diff --git a/test/err/Makefile b/test/err/Makefile
index ff927ada0..6ac457114 100644
--- a/test/err/Makefile
+++ b/test/err/Makefile
@@ -6,9 +6,11 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
+ M := -
NOT := - # Hack
DEL = del /f $(subst /,\,$1)
else
+ M :=
NOT := !
DEL = $(RM) $1
endif
@@ -44,5 +46,5 @@ $(WORKDIR)/%.or.prg: %.c
$(NOT) $(CL65) -Or $(CC65FLAGS) $< -o $@
clean:
- -@$(call DEL,$(TESTS))
- -@$(call DEL,$(SOURCES:.c=.o))
+ $M@$(call DEL,$(TESTS))
+ $M@$(call DEL,$(SOURCES:.c=.o))
diff --git a/test/misc/Makefile b/test/misc/Makefile
index ca4870663..dfd937ad3 100644
--- a/test/misc/Makefile
+++ b/test/misc/Makefile
@@ -6,10 +6,12 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
+ M := -
S := $(subst /,\,/)
NOT := - # Hack
DEL = del /f $(subst /,\,$1)
else
+ M :=
S := /
NOT := !
DEL = $(RM) $1
@@ -58,6 +60,6 @@ $(WORKDIR)/cc65141011%prg: cc65141011.c
-$(SIM65) $(SIM65FLAGS) $@
clean:
- -@$(call DEL,$(TESTS))
- -@$(call DEL,$(SOURCES:.c=.o))
- -@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
+ $M@$(call DEL,$(TESTS))
+ $M@$(call DEL,$(SOURCES:.c=.o))
+ $M@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
diff --git a/test/ref/Makefile b/test/ref/Makefile
index 14d78c37c..83b81f9cc 100644
--- a/test/ref/Makefile
+++ b/test/ref/Makefile
@@ -7,9 +7,11 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
+ M := -
S := $(subst /,\,/)
DEL = del /f $(subst /,\,$1)
else
+ M :=
S := /
DEL = $(RM) $1
endif
@@ -89,8 +91,8 @@ $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref
$(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref
clean:
- -@$(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))
+ $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))
diff --git a/test/val/Makefile b/test/val/Makefile
index 4de47c6b5..b82d8fb51 100644
--- a/test/val/Makefile
+++ b/test/val/Makefile
@@ -6,8 +6,10 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
+ M := -
DEL = del /f $(subst /,\,$1)
else
+ M :=
DEL = $(RM) $1
endif
@@ -66,5 +68,5 @@ $(WORKDIR)/%.or.prg: %.c
$(SIM65) $(SIM65FLAGS) $@
clean:
- -@$(call DEL,$(TESTS))
- -@$(call DEL,$(SOURCES:.c=.o))
+ $M@$(call DEL,$(TESTS))
+ $M@$(call DEL,$(SOURCES:.c=.o))