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