1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-07 07:29:33 +00:00

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.
This commit is contained in:
Oliver Schmidt 2015-07-11 00:01:39 +02:00
parent 992f0f03c5
commit 50b0536222
5 changed files with 20 additions and 30 deletions

View File

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

View File

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

View File

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

View File

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

View File

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