summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2017-01-09 10:16:17 +0100
committerTobias Klauser <tklauser@distanz.ch>2017-01-09 10:18:22 +0100
commit7df4b7477a6ac53a6514c1d5f86cbd96929f3602 (patch)
treeee65ef9f8da3ed86d06d8156a10891568af1da8f
parentab7cd2fc90434a899cdf2d4fc9bfa0dd7c71cca0 (diff)
make: don't show echo commands in verbose mode
Avoid echoing the CC/LD string in verbose mode, just show the plain commands: $ make Q= gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o llmnr.o -c llmnr.c gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o iface.o -c iface.c gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o socket.o -c socket.c gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o util.o -c util.c gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o llmnrd.o -c llmnrd.c gcc -o llmnrd llmnr.o iface.o socket.o util.o llmnrd.o -lpthread gcc -W -Wall -DVERSION_STRING=\"v0.2.1\" -DGIT_VERSION=\""(git id v0.2.1-6-gab7cd2fc9043)"\" -O2 -o llmnr-query.o -c llmnr-query.c gcc -o llmnr-query util.o llmnr-query.o Also consider $(Q) for the clean and install targets. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index f0a974a..a0d55bf 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,13 @@ ifeq ($(DEBUG), 1)
endif
Q ?= @
-CCQ = $(Q)echo " CC $<" && $(CC)
-LDQ = $(Q)echo " LD $@" && $(CC)
+ifeq ($(Q),)
+ CCQ = $(CC)
+ LDQ = $(CC)
+else
+ CCQ = $(Q)echo " CC $<" && $(CC)
+ LDQ = $(Q)echo " LD $@" && $(CC)
+endif
prefix ?= /usr/local
@@ -59,20 +64,20 @@ $(Q_P): $(Q_OBJS)
install_$(D_P): $(D_P)
@echo " INSTALL $(D_P)"
- @$(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR)
- @$(INSTALL) -m 755 $(D_P) $(DESTDIR)$(SBINDIR)/$(D_P)
+ $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(SBINDIR)
+ $(Q)$(INSTALL) -m 755 $(D_P) $(DESTDIR)$(SBINDIR)/$(D_P)
install_$(Q_P): $(Q_P)
@echo " INSTALL $(Q_P)"
- @$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
- @$(INSTALL) -m 755 $(Q_P) $(DESTDIR)$(BINDIR)/$(Q_P)
+ $(Q)$(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)
+ $(Q)$(INSTALL) -m 755 $(Q_P) $(DESTDIR)$(BINDIR)/$(Q_P)
install: install_$(D_P) install_$(Q_P)
clean:
@echo " CLEAN"
- @rm -f $(D_OBJS) $(D_P)
- @rm -f $(Q_OBJS) $(Q_P)
+ $(Q)rm -f $(D_OBJS) $(D_P)
+ $(Q)rm -f $(Q_OBJS) $(Q_P)
# Maintainer targets