Source-Changes archive

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

CVS commit: src/usr.bin/make



Module Name:    src
Committed By:   rillig
Date:           Mon Aug 24 20:15:51 UTC 2020

Modified Files:
        src/usr.bin/make: enum.c enum.h make.c make.h targ.c var.c

Log Message:
make(1): in debug mode, print GNode details in symbols

A string like OP_DEPENDS|OP_OPTIONAL|OP_PRECIOUS is much easier to read
and understand than the bit pattern 00000089.

The implementation in enum.h looks really bloated and ugly, but using
this API is as simple and natural as possible.  That's the trade-off.

In enum.h, I thought about choosing the numbers in the macros such that
it is always possible to combine two of them in order to reach an
arbitrary number, because of the "part1, part2" in the ENUM__SPEC macro.
The powers of 2 are not these numbers, as 7 cannot be expressed as the
sum of two of them.  Neither are the fibonacci numbers since 12 cannot
be expressed as the sum of 2 fibonacci numbers.  I tried to find a
general pattern to generate these minimal 2-sum numbers, but failed.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.bin/make/enum.c
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/enum.h
cvs rdiff -u -r1.121 -r1.122 src/usr.bin/make/make.c
cvs rdiff -u -r1.125 -r1.126 src/usr.bin/make/make.h
cvs rdiff -u -r1.71 -r1.72 src/usr.bin/make/targ.c
cvs rdiff -u -r1.469 -r1.470 src/usr.bin/make/var.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index