rules.mk: When V=1 is used, add -v to autotests.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson
2015-08-23 02:32:29 +02:00
parent 407e954f02
commit 3e337c7078
+4 -1
View File
@@ -18,11 +18,13 @@ Q =
PRINT = @true
REDIRECT =
MAKEFLAGS =
VERBOSE = -v
else
Q = @
PRINT = @printf
REDIRECT = >/dev/null
MAKEFLAGS = --no-print-directory --silent
VERBOSE =
endif
# Some tests may need to be run as root, e.g. pidfile()
@@ -51,7 +53,8 @@ incdir ?= $(prefix)/include
%.test: %.c
$(PRINT) " TEST $(subst $(ROOTDIR)/,,$(shell pwd)/)$(@:.test=)\n"
$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -g -o $@ -DUNITTEST $< $(OBJS)
$(Q)$(SUDO) ./$@ $(REDIRECT)
$(Q)$(RM) $(OBJS)
$(Q)$(SUDO) ./$@ $(VERBOSE) $(REDIRECT)
# Default build rules for both main and unit test makefiles