From 63611f31e89c1f1dd19f325ec20ca442841e084b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Rullg=C3=A5rd?= Date: Sat, 6 Mar 2010 17:14:19 +0000 Subject: [PATCH] Prettify make output This gives brief messages from make by default. For full command echoing, add V=1 to make command line. Originally committed as revision 22244 to svn://svn.ffmpeg.org/ffmpeg/trunk --- Makefile | 6 +++--- common.mak | 14 +++++++++++++- subdir.mak | 35 +++++++++++++++++++---------------- 3 files changed, 35 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 32f9f5ff92..00cfc481b1 100644 --- a/Makefile +++ b/Makefile @@ -104,15 +104,15 @@ doc/%.1: doc/%.pod install: $(INSTALL_TARGETS-yes) install-progs: $(PROGS) $(INSTALL_PROGS_TARGETS-yes) - mkdir -p "$(BINDIR)" + $(Q)mkdir -p "$(BINDIR)" $(INSTALL) -c -m 755 $(PROGS) "$(BINDIR)" install-data: $(DATA_FILES) - mkdir -p "$(DATADIR)" + $(Q)mkdir -p "$(DATADIR)" $(INSTALL) -m 644 $(DATA_FILES) "$(DATADIR)" install-man: $(MANPAGES) - mkdir -p "$(MANDIR)/man1" + $(Q)mkdir -p "$(MANDIR)/man1" $(INSTALL) -m 644 $(MANPAGES) "$(MANDIR)/man1" uninstall: uninstall-progs uninstall-data uninstall-man diff --git a/common.mak b/common.mak index 5420c7d9fb..c9e862f37a 100644 --- a/common.mak +++ b/common.mak @@ -17,6 +17,18 @@ else BUILD_ROOT_REL = .. endif +ifndef V +Q = @ +ECHO = printf "$(1)\t%s\n" $(2) +BRIEF = CC AS YASM AR LD HOSTCC RANLIB STRIP CP +SILENT = CCDEP ASDEP YASMDEP RM +MSG = $@ +$(foreach VAR,$(BRIEF), \ + $(eval $(VAR) = @$$(call ECHO,$(VAR),$$(MSG)); $($(VAR)))) +$(foreach VAR,$(SILENT),$(eval $(VAR) = @$($(VAR)))) +$(eval INSTALL = @$(call ECHO,INSTALL,$$(^:$(SRC_DIR)/%=%)); $(INSTALL)) +endif + ALLFFLIBS = avcodec avdevice avfilter avformat avutil postproc swscale CPPFLAGS := -DHAVE_AV_CONFIG_H -I$(BUILD_ROOT_REL) -I$(SRC_PATH) $(CPPFLAGS) @@ -36,7 +48,7 @@ CFLAGS += $(ECFLAGS) %$(EXESUF): %.c %.ver: %.v - sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ + $(Q)sed 's/$$MAJOR/$($(basename $(@F))_VERSION_MAJOR)/' $^ > $@ SVN_ENTRIES = $(SRC_PATH_BARE)/.svn/entries ifeq ($(wildcard $(SVN_ENTRIES)),$(SVN_ENTRIES)) diff --git a/subdir.mak b/subdir.mak index 9302722eae..9d818885c8 100644 --- a/subdir.mak +++ b/subdir.mak @@ -23,17 +23,17 @@ THIS_LIB := $(SUBDIR)$($(CONFIG_SHARED:yes=S)LIBNAME) define RULES $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o - $(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) + $$(LD) $(FFLDFLAGS) -o $$@ $$^ -l$(FULLNAME) $(FFEXTRALIBS) $$(ELIBS) $(SUBDIR)%-test.o: $(SUBDIR)%.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $$(CC_O) $$^ + $$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $$(CC_O) $$^ $(SUBDIR)%-test.o: $(SUBDIR)%-test.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $$(CC_O) $$^ + $$(CC) $(CPPFLAGS) $(CFLAGS) -DTEST -c $$(CC_O) $$^ $(SUBDIR)x86/%.o: $(SUBDIR)x86/%.asm - $(YASMDEP) $(YASMFLAGS) -I $$( $$(@:.o=.d) - $(YASM) $(YASMFLAGS) -I $$( $$(@:.o=.d) + $$(YASM) $(YASMFLAGS) -I $$(