Permalink
Browse files

Use printf for silent rule printing in makefile

  • Loading branch information...
thp committed Nov 27, 2016
1 parent 315951f commit f5eb7f6c0e6b9e68218b3897f31db52556580d84
Showing with 6 additions and 6 deletions.
  1. +3 −3 makefile
  2. +2 −2 mk/rules.mk
  3. +1 −1 mk/silent.mk
View
@@ -12,15 +12,15 @@ TARGET ?= $(APP)
app: $(TARGET)
$(TARGET): $(OBJECTS) $(LOCAL_LIBS)
$(SILENTMSG) "\tLD\t$@"
$(SILENTMSG) "\tLD\t$@\n"
$(SILENTCMD) $(CXX) -o $@ $^ $(LIBS)
clean: $(ADDITIONAL_CLEAN_TARGETS)
$(SILENTMSG) "\tCLEAN"
$(SILENTMSG) "\tCLEAN\n"
$(SILENTCMD) $(RM) $(CLEAN_FILES)
distclean: clean $(ADDITIONAL_DISTCLEAN_TARGETS)
$(SILENTMSG) "\tDISTCLEAN"
$(SILENTMSG) "\tDISTCLEAN\n"
$(SILENTCMD) $(RM) $(APP) $(GENERATED_MAKEFILES)
$(SILENTCMD) $(RM) $(DISTCLEAN_FILES)
View
@@ -1,7 +1,7 @@
%.mk: %.in
$(SILENTMSG) "\tSED\t$@"
$(SILENTMSG) "\tSED\t$@\n"
$(SILENTCMD) sed -e 's/^\([^( ]*\)(\(.*\))$$/$$(eval $$(call \1,\2))/g' $< >$@ || rm -f $@
%.o: %.cpp
$(SILENTMSG) "\tCXX\t$@"
$(SILENTMSG) "\tCXX\t$@\n"
$(SILENTCMD) $(CXX) $(CXXFLAGS) -c -o $@ $<
View
@@ -2,6 +2,6 @@ ifeq ($(V),1)
SILENTMSG := @true
SILENTCMD :=
else
SILENTMSG := @echo
SILENTMSG := @printf
SILENTCMD := @
endif

0 comments on commit f5eb7f6

Please sign in to comment.