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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user