mirror of
https://github.com/cc65/cc65.git
synced 2025-01-10 19:29:45 +00:00
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.
This commit is contained in:
parent
bdb01212c2
commit
992f0f03c5
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user