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:           Sat Nov 14 13:07:39 UTC 2020

Modified Files:
        src/usr.bin/make: job.c

Log Message:
make(1): replace macro DBPRINTF with JobPrintln

This macro had been bad in several ways.  Its name started with DB, an
unnecessary abbreviation for DEBUG.  Many places that used this macro
used it with the same format string, "%s\n".  This format string can
better be expressed in a function name, JobPrintln.

Only in a few places was the macro used with different format strings.
The one for "set -x" was even forced to arbitrarily separate the
argument from the format string in order to match the expected macro
parameters.

A better choice would have been to use the standard form "%s\n", "set
-x" from the beginning.  Anyway, that call is calling JobPrintln as well
now.

The remaining templates are user-specified, and if anyone should ever
define a completely custom shell with echo handling and error handling
enabled, they will easily crash make when the templates don't contain
exactly one %s conversion.  That's the responsibility of the user, and
it has always been.


To generate a diff of this commit:
cvs rdiff -u -r1.317 -r1.318 src/usr.bin/make/job.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