From 260f2cf0cb7b724c9ca3f662529e7b6bbb9cbbb6 Mon Sep 17 00:00:00 2001 From: Jasmin Jessich Date: Thu, 25 May 2017 22:21:13 +0200 Subject: Improve Makefile printing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added global.mk with common makefile print macros. Use VERBOSE=1 on the command line to show executed commands. - Removed recursion printing of make. - Suppress “nothing to be done for 'all'” message from make. - gen_version_suffix.h is now always created. --- pages/Makefile | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'pages') diff --git a/pages/Makefile b/pages/Makefile index 018f256..ae0710e 100644 --- a/pages/Makefile +++ b/pages/Makefile @@ -20,16 +20,21 @@ SRCS := $(patsubst %.o,%.cpp,$(OBJS)) ESRCS := $(patsubst %.o,%.ecpp,$(OBJS)) ESRCS_DEPS := $(patsubst %.o,.%.edep,$(OBJS)) +include ../global.mk + ### The main target: all: libpages.a + @true ### Implicit rules: %.o: %.cpp - $(CXX) $(CXXFLAGS) $(TNTFLAGS) -c $(DEFINES) $(PLUGINFEATURES) $(INCLUDES) $< + $(call PRETTY_PRINT,"CC pages/" $@) + $(Q)$(CXX) $(CXXFLAGS) $(TNTFLAGS) -c $(DEFINES) $(PLUGINFEATURES) $(INCLUDES) $< %.cpp: %.ecpp - $(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< + $(call PRETTY_PRINT,"ECPP pages/" $@) + $(Q)$(ECPPC) $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< .%.edep: %.ecpp @$(ECPPC) -M $(ECPPFLAGS) $(ECPPFLAGS_CPP) $< > $@ @@ -47,9 +52,11 @@ endif ### Targets: libpages.a: $(OBJS) - $(AR) r $@ $^ + $(call PRETTY_PRINT,"AR pages/" $@) + $(Q)$(AR) r $@ $^ $(AR_NUL) clean: + $(call PRETTY_PRINT,"CLN pages/") @rm -f *~ *.o core* libpages.a $(SRCS) $(DEPFILE) $(ESRCS_DEPS) dist: clean -- cgit v1.2.3