[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNU make troubleshooting
From: |
Bruno Haible |
Subject: |
Re: GNU make troubleshooting |
Date: |
Mon, 10 Jul 2023 20:46:31 +0200 |
> 2) Where is the Makefile source for each command that gets executed?
> For each command that gets executed, print not only the command (or
> nothing if the line begins with '@'), but also the location (which
> Makefile, which line number).
>
> This would help in a number of situations.
>
> I tried -d a couple of times, and it produced a ton of output, that
> was too much for me to make sense of. Probably 10% to 20% of the
> developers in general have trace filtering skills, that is, know how
> to extract the essential information from a heap of output. It's not
> part of my skills.
Just learned about the '--trace' option and I have two comments:
* It should be described in a chapter "Troubleshooting". Mentioning it
in section "Summary of Options" is not enough.
* Some of its output is good; some of its output is useless:
$ rm mbrtoc32.o
$ make --trace mbrtoc32.o
Makefile:1752: update target 'mbrtoc32.o' due to: ../../gllib/mbrtoc32.c
/usr/include/stdc-predef.h ../config.h
/usr/lib/gcc/x86_64-linux-gnu/11/include/stdbool.h /usr/include/assert.h
/usr/include/features.h /usr/include/features-time64.h
/usr/include/x86_64-linux-gnu/bits/wordsize.h
/usr/include/x86_64-linux-gnu/bits/timesize.h
/usr/include/x86_64-linux-gnu/sys/cdefs.h
/usr/include/x86_64-linux-gnu/bits/long-double.h
/usr/include/x86_64-linux-gnu/gnu/stubs.h
/usr/include/x86_64-linux-gnu/gnu/stubs-64.h uchar.h /usr/include/uchar.h
stddef.h /usr/lib/gcc/x86_64-linux-gnu/11/include/stddef.h
/usr/include/x86_64-linux-gnu/bits/types.h
/usr/include/x86_64-linux-gnu/bits/typesizes.h
/usr/include/x86_64-linux-gnu/bits/time64.h
/usr/include/x86_64-linux-gnu/bits/types/mbstate_t.h
/usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h
/usr/lib/gcc/x86_64-linux-gnu/11/include/stdint.h /usr/include/stdint.h
/usr/include/x86_64-linux-gnu/bits/libc-header-start.h
/usr/include/x86_64-linux-gnu/bits/wchar.h
/usr/include/x86_64-linux-gnu/bits/stdint-intn.h
/usr/include/x86_64-linux-gnu/bits/stdint-uintn.h wchar.h /usr/include/wchar.h
/usr/include/x86_64-linux-gnu/bits/floatn.h
/usr/include/x86_64-linux-gnu/bits/floatn-common.h
/usr/lib/gcc/x86_64-linux-gnu/11/include/stdarg.h
/usr/include/x86_64-linux-gnu/bits/types/wint_t.h
/usr/include/x86_64-linux-gnu/bits/types/__FILE.h
/usr/include/x86_64-linux-gnu/bits/types/FILE.h
/usr/include/x86_64-linux-gnu/bits/types/locale_t.h
/usr/include/x86_64-linux-gnu/bits/types/__locale_t.h
/usr/include/x86_64-linux-gnu/bits/wchar2.h /usr/include/string.h
/usr/include/strings.h /usr/include/x86_64-linux-gnu/bits/strings_fortified.h
/usr/include/x86_64-linux-gnu/bits/string_fortified.h /usr/include/wctype.h
/usr/include/x86_64-linux-gnu/bits/wctype-wchar.h
/usr/include/x86_64-linux-gnu/bits/endian.h
/usr/include/x86_64-linux-gnu/bits/endianness.h ../../gllib/attribute.h
/usr/include/errno.h /usr/include/x86_64-linux-gnu/bits/errno.h
/usr/include/linux/errno.h /usr/include/x86_64-linux-gnu/asm/errno.h
/usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h
/usr/include/x86_64-linux-gnu/bits/types/error_t.h stdlib.h
/usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h
/usr/include/x86_64-linux-gnu/bits/waitstatus.h sys/types.h
/usr/include/x86_64-linux-gnu/sys/types.h
/usr/include/x86_64-linux-gnu/bits/types/clock_t.h
/usr/include/x86_64-linux-gnu/bits/types/clockid_t.h
/usr/include/x86_64-linux-gnu/bits/types/time_t.h
/usr/include/x86_64-linux-gnu/bits/types/timer_t.h /usr/include/endian.h
/usr/include/x86_64-linux-gnu/bits/byteswap.h
/usr/include/x86_64-linux-gnu/bits/uintn-identity.h
/usr/include/x86_64-linux-gnu/sys/select.h
/usr/include/x86_64-linux-gnu/bits/select.h
/usr/include/x86_64-linux-gnu/bits/types/sigset_t.h
/usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h
/usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h
/usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h
/usr/include/x86_64-linux-gnu/bits/select2.h
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h
/usr/include/x86_64-linux-gnu/bits/thread-shared-types.h
/usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h
/usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h
/usr/include/x86_64-linux-gnu/bits/struct_mutex.h
/usr/include/x86_64-linux-gnu/bits/struct_rwlock.h /usr/include/alloca.h
/usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h
/usr/include/x86_64-linux-gnu/bits/stdlib-float.h
/usr/include/x86_64-linux-gnu/bits/stdlib.h ../../gllib/localcharset.h
../../gllib/streq.h ../../gllib/hard-locale.h locale.h /usr/include/locale.h
/usr/include/x86_64-linux-gnu/bits/locale.h ../../gllib/setlocale_null.h
../../gllib/arg-nonnull.h
gcc -ftrapv -DHAVE_CONFIG_H -I. -I../../gllib -I.. -DGNULIB_STRICT_CHECKING=1
-I/media/develdata/devel/inst-x86_64-64/include -Wall -g -O2 -MT mbrtoc32.o
-MD -MP -MF .deps/mbrtoc32.Tpo -c -o mbrtoc32.o ../../gllib/mbrtoc32.c
mv -f .deps/mbrtoc32.Tpo .deps/mbrtoc32.Po
The part "Makefile:1752" is essential. It could be highlighted in some way.
The two last lines (expanded commands, despite use of '@') are essential as
well.
The " due to: <huge list of files>" is useless, since these files
have not changed since the last compilation. (Suggestion: Reduce this
list by showing only the file with the newest timestamp. Files with older
timestamps are redundant.)
The important fact is that the file mbrtoc32.o does not exist; the output
should mention this.
Bruno
- GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting,
Bruno Haible <=
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Bruno Haible, 2023/07/10
- Re: GNU make troubleshooting, Paul Smith, 2023/07/10
Re: GNU make troubleshooting, Paul Smith, 2023/07/10