1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-27 15:29:46 +00:00
cc65/test/Makefile
Oliver Schmidt 992f0f03c5 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.
2015-07-10 22:39:53 +02:00

59 lines
1013 B
Makefile

# top-level makefile for the regression tests
# You can comment this special target when you debug the regression tests.
# Then, make will give you more progress reports.
.SILENT:
ifneq ($(shell echo),)
CMD_EXE := 1
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
RMDIR = rmdir $1
endif
WORKDIR := ../testwrk
CC := gcc
.PHONY: all dotests continue mostly-clean clean
all: dotests
$(WORKDIR):
$(call MKDIR,$(WORKDIR))
$(WORKDIR)/bdiff$(EXE): bdiff.c | $(WORKDIR)
$(CC) -O2 -o $@ $<
.NOTPARALLEL:
dotests: mostly-clean continue
continue: $(WORKDIR)/bdiff$(EXE)
@$(MAKE) -C val all
@$(MAKE) -C ref all
@$(MAKE) -C err all
@$(MAKE) -C misc all
mostly-clean:
@$(MAKE) -C val clean
@$(MAKE) -C ref clean
@$(MAKE) -C err clean
@$(MAKE) -C misc clean
clean: mostly-clean
$M@$(call DEL,$(WORKDIR)/bdiff$(EXE))
$M@$(call RMDIR,$(WORKDIR))