Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable silent build rules by default #1021

Merged
merged 2 commits into from
Sep 20, 2024
Merged

Conversation

ndim
Copy link
Member

@ndim ndim commented Sep 18, 2024

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

This hides the compiler command line which makes debugging users'
problems more difficult. To compensate for that, this prints the
build flags separately, but a lot less frequently:

For each part of the build (libgphoto2_port.la, iolibs,
libgphoto2.la, camlibs), if something of that part has been
rebuilt, prints the build flags (_CPPFLAGS, _CFLAGS, _LIBADD,
_LDFLAGS) once.

Always prints the environment variables CPPFLAGS CFLAGS LDADD
LIBADD LDFLAGS once, whether they are the defaults the configure
script sets or given on the make command line.

Not all make recipes have been converted to be completely silent,
but the majority (especially the Automake standard recipes) are
now silent.

@axxel
Copy link
Contributor

axxel commented Sep 18, 2024

If configured with "--enable-silent-rules" (before this PR) I get the following output from a "clean" make -s:

Making all in libgphoto2_port
Making all in po
Making all in libgphoto2_port
Making all in .
++ test -f po/Makevars
+ MAKEVARS_FILE=po/Makevars
++ /usr/bin/sed -n 's/^DOMAIN \{0,\}= \{0,\}//p' po/Makevars
+ MAKEVARS_DOMAIN=libgphoto2_port-12
+ MAKE_TIME_DOMAIN=libgphoto2_port-12
+ echo '  MAKEVARS_DOMAIN=libgphoto2_port-12'
  MAKEVARS_DOMAIN=libgphoto2_port-12
+ echo '  GETTEXT_PACKAGE_LIBGPHOTO2_PORT=libgphoto2_port-12'
  GETTEXT_PACKAGE_LIBGPHOTO2_PORT=libgphoto2_port-12
+ test xlibgphoto2_port-12 = xlibgphoto2_port-12
+ echo 'Good: Matching gettext domain values (libgphoto2_port-12)'
Good: Matching gettext domain values (libgphoto2_port-12)
+ true
Making all in tests
Making all in doc
Dummy target all-local.
Making all in libgphoto2
Making all in camlibs
Making all in .
Making all in canon/doc
Dummy target all-local.
Making all in tests
Making all in examples
Making all in po
Making all in packaging
Making all in generic
Making all in doc
Making all in api
Dummy target all-local.
++ test -f po/Makevars
+ MAKEVARS_FILE=po/Makevars
++ /usr/bin/sed -n 's/^DOMAIN \{0,\}= \{0,\}//p' po/Makevars
+ MAKEVARS_DOMAIN=libgphoto2-6
+ MAKE_TIME_DOMAIN=libgphoto2-6
+ echo '  MAKEVARS_DOMAIN=libgphoto2-6'
  MAKEVARS_DOMAIN=libgphoto2-6
+ echo '  GETTEXT_PACKAGE_LIBGPHOTO2=libgphoto2-6'
  GETTEXT_PACKAGE_LIBGPHOTO2=libgphoto2-6
+ test xlibgphoto2-6 = xlibgphoto2-6
+ echo 'Good: Matching gettext domain values (libgphoto2-6)'
Good: Matching gettext domain values (libgphoto2-6)
+ true

Any idea how to get rid of the two blocks with the '+' lines?

@ndim
Copy link
Member Author

ndim commented Sep 18, 2024

Yes, I have an idea. Should be about fixed. Always prints

make[2]: Entering directory '/home/ndim/src/gphoto/libgphoto2/_b'
  CHECK   Good: Matching gettext domain values (libgphoto2-6)
make[2]: Leaving directory '/home/ndim/src/gphoto/libgphoto2/_b'

now.

@ndim ndim force-pushed the enable-silent-rules branch 2 times, most recently from 526af75 to 569a7f4 Compare September 18, 2024 19:20
@ndim
Copy link
Member Author

ndim commented Sep 18, 2024

Only prints the CHECK message in the silent rules case any more if the check has failed.

@ndim
Copy link
Member Author

ndim commented Sep 18, 2024

Doxygen is still the source of a huge number of warnings, even when run as doxygen -q.

@ndim ndim force-pushed the enable-silent-rules branch 2 times, most recently from e3abe5a to 154bc3e Compare September 19, 2024 00:36
@ndim
Copy link
Member Author

ndim commented Sep 19, 2024

Prints foo_CFLAGS etc now (once only, not for every compiler invocation, and only if foo has actually been rebuilt).

I still want to add CFLAGS etc from the make command line to that output, though.

@ndim
Copy link
Member Author

ndim commented Sep 19, 2024

This should be about done. Any more complaints/suggestions/questions?

@ndim ndim force-pushed the enable-silent-rules branch 2 times, most recently from 1229cee to 34fa2e5 Compare September 19, 2024 18:08
@axxel
Copy link
Contributor

axxel commented Sep 19, 2024

I see that the make install call is still very verbose including lots of libtool relinking warnings. I used to see them all the time until I set up few symlinks to the *.so files in my build directory to spare me that part.

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

This hides the compiler command line which makes debugging users'
problems more difficult. To compensate for that, this prints the
build flags separately, but a lot less frequently:

For each part of the build (`libgphoto2_port.la`, iolibs,
`libgphoto2.la`, camlibs), if something of that part has been
rebuilt, prints the build flags (_CPPFLAGS, _CFLAGS, _LIBADD,
_LDFLAGS) once.

Always prints the environment variables CPPFLAGS CFLAGS LDADD
LIBADD LDFLAGS once, whether they are the defaults the configure
script sets or given on the `make` command line.

Not all make recipes have been converted to be completely silent,
but the majority (especially the Automake standard recipes) are
now silent.
@ndim
Copy link
Member Author

ndim commented Sep 19, 2024

@axxel I cannot influence the output of make install.

@ndim
Copy link
Member Author

ndim commented Sep 19, 2024

As far as I can tell, this shows everything from the build flags which I want to see, while still making the output much less verbose/confusing than all the compiler command lines would be.

@msmeissn Are you OK with the reduced output? The build flags are not completely hidden. See the CI build output.

Going forward, some more verbosity could be removed by switching to nonrecursive make on the Automake side, and adressing C compiler warnings on the C code side.

The gtk-doc/doxygen situation and its output is a separate problem.

@msmeissn
Copy link
Contributor

for me it looks good.

@ndim ndim merged commit c9e2eb5 into gphoto:master Sep 20, 2024
5 checks passed
@ndim ndim deleted the enable-silent-rules branch September 20, 2024 20:06
ndim added a commit to ndim/gphoto2 that referenced this pull request Sep 20, 2024
This is gphoto/libgphoto2#1021 for gphoto2.

Enables 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

This hides the compiler command line which makes debugging users'
problems more difficult. To compensate for that, this prints the
build flags separately, but a lot less frequently:

If gphoto2 has been rebuilt, prints the build flags (gphoto2_CPPFLAGS,
_CFLAGS, _LDADD, _LDFLAGS) once.

Always prints the environment variables CPPFLAGS CFLAGS LDADD
LDFLAGS once, whether they are the defaults the configure
script sets or given on the `make` command line.

Not all make recipes have been converted to be completely silent,
but the majority (especially the Automake standard recipes) are
now silent.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants