From: Andre Noll Date: Wed, 7 Oct 2009 01:15:56 +0000 (+0200) Subject: Makefile.in: Introduce quiet mode and use it by default. X-Git-Tag: v0.4.0~11 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=3e7e85f851a019c7a0ad8e5ccbd53909a93ace8e;p=paraslash.git Makefile.in: Introduce quiet mode and use it by default. Verbose mode can be chosen via "make V=1". --- diff --git a/Makefile.in b/Makefile.in index f184546b..6794efed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -69,6 +69,7 @@ man_pages_in := $(patsubst %, web/%.man.in.html, $(man_binaries)) ggo_dir := ggo object_dir := objects +man_dir := man/man1 m4_ggos := afh audioc audiod client filter gui recv server write all_ggos := $(m4_ggos) dccp_recv oggdec_filter alsa_write oss_write fade http_recv \ @@ -85,6 +86,22 @@ tarball_delete := $(addprefix $(tarball_pfx)/,\ $(ggo_dir) skencil) tarball := @PACKAGE_TARNAME@-$(PACKAGE_VERSION).tar.bz2 +# To put more focus on warnings, be less verbose as default +# Use 'make V=1' to see the full commands +ifdef V + ifeq ("$(origin V)", "command line") + BUILD_VERBOSE = $(V) + endif +endif +ifndef BUILD_VERBOSE + BUILD_VERBOSE = 0 +endif +ifeq ($(BUILD_VERBOSE),1) + Q = +else + Q = @ +endif + .PHONY: all clean distclean maintainer-clean install man tarball\ .FORCE-GIT-VERSION-FILE all: $(BINARIES) $(man_pages) @@ -99,68 +116,88 @@ $(BINARIES): GIT-VERSION-FILE -include $(ggo_dir)/makefile %_command_list.c: %.cmd - ./command_util.sh c < $< >$@ + @[ -z "$(Q)" ] || echo 'GEN $@' + $(Q) ./command_util.sh c < $< >$@ %_command_list.h: %.cmd - ./command_util.sh h < $< >$@ + @[ -z "$(Q)" ] || echo 'GEN $@' + $(Q) ./command_util.sh h < $< >$@ %_command_list.man: %.cmd - ./command_util.sh man < $< > $@ + @[ -z "$(Q)" ] || echo 'GEN $@' + $(Q) ./command_util.sh man < $< > $@ server_command_lists_ch = server_command_list.c afs_command_list.c \ server_command_list.h afs_command_list.h server_command_lists_man = server_command_list.man afs_command_list.man -man/man1/para_server.1: para_server $(server_command_lists_man) - mkdir -p man/man1 - opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ +man/man1/para_server.1: para_server $(server_command_lists_man) | $(man_dir) + @[ -z "$(Q)" ] || echo 'HELP2MAN $<' + $(Q) opts="-h --detailed-help -N `for i in $(server_command_lists_man); do printf "%s\n" "-i $$i"; done`"; \ help2man $$opts ./para_server > $@ -man/man1/para_audiod.1: para_audiod audiod_command_list.man - mkdir -p man/man1 - help2man -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ +man/man1/para_audiod.1: para_audiod audiod_command_list.man | $(man_dir) + @[ -z "$(Q)" ] || echo 'HELP2MAN $<' + $(Q) help2man -h --detailed-help -N -i audiod_command_list.man ./para_audiod > $@ -man/man1/%.1: % - mkdir -p man/man1 - help2man -h --detailed-help -N ./$< > $@ +man/man1/%.1: % | $(man_dir) + @[ -z "$(Q)" ] || echo 'HELP2MAN $<' + $(Q) help2man -h --detailed-help -N ./$< > $@ man/html/%.html: man/man1/%.1 - mkdir -p man/html - man2html $< > $@ + @[ -z "$(Q)" ] || echo 'MAN2HTML $<' + $(Q) mkdir -p man/html + $(Q) man2html $< > $@ web/%.man.in.html: man/man1/%.1 - man2html $< | sed -e '/^<\/BODY>/,$$d' -e '1,/<\/HEAD>/d' > $@ + @[ -z "$(Q)" ] || echo 'MAN2HTML $<' + $(Q) mkdir -p man/html + $(Q) man2html $< | sed -e '/^<\/BODY>/,$$d' -e '1,/<\/HEAD>/d' > $@ $(object_dir): mkdir -p $@ +$(man_dir): + mkdir -p $@ $(object_dir)/oggdec_filter.o: oggdec_filter.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< $(object_dir)/ogg_afh.o: ogg_afh.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @oggvorbis_cppflags@ $< $(object_dir)/mp3dec_filter.o: mp3dec_filter.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @mad_cppflags@ $< $(object_dir)/aacdec_filter.o: aacdec_filter.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< $(object_dir)/aac_common.o: aac_common.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< $(object_dir)/aac_afh.o: aac_afh.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) @faad_cppflags@ $< $(object_dir)/%.cmdline.o: $(cmdline_dir)/%.cmdline.c $(cmdline_dir)/%.cmdline.h | $(object_dir) - $(CC) -c $(CPPFLAGS) -o $@ $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c $(CPPFLAGS) -o $@ $< $(object_dir)/%.o: %.c | $(object_dir) - $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $< + @[ -z "$(Q)" ] || echo 'CC $<' + $(Q) $(CC) -c -o $@ $(CPPFLAGS) $(DEBUG_CPPFLAGS) $< # We depend on the *.cmdline.[ch] files as these must be present for depend.sh # to work. The first dependency is explititly given as it is used by $<. + $(object_dir)/%.cmdline.d: %.cmdline.c $(cmdline_generated) | $(object_dir) - ./depend.sh $(object_dir) $(CPPFLAGS) $< > $@ + @[ -z "$(Q)" ] || echo 'DEP $<' + $(Q) ./depend.sh $(object_dir) $(CPPFLAGS) $< > $@ + $(object_dir)/%.d: %.c $(cmdline_generated) | $(object_dir) - ./depend.sh $(object_dir) $(CPPFLAGS) $< > $@ + @[ -z "$(Q)" ] || echo 'DEP $<' + $(Q) ./depend.sh $(object_dir) $(CPPFLAGS) $< > $@ recv_objs := $(addprefix $(object_dir)/, @recv_objs@) filter_objs := $(addprefix $(object_dir)/, @filter_objs@) @@ -179,46 +216,59 @@ all_objs := $(recv_objs) $(filter_objs) $(client_objs) $(gui_objs) \ -include $(all_objs:.o=.d) para_recv: $(recv_objs) - $(CC) $(LDFLAGS) $(recv_objs) -o $@ @recv_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) $(recv_objs) -o $@ @recv_ldflags@ para_filter: $(filter_objs) - $(CC) $(LDFLAGS) $(filter_objs) -o $@ @filter_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) $(filter_objs) -o $@ @filter_ldflags@ para_client: $(client_objs) - $(CC) $(LDFLAGS) -o $@ $(client_objs) @client_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(client_objs) @client_ldflags@ para_gui: $(gui_objs) - $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lncurses + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(gui_objs) -lncurses para_audiod: audiod_command_list.c audiod_command_list.h $(audiod_objs) - $(CC) $(LDFLAGS) -o $@ $(audiod_objs) @audiod_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(audiod_objs) @audiod_ldflags@ para_audioc: $(audioc_objs) - $(CC) $(LDFLAGS) -o $@ $(audioc_objs) @audioc_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(audioc_objs) @audioc_ldflags@ para_fade: $(fade_objs) - $(CC) $(LDFLAGS) -o $@ $(fade_objs) @fade_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(fade_objs) @fade_ldflags@ para_server: $(server_command_lists_ch) $(server_objs) - $(CC) $(LDFLAGS) -o $@ $(server_objs) @server_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(server_objs) @server_ldflags@ para_write: $(write_objs) - $(CC) $(LDFLAGS) -o $@ $(write_objs) @write_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(write_objs) @write_ldflags@ para_afh: $(afh_objs) - $(CC) $(LDFLAGS) -o $@ $(afh_objs) @afh_ldflags@ + @[ -z "$(Q)" ] || echo 'LD $@' + $(Q) $(CC) $(LDFLAGS) -o $@ $(afh_objs) @afh_ldflags@ clean: - rm -f $(BINARIES) $(object_dir)/*.o + @[ -z "$(Q)" ] || echo 'CLEAN' + $(Q) rm -f $(BINARIES) $(object_dir)/*.o clean2: clean - rm -rf man $(object_dir) - rm -f *_command_list.* + @[ -z "$(Q)" ] || echo 'CLEAN2' + $(Q) rm -rf man $(object_dir) + $(Q) rm -f *_command_list.* distclean: clean2 - rm -f Makefile autoscan.log config.status config.log && \ - rm -rf autom4te.cache aclocal.m4 - rm -f GPATH GRTAGS GSYMS GTAGS + @[ -z "$(Q)" ] || echo 'DISTCLEAN' + $(Q) rm -f Makefile autoscan.log config.status config.log + $(Q) rm -rf autom4te.cache aclocal.m4 + $(Q) rm -f GPATH GRTAGS GSYMS GTAGS maintainer-clean: distclean rm -f $(ggo_generated) *.tar.bz2 \ diff --git a/ggo/makefile b/ggo/makefile index 4d40edda..d7bfc4fb 100644 --- a/ggo/makefile +++ b/ggo/makefile @@ -3,7 +3,8 @@ $(cmdline_dir): mkdir -p $(cmdline_dir) $(cmdline_dir)/%_recv.cmdline.h $(cmdline_dir)/%_recv.cmdline.c: $(ggo_dir)/%_recv.ggo | $(cmdline_dir) - gengetopt $(module_ggo_opts) \ + @[ -z "$(Q)" ] || echo 'GGO $<' + $(Q) gengetopt $(module_ggo_opts) \ --output-dir=$(cmdline_dir) \ --set-package=$(subst .ggo,,$( $(@F) + @[ -z "$(Q)" ] || echo 'M4 $<' + $(Q) cd $(ggo_dir); m4 $( $(@F)