Allow to control test Makefile output via QUIET (like libsrc).

This commit is contained in:
Oliver Schmidt
2017-03-20 11:22:04 +01:00
parent 50174d9860
commit 0851e3d694
8 changed files with 66 additions and 23 deletions

View File

@@ -5,16 +5,25 @@ ifneq ($(shell echo),)
endif
ifdef CMD_EXE
S = $(subst /,\,/)
NOT = - # Hack
NULLDEV = nul:
MKDIR = mkdir $(subst /,\,$1)
RMDIR = -rmdir /s /q $(subst /,\,$1)
else
S = /
NOT = !
NULLDEV = /dev/null
MKDIR = mkdir -p $1
RMDIR = $(RM) -r $1
endif
CC65 := $(if $(wildcard ../../bin/cc65*),../../bin/cc65,cc65)
ifdef QUIET
.SILENT:
NULLERR = 2>$(NULLDEV)
endif
CC65 := $(if $(wildcard ../../bin/cc65*),..$S..$Sbin$Scc65,cc65)
WORKDIR = ../../testwrk/err
@@ -26,7 +35,8 @@ TESTS = $(patsubst %.c,$(WORKDIR)/%.s,$(SOURCES))
all: $(TESTS)
$(WORKDIR)/%.s: %.c
$(NOT) $(CC65) -o $@ $<
$(if $(QUIET),echo err/$*.s)
$(NOT) $(CC65) -o $@ $< $(NULLERR)
clean:
@$(call RMDIR,$(WORKDIR))