1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-26 05:29:30 +00:00

Avoid "*** Recursive variable `RM' references itself (eventually)."

This commit is contained in:
Oliver Schmidt 2015-06-27 00:33:24 +02:00
parent 9c3c886da3
commit 5a7ba692f5
5 changed files with 24 additions and 24 deletions

View File

@ -11,12 +11,12 @@ endif
ifdef CMD_EXE ifdef CMD_EXE
EXE := .exe EXE := .exe
RM = del /f $(subst /,\,$1) DEL = del /f $(subst /,\,$1)
MKDIR = mkdir $(subst /,\,$1) MKDIR = mkdir $(subst /,\,$1)
RMDIR = rmdir /s /q $(subst /,\,$1) RMDIR = rmdir /s /q $(subst /,\,$1)
else else
EXE := EXE :=
RM = $(RM) $1 DEL = $(RM) $1
MKDIR = mkdir $1 MKDIR = mkdir $1
RMDIR = rmdir $1 RMDIR = rmdir $1
endif endif
@ -52,5 +52,5 @@ mostly-clean:
@$(MAKE) -C misc clean @$(MAKE) -C misc clean
clean: mostly-clean clean: mostly-clean
-@$(call RM,$(WORKDIR)/bdiff$(EXE)) -@$(call DEL,$(WORKDIR)/bdiff$(EXE))
-$(call RMDIR,$(WORKDIR)) -@$(call RMDIR,$(WORKDIR))

View File

@ -7,10 +7,10 @@ endif
ifdef CMD_EXE ifdef CMD_EXE
NOT := - # Hack NOT := - # Hack
RM = del /f $(subst /,\,$1) DEL = del /f $(subst /,\,$1)
else else
NOT := ! NOT := !
RM = $(RM) $1 DEL = $(RM) $1
endif endif
CC65FLAGS := -t sim6502 CC65FLAGS := -t sim6502
@ -44,5 +44,5 @@ $(WORKDIR)/%.or.prg: %.c
$(NOT) $(CL65) -Or $(CC65FLAGS) $< -o $@ $(NOT) $(CL65) -Or $(CC65FLAGS) $< -o $@
clean: clean:
-@$(call RM,$(TESTS)) -@$(call DEL,$(TESTS))
-@$(call RM,$(SOURCES:.c=.o)) -@$(call DEL,$(SOURCES:.c=.o))

View File

@ -8,11 +8,11 @@ endif
ifdef CMD_EXE ifdef CMD_EXE
S := $(subst /,\,/) S := $(subst /,\,/)
NOT := - # Hack NOT := - # Hack
RM = del /f $(subst /,\,$1) DEL = del /f $(subst /,\,$1)
else else
S := / S := /
NOT := ! NOT := !
RM = $(RM) $1 DEL = $(RM) $1
endif endif
CC65FLAGS := -t sim6502 CC65FLAGS := -t sim6502
@ -54,6 +54,6 @@ $(WORKDIR)/sitest%prg: sitest.c
# -$(SIM65) $(SIM65FLAGS) $@ # -$(SIM65) $(SIM65FLAGS) $@
clean: clean:
-@$(call RM,$(TESTS)) -@$(call DEL,$(TESTS))
-@$(call RM,$(SOURCES:.c=.o)) -@$(call DEL,$(SOURCES:.c=.o))
-@$(call RM,$(SOURCES:%.c=$(WORKDIR)/%.out)) -@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))

View File

@ -8,10 +8,10 @@ endif
ifdef CMD_EXE ifdef CMD_EXE
S := $(subst /,\,/) S := $(subst /,\,/)
RM = del /f $(subst /,\,$1) DEL = del /f $(subst /,\,$1)
else else
S := / S := /
RM = $(RM) $1 DEL = $(RM) $1
endif endif
CC65FLAGS := -t sim6502 CC65FLAGS := -t sim6502
@ -93,8 +93,8 @@ $(WORKDIR)/%.or.prg: %.c $(WORKDIR)/%.ref
$(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref $(DIFF) $(WORKDIR)/$*.out $(WORKDIR)/$*.ref
clean: clean:
-@$(call RM,$(TESTS)) -@$(call DEL,$(TESTS))
-@$(call RM,$(SOURCES:.c=.o)) -@$(call DEL,$(SOURCES:.c=.o))
-@$(call RM,$(SOURCES:%.c=$(WORKDIR)/%.out)) -@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.out))
-@$(call RM,$(SOURCES:%.c=$(WORKDIR)/%.ref)) -@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.ref))
-@$(call RM,$(SOURCES:%.c=$(WORKDIR)/%.host)) -@$(call DEL,$(SOURCES:%.c=$(WORKDIR)/%.host))

View File

@ -6,9 +6,9 @@ ifneq ($(shell echo),)
endif endif
ifdef CMD_EXE ifdef CMD_EXE
RM = del /f $(subst /,\,$1) DEL = del /f $(subst /,\,$1)
else else
RM = $(RM) $1 DEL = $(RM) $1
endif endif
CC65FLAGS := -t sim6502 CC65FLAGS := -t sim6502
@ -66,5 +66,5 @@ $(WORKDIR)/%.or.prg: %.c
$(SIM65) $(SIM65FLAGS) $@ $(SIM65) $(SIM65FLAGS) $@
clean: clean:
-@$(call RM,$(TESTS)) -@$(call DEL,$(TESTS))
-@$(call RM,$(SOURCES:.c=.o)) -@$(call DEL,$(SOURCES:.c=.o))