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:           Wed Feb  3 08:00:36 UTC 2021

Modified Files:
        src/usr.bin/make: dir.c job.c main.c meta.c nonints.h parse.c suff.c
            targ.c util.c var.c

Log Message:
make: use shortcut functions Global_SetExpand and Global_AppendExpand

There are many places where global variables are set or appended to.  To
reduce clutter and code size, encode the VAR_GLOBAL in the function
name.

The word Expand in the function names says that the variable name is
expanded.  In most of the cases, this is not necessary, but there are no
corresponding functions Global_Set or Global_Append yet.

Encoding the information whether the name is expanded or not in the
function name will make inconsistencies obvious in future manual code
reviews. Letting the compiler check this by using different types for
unexpanded and expanded variable names is probably not worth the effort.
There are still a few bugs to be fixed, such as in SetVar, which expands
the variable name twice in a row.


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 src/usr.bin/make/dir.c
cvs rdiff -u -r1.412 -r1.413 src/usr.bin/make/job.c
cvs rdiff -u -r1.526 -r1.527 src/usr.bin/make/main.c
cvs rdiff -u -r1.170 -r1.171 src/usr.bin/make/meta.c
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.538 -r1.539 src/usr.bin/make/parse.c
cvs rdiff -u -r1.341 -r1.342 src/usr.bin/make/suff.c
cvs rdiff -u -r1.161 -r1.162 src/usr.bin/make/targ.c
cvs rdiff -u -r1.75 -r1.76 src/usr.bin/make/util.c
cvs rdiff -u -r1.790 -r1.791 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