From 72689513a3ec3a01ed0b130d3673be19055b6c21 Mon Sep 17 00:00:00 2001 From: "Carlos R. Mafra" Date: Wed, 5 Nov 2008 02:09:10 +0100 Subject: [PATCH] Makefile: Beautify compilation messages This patch adds the --disable-verbose-compile switch to the configure script. When this option is used it reduces the verbosity of compilation messages to the essential. However compiler warnings are not affected and thus gain visibility by not standing in the middle of a storm of other messages. In summary, the compilation messages are reduced to a stream of CC array.o CC bagtree.o CC configuration.o CC connection.o CC data.o [...] instead of a mind-boggling flux of gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src -I/usr/include/freetype2 -I/usr/local/include -DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\" -DDEBUG -fno-strict-aliasing -g -O2 -c array.c gcc -DHAVE_CONFIG_H -I. -I../src -I../WINGs/WINGs -I../wrlib -I../src -I/usr/include/freetype2 -I/usr/local/include -DLOCALEDIR=\"/usr/local/lib/loca\"/usr/local/share/WINGs\" -DDEBUG -fno-strict-aliasing -g -O2 -c bagtree.c [...] --- WINGs/Examples/Makefile.am | 9 +++++++++ WINGs/Extras/Makefile.am | 12 ++++++++++++ WINGs/Makefile.am | 13 +++++++++++++ WINGs/Tests/Makefile.am | 9 +++++++++ WINGs/WINGs/Makefile.am | 8 ++++++++ WPrefs.app/Makefile.am | 10 ++++++++++ WindowMaker/Defaults/Makefile.am | 12 ++++++------ WindowMaker/IconSets/Makefile.am | 8 ++++---- WindowMaker/Makefile.am | 7 +++++++ configure.ac | 15 +++++++++++++++ src/Makefile.am | 10 ++++++++++ test/Makefile.am | 10 ++++++++++ util/Makefile.am | 14 ++++++++++++-- wmlib/Makefile.am | 19 ++++++++++++++++--- wrlib/Makefile.am | 21 ++++++++++++++++++--- wrlib/tests/Makefile.am | 10 ++++++++++ 16 files changed, 169 insertions(+), 18 deletions(-) diff --git a/WINGs/Examples/Makefile.am b/WINGs/Examples/Makefile.am index 4a84abf4..94305bf5 100644 --- a/WINGs/Examples/Makefile.am +++ b/WINGs/Examples/Makefile.am @@ -29,4 +29,13 @@ server_LDADD = $(top_builddir)/WINGs/libWUtil.a @LIBRARY_SEARCH_PATH@ \ INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @HEADER_SEARCH_PATH@ -DDEBUG +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WINGs/Extras/Makefile.am b/WINGs/Extras/Makefile.am index eb96ebfe..db6d083d 100644 --- a/WINGs/Extras/Makefile.am +++ b/WINGs/Extras/Makefile.am @@ -16,6 +16,8 @@ noinst_PROGRAMS = test EXTRA_DIST = +libExtraWINGs_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS) + libExtraWINGs_a_SOURCES = \ wtableview.c \ wtabledelegates.c \ @@ -32,3 +34,13 @@ LDADD= $(top_builddir)/WINGs/libWINGs.a $(top_builddir)/wrlib/libwraster.la \ test_LDADD = wtableview.o wtabledelegates.o $(LDADD) +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WINGs/Makefile.am b/WINGs/Makefile.am index b27ad32f..ba52b083 100644 --- a/WINGs/Makefile.am +++ b/WINGs/Makefile.am @@ -4,7 +4,11 @@ AUTOMAKE_OPTIONS = no-dependencies SUBDIRS = WINGs . po Documentation Resources Examples Extras Tests +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +libWINGs_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS) + +libWUtil_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS) #libWINGs_la_LDFLAGS = -version-info 1:1:0 @@ -127,3 +131,12 @@ install-exec-local: $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \ else :; fi; \ done + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WINGs/Tests/Makefile.am b/WINGs/Tests/Makefile.am index 96842c52..6b5e52d8 100644 --- a/WINGs/Tests/Makefile.am +++ b/WINGs/Tests/Makefile.am @@ -18,5 +18,14 @@ EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png INCLUDES = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \ -DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@ \ -DDEBUG + +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +.c.o: + $(QUIET)$(COMPILE) -c $< +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WINGs/WINGs/Makefile.am b/WINGs/WINGs/Makefile.am index eb725be1..23a12232 100644 --- a/WINGs/WINGs/Makefile.am +++ b/WINGs/WINGs/Makefile.am @@ -7,3 +7,11 @@ includedir = @includedir@/WINGs include_HEADERS = WINGs.h WUtil.h WINGsP.h proplist-compat.h +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WPrefs.app/Makefile.am b/WPrefs.app/Makefile.am index 37269f95..2acf4bd8 100644 --- a/WPrefs.app/Makefile.am +++ b/WPrefs.app/Makefile.am @@ -56,3 +56,13 @@ WPrefs_LDADD = \ @XFTLIBS@ \ @INTLIBS@ +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/WindowMaker/Defaults/Makefile.am b/WindowMaker/Defaults/Makefile.am index e5e057fc..553c7e96 100644 --- a/WindowMaker/Defaults/Makefile.am +++ b/WindowMaker/Defaults/Makefile.am @@ -10,20 +10,20 @@ EXTRA_DIST = WMGLOBAL WMWindowAttributes.in WindowMaker.in WMState.in CLEANFILES = WMWindowAttributes WindowMaker WMState WMWindowAttributes: $(srcdir)/WMWindowAttributes.in - -rm -f WMWindowAttributes - sed -e "s:#extension#:@ICONEXT@:" \ + @-rm -f WMWindowAttributes + @sed -e "s:#extension#:@ICONEXT@:" \ $(srcdir)/WMWindowAttributes.in > WMWindowAttributes chmod 644 WMWindowAttributes WindowMaker: $(srcdir)/WindowMaker.in - -rm -f WindowMaker - sed -e "s:#pkgdatadir#:$(pkgdatadir):" $(srcdir)/WindowMaker.in \ + @-rm -f WindowMaker + @sed -e "s:#pkgdatadir#:$(pkgdatadir):" $(srcdir)/WindowMaker.in \ > WindowMaker chmod 644 WindowMaker WMState: $(srcdir)/WMState.in - -rm -f WMState - sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" $(srcdir)/WMState.in > WMState + @-rm -f WMState + @sed -e "s:#wprefs#:$(wpexecbindir)/WPrefs:" $(srcdir)/WMState.in > WMState chmod 644 WMState WMRootMenu: $(srcdir)/../plmenu diff --git a/WindowMaker/IconSets/Makefile.am b/WindowMaker/IconSets/Makefile.am index ec5ca124..b3d838ce 100644 --- a/WindowMaker/IconSets/Makefile.am +++ b/WindowMaker/IconSets/Makefile.am @@ -8,10 +8,10 @@ EXTRA_DIST = CLEANFILES = Default.iconset Default.iconset: $(top_builddir)/WindowMaker/Defaults/WMWindowAttributes - -rm -f Default.iconset - echo '{' > Default.iconset - grep Icon $(top_builddir)/WindowMaker/Defaults/WMWindowAttributes >> Default.iconset - echo '}' >> Default.iconset + @-rm -f Default.iconset + @echo '{' > Default.iconset + @grep Icon $(top_builddir)/WindowMaker/Defaults/WMWindowAttributes >> Default.iconset + @echo '}' >> Default.iconset chmod 644 Default.iconset diff --git a/WindowMaker/Makefile.am b/WindowMaker/Makefile.am index a7d24f5c..3ecf663e 100644 --- a/WindowMaker/Makefile.am +++ b/WindowMaker/Makefile.am @@ -57,4 +57,11 @@ prefsdata_DATA =\ EXTRA_DIST = $(prefsdata_DATA) mkMakefile +.c.o: + $(QUIET)$(COMPILE) -c $< +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/configure.ac b/configure.ac index 1915335e..4babb567 100644 --- a/configure.ac +++ b/configure.ac @@ -384,6 +384,21 @@ AC_ARG_ENABLE(lite, fi]) +dnl +dnl Beautify compilation messages +dnl --------------------------------------------- +AC_ARG_ENABLE(verbose-compile, AS_HELP_STRING([--disable-verbose-compile], + [Streamline compilation messages (default off)]), + [ + QUIET='@echo CC $@;' + QUIET_AR='@echo AR $@;' + LIBTOOL_ARG="--silent" + AC_SUBST(QUIET) + AC_SUBST(QUIET_AR) + AC_SUBST(LIBTOOL_ARG) +]) + + dnl dnl Networking stuff diff --git a/src/Makefile.am b/src/Makefile.am index 2e720375..fe326c69 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -134,3 +134,13 @@ wmaker_LDADD = \ # @INTLIBS@ \ # @DLLIBS@ +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/test/Makefile.am b/test/Makefile.am index f57584f4..a0db7bb1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -13,3 +13,13 @@ wtest_LDADD = $(top_builddir)/wmlib/libWMaker.a @XLFLAGS@ @XLIBS@ INCLUDES = -g -D_BSD_SOURCE @XCFLAGS@ -I$(top_srcdir)/wmlib +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/util/Makefile.am b/util/Makefile.am index c32327dd..2a080e9b 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -60,8 +60,8 @@ wmsetbg_LDADD = \ CLEANFILES = wmaker.inst wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile - -rm -f wmaker.inst - sed -e "s|#pkgdatadir#|$(pkgdatadir)|" \ + @-rm -f wmaker.inst + @sed -e "s|#pkgdatadir#|$(pkgdatadir)|" \ -e "s|#sysconfdir#|$(sysconfdir)/WindowMaker|" \ -e "s|#version#|$(VERSION)|" \ -e "s|#bindir#|$(bindir)|" \ @@ -69,4 +69,14 @@ wmaker.inst: $(srcdir)/wmaker.inst.in ./Makefile $(srcdir)/wmaker.inst.in >wmaker.inst chmod 755 wmaker.inst + +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/wmlib/Makefile.am b/wmlib/Makefile.am index 34cc11e0..9ad216fd 100644 --- a/wmlib/Makefile.am +++ b/wmlib/Makefile.am @@ -7,6 +7,8 @@ include_HEADERS = WMaker.h INCLUDES = $(DFLAGS) @XCFLAGS@ +libWMaker_a_AR = $(QUIET_AR) $(AR) $(ARFLAGS) + libWMaker_a_SOURCES = \ menu.c \ app.c \ @@ -19,10 +21,21 @@ DISTCLEANFILES = wmlib.pc install-exec-local: @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig + @$(mkinstalldirs) $(DESTDIR)$(libdir)/pkgconfig @list='wmlib.pc'; for p in $$list; do \ if test -f $$p; then \ - echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \ - $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \ + @echo "$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/"; \ + @$(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \ else :; fi; \ done + +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $< diff --git a/wrlib/Makefile.am b/wrlib/Makefile.am index f7a3428e..e644cedb 100644 --- a/wrlib/Makefile.am +++ b/wrlib/Makefile.am @@ -8,6 +8,8 @@ lib_LTLIBRARIES = libwraster.la libwraster_la_LDFLAGS = -version-info 4:0:1 +LIBTOOL = $(QUIET) $(SHELL) $(top_srcdir)/libtool $(LIBTOOL_ARG) + bin_SCRIPTS = get-wraster-flags include_HEADERS = wraster.h @@ -43,15 +45,26 @@ libwraster_la_SOURCES = \ gif.c -LTCOMPILE2=`echo $(LTCOMPILE) | sed -e s/-fomit-frame-pointer//` +.c: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +# This is the same as LTCOMPILE but without LIBTOOL +LTCOMPILE1= --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + +LTCOMPILE2=`echo $(LTCOMPILE1) | sed -e s/-fomit-frame-pointer//` COMPILE2=`echo $(COMPILE) | sed -e s/-fomit-frame-pointer//` # cant compile asm stuff with optimizations x86_specific.lo: x86_specific.c - $(LTCOMPILE2) -O0 -c $< + $(LIBTOOL) $(LTCOMPILE2) -O0 -c $< x86_specific.o: x86_specific.c - $(COMPILE2) -O0 -c $< + $(QUIET)$(COMPILE2) -O0 -c $< INCLUDES = $(DFLAGS) @HEADER_SEARCH_PATH@ @@ -69,3 +82,5 @@ install-exec-local: $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/pkgconfig/; \ else :; fi; \ done + + diff --git a/wrlib/tests/Makefile.am b/wrlib/tests/Makefile.am index 0ed8e8ac..07b6a697 100644 --- a/wrlib/tests/Makefile.am +++ b/wrlib/tests/Makefile.am @@ -10,6 +10,8 @@ INCLUDES = -I$(srcdir)/.. $(DFLAGS) @HEADER_SEARCH_PATH@ LIBLIST = $(top_builddir)/wrlib/libwraster.la +LIBTOOL = $(QUIET)$(top_srcdir)/libtool --silent + testdraw_SOURCES = testdraw.c testdraw_LDADD = $(LIBLIST) @@ -22,3 +24,11 @@ testrot_LDADD = $(LIBLIST) view_SOURCES= view.c view_LDADD = $(LIBLIST) +.c.o: + $(QUIET)$(COMPILE) -c $< + +.c.obj: + $(QUIET)$(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + $(QUIET)$(LTCOMPILE) -c -o $@ $<