tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: make -d C no-op?



Am 13.05.2023 um 12:31 schrieb tlaronde%polynum.com@localhost:
I was looking for the definition of ${.CURDIR} and the C flag was giving
nothing.

$ cd /usr/src/usr.bin/make
$ egrep "DEBUG[1-5]?\(CWD" *
$
$  fgrep debug.DEBUG_CWD *
main.c:                 debug.DEBUG_CWD = true;

Am I right in concluding that the C flag is not implemented / a no-op?
or am I looking at the wrong place or not invoking it correctly?

Yes, your conclusion is completely correct.

In usr.bin/make/unit-tests/opt-debug-curdir.mk, I documented it when I
found it out, using the same technique as you:

Tests for the -dC command line option, which does nothing,
as of 2020-09-05, as the string "DEBUG(CWD" does not occur
in the source code.

After removing the enum constant and the assignment, the code compiled
again. Not so when I removed DEBUG_COND, which is actually used.

The DEBUG_CWD flag was in use between 2008 and January 2013.

https://github.com/NetBSD/src/commit/b3c89f7f113be74368645c9ab692666ece699aed

Roland



Home | Main Index | Thread Index | Old Index