From e3abe5acb78f80d70bc8d1a54f756e646c072ffc Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Wed, 18 Sep 2024 18:18:07 +0200 Subject: [PATCH] Enable silent build rules by default Enable silent build rules by default. You can still use verbose build rules by using any of the following methods: * run "configure" with the "--disable-silent-rules" argument * run "make" with the "V=1" argument As this hides build flags, we add new rules which once each print the build flags (_CPPFLAGS, _CFLAGS, _LIBADD, _LDFLAGS) for iolibs, libgphoto2_port.la, camlibs, and libgphoto2.la to help debugging. Not all make recipes have been converted to be completely silent, but the majority are standard recipes which are now silent. --- camlibs/Makefile.am | 13 +++++++++++++ configure.ac | 2 +- doc/Makefile.am | 4 ++-- libgphoto2/Makefile.am | 12 ++++++++++++ libgphoto2_port/Makefile.am | 10 ++++++++++ libgphoto2_port/configure.ac | 2 +- libgphoto2_port/gphoto-m4/gp-gettext-setup.m4 | 11 +++++------ libgphoto2_port/libgphoto2_port/Makefile.am | 12 ++++++++++++ 8 files changed, 56 insertions(+), 10 deletions(-) diff --git a/camlibs/Makefile.am b/camlibs/Makefile.am index 01a289cfa0..f9c313fbb8 100644 --- a/camlibs/Makefile.am +++ b/camlibs/Makefile.am @@ -155,6 +155,19 @@ include tp6801/Makefile-files # End of list of Makefile-files +######################################################################## +# Print build flags for camlibs + +CLEANFILES += camlib-buildflags.stamp +noinst_DATA += camlib-buildflags.stamp +camlib-buildflags.stamp: $(camlib_LTLIBRARIES) + @test -z "$(camlib_cflags)" || printf " %-8s %s\n" CFLAGS "$(camlib_cflags)" + @test -z "$(camlib_cppflags)" || printf " %-8s %s\n" CPPFLAGS "$(camlib_cppflags)" + @test -z "$(camlib_libadd)" || printf " %-8s %s\n" LDADD "$(camlib_libadd)" + @test -z "$(camlib_ldflags)" || printf " %-8s %s\n" LDFLAGS "$(camlib_ldflags)" + @: > $@ + + ######################################################################## # Print list of GP_CAMLIB() definitions suitable for adding to # configure.ac diff --git a/configure.ac b/configure.ac index 090b754851..c180ecc532 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,7 @@ dnl libtool 2014-10-27 2.4.3 dnl libtool 2011-10-18 2.4.2 -AM_SILENT_RULES([no]) +AM_SILENT_RULES([yes]) dnl Flag all GP_ strings in result as error unless specifically allowed. diff --git a/doc/Makefile.am b/doc/Makefile.am index c4d35711a7..83364ed07e 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -25,8 +25,8 @@ LOCAL_CLEAN = # FIXME: Depend on source files. DOXYGEN_STAMPS += $(HTML_APIDOC_DIR).stamp $(HTML_APIDOC_DIR).stamp: Doxyfile - doxygen Doxyfile - echo > $@ + $(AM_V_GEN)doxygen $$($(AM_V_P) || printf "%s" "-q") Doxyfile + @: > $@ $(HTML_APIDOC_DIR).tar.gz: $(HTML_APIDOC_DIR).stamp (cd $(DOXYGEN_OUTPUT_DIR) && $(AMTAR) chof - $(HTML_APIDOC_DIR) | GZIP=--best gzip -c) > $@ diff --git a/libgphoto2/Makefile.am b/libgphoto2/Makefile.am index a3328d56d8..e68c12d0db 100644 --- a/libgphoto2/Makefile.am +++ b/libgphoto2/Makefile.am @@ -1,4 +1,6 @@ +CLEANFILES = EXTRA_DIST = +noinst_DATA = # included by all *.c files containing translated string literals as @@ -91,3 +93,13 @@ libgphoto2_la_SOURCES += gphoto2-setting.c libgphoto2_la_SOURCES += gphoto2-widget.c libgphoto2_la_DEPENDENCIES += $(top_srcdir)/gphoto2/gphoto2-version.h + + +CLEANFILES += libgphoto2-buildflags.stamp +noinst_DATA += libgphoto2-buildflags.stamp +libgphoto2-buildflags.stamp: libgphoto2.la + @test -z "$(libgphoto2_la_CFLAGS)" || printf " %-8s %s\n" CFLAGS "$(libgphoto2_la_CFLAGS)" + @test -z "$(libgphoto2_la_CPPFLAGS)" || printf " %-8s %s\n" CPPFLAGS "$(libgphoto2_la_CPPFLAGS)" + @test -z "$(libgphoto2_la_LDADD)" || printf " %-8s %s\n" LDADD "$(libgphoto2_la_LDADD)" + @test -z "$(libgphoto2_la_LDFLAGS)" || printf " %-8s %s\n" LDFLAGS "$(libgphoto2_la_LDFLAGS)" + @: > $@ diff --git a/libgphoto2_port/Makefile.am b/libgphoto2_port/Makefile.am index 8f783057fb..d524a36b46 100644 --- a/libgphoto2_port/Makefile.am +++ b/libgphoto2_port/Makefile.am @@ -105,3 +105,13 @@ nobase_include_HEADERS = \ EXTRA_DIST += gphoto2/gphoto2-port-library.h EXTRA_DIST += gphoto2/gphoto2-port-locking.h + + +CLEANFILES += iolib-buildflags.stamp +noinst_DATA += iolib-buildflags.stamp +iolib-buildflags.stamp: $(iolib_LTLIBRARIES) + @test -z "$(iolib_cflags)" || printf " %-8s %s\n" CFLAGS "$(iolib_cflags)" + @test -z "$(iolib_cppflags)" || printf " %-8s %s\n" CPPFLAGS "$(iolib_cppflags)" + @test -z "$(iolib_libadd)" || printf " %-8s %s\n" LDADD "$(iolib_libadd)" + @test -z "$(iolib_ldflags)" || printf " %-8s %s\n" LDFLAGS "$(iolib_ldflags)" + @: > $@ diff --git a/libgphoto2_port/configure.ac b/libgphoto2_port/configure.ac index 9dd7fcbaac..4d28a9fad3 100644 --- a/libgphoto2_port/configure.ac +++ b/libgphoto2_port/configure.ac @@ -20,7 +20,7 @@ AM_INIT_AUTOMAKE([ ]) -AM_SILENT_RULES([no]) +AM_SILENT_RULES([yes]) AC_LANG([C]) diff --git a/libgphoto2_port/gphoto-m4/gp-gettext-setup.m4 b/libgphoto2_port/gphoto-m4/gp-gettext-setup.m4 index 49b8c7af26..cf3c42e5bc 100644 --- a/libgphoto2_port/gphoto-m4/gp-gettext-setup.m4 +++ b/libgphoto2_port/gphoto-m4/gp-gettext-setup.m4 @@ -57,21 +57,20 @@ dnl if the consistency check has been successful, and have "make all" abort dnl Error: Inconsistent values for GETTEXT_PACKAGE_LIBGPHOTO2 and po/Makevars DOMAIN. dnl if the consistency check has failed. dnl +m4_pattern_allow([AM_V_P])dnl cat >>${GP_GETTEXT_SETUP_MK} < $@