Skip to content

Commit

Permalink
Enable silent build rules by default
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ndim committed Sep 19, 2024
1 parent 6df6fbb commit 154bc3e
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 10 deletions.
13 changes: 13 additions & 0 deletions camlibs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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" LIBADD "$(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
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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) > $@
Expand Down
12 changes: 12 additions & 0 deletions libgphoto2/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CLEANFILES =
EXTRA_DIST =
noinst_DATA =


# included by all *.c files containing translated string literals as
Expand Down Expand Up @@ -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_LIBADD)" || printf " %-8s %s\n" LIBADD "$(libgphoto2_la_LIBADD)"
@test -z "$(libgphoto2_la_LDFLAGS)" || printf " %-8s %s\n" LDFLAGS "$(libgphoto2_la_LDFLAGS)"
@: > $@
10 changes: 10 additions & 0 deletions libgphoto2_port/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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" LIBADD "$(iolib_libadd)"
@test -z "$(iolib_ldflags)" || printf " %-8s %s\n" LDFLAGS "$(iolib_ldflags)"
@: > $@
2 changes: 1 addition & 1 deletion libgphoto2_port/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ AM_INIT_AUTOMAKE([
])


AM_SILENT_RULES([no])
AM_SILENT_RULES([yes])


AC_LANG([C])
Expand Down
11 changes: 5 additions & 6 deletions libgphoto2_port/gphoto-m4/gp-gettext-setup.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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} <<EOF
@set -ex; \\
@set -e; \\
MAKEVARS_FILE="\$\$(test -f '$3/Makevars' || echo '\$(srcdir)/')$3/Makevars"; \\
MAKEVARS_DOMAIN="\$\$(\$(SED) -n 's/^DOMAIN \\{0,\\}= \\{0,\\}//p' "\$\$MAKEVARS_FILE")"; \\
MAKE_TIME_DOMAIN="\$($1)"; \\
echo " MAKEVARS_DOMAIN=\$\$MAKEVARS_DOMAIN"; \\
echo " $1=\$($1)"; \\
if test "x\$\$MAKEVARS_DOMAIN" = "x\$($1)"; then \\
echo "Good: Matching gettext domain values (\$($1))"; \\
if \$(AM_V_P); then printf " %-7s %s\n" CHECK "Good: Matching gettext domain values (\$($1))"; fi; \\
true; \\
elif test "x\$\$USE_NLS" = xyes; then \\
echo "Error: Mismatching gettext domain values (\$($1) vs \$\${MAKEVARS_DOMAIN})"; \\
printf " %-7s %s\n" CHECK "Error: Mismatching gettext domain values (\$($1) vs \$\${MAKEVARS_DOMAIN})"; \\
false; \\
else \\
echo "Warning: Mismatching gettext domain values (\$($1) vs \$\${MAKEVARS_DOMAIN})"; \\
printf " %-7s %s\n" CHECK "Warning: Mismatching gettext domain values (\$($1) vs \$\${MAKEVARS_DOMAIN})"; \\
true; \\
fi
EOF
Expand Down
12 changes: 12 additions & 0 deletions libgphoto2_port/libgphoto2_port/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
CLEANFILES =
EXTRA_DIST =
noinst_DATA =


# included by all *.c files containing translated string literals as
Expand Down Expand Up @@ -76,3 +78,13 @@ libgphoto2_port_la_SOURCES += gphoto2-port-result.c
libgphoto2_port_la_DEPENDENCIES += $(top_srcdir)/gphoto2/gphoto2-port-locking.h
libgphoto2_port_la_DEPENDENCIES += $(top_srcdir)/gphoto2/gphoto2-port-version.h
libgphoto2_port_la_DEPENDENCIES += $(top_srcdir)/gphoto2/gphoto2-port-library.h


CLEANFILES += libgphoto2_port-buildflags.stamp
noinst_DATA += libgphoto2_port-buildflags.stamp
libgphoto2_port-buildflags.stamp: libgphoto2_port.la
@test -z "$(libgphoto2_port_la_CFLAGS)" || printf " %-8s %s\n" CFLAGS "$(libgphoto2_port_la_CFLAGS)"
@test -z "$(libgphoto2_port_la_CPPFLAGS)" || printf " %-8s %s\n" CPPFLAGS "$(libgphoto2_port_la_CPPFLAGS)"
@test -z "$(libgphoto2_port_la_LIBADD)" || printf " %-8s %s\n" LIBADD "$(libgphoto2_port_la_LIBADD)"
@test -z "$(libgphoto2_port_la_LDFLAGS)" || printf " %-8s %s\n" LDFLAGS "$(libgphoto2_port_la_LDFLAGS)"
@: > $@

0 comments on commit 154bc3e

Please sign in to comment.