Source-Changes archive

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

CVS commit: [netbsd-4] src/usr.bin/make



Module Name:    src
Committed By:   bouyer
Date:           Wed Dec 20 22:42:11 UTC 2006

Modified Files:
        src/usr.bin/make [netbsd-4]: cond.c main.c make.h parse.c targ.c

Log Message:
Pull up following revision(s) (requested by dsl in ticket #285):
        usr.bin/make/cond.c: revision 1.36
        usr.bin/make/parse.c: revision 1.121-1.124
        usr.bin/make/make.h: revision 1.65
        usr.bin/make/targ.c: revision 1.46
        usr.bin/make/main.c: revision 1.138-1.139
Simplify the code that processes .if lines.
It doesn't need a two-dimensional array to remember the states of .if lines.
It would be even simpler if we didn't try to detect .else and .elif lines
that follow .else lines.
Unfortunately this isn't the code that is stupendously slow...
Unknot this code slightly by avoiding 'break/return; else' and by putting
the short parts of some conditionals first.
First step towards speeding up the parsing of makefiles (esp. the unwanted
parts of .if clauses).
There should be no changes to the logic.
There really is no point calling estrdup() to get a copy of the makefile name
into every 'gnode' (aka target), instead just copy a pointer to the string
and avoid freeing the original name when we close the file.
I can't imagine any makefile set where this gives a larger footprint!
Add anewline to the end of the error message output when the debug log
file cannot be opened.
Put the big block of code that was common to ParseDoInclude() and
ParseTraditionalInclude() into a separate routine.
Fix the 'use after free' and 'free on item not malloced' that got added
to ParseTraditionalInclude() in Feb 2006 (rev 1.111).
Kill the 'PTR' struct and put both its members into IFile.
Remove the parameter from ParseEOF(), 1 of the 3 calls passed the wrong value!
Fortunately another test stopped anything nasty happening, we'll use that
test instead.
Revert part of a recent commit.
ParseEOF() shouldn't close the original file.
Some minor changes:
- Only test 'printVars' once.
  Has side effect of not trying to find the 'main' target for '-V varname'.
- Only reap the single child process in Cmd_Exec(),
  I think this is for 'xx != cmd' so probobably no other children should exist.
- Don't read and parse .depend if '-r' and '-V varname' are set.
  I suspect that .depend shouldn't affect the output of any -V command...


To generate a diff of this commit:
cvs rdiff -r1.35 -r1.35.2.1 src/usr.bin/make/cond.c
cvs rdiff -r1.137 -r1.137.2.1 src/usr.bin/make/main.c
cvs rdiff -r1.64 -r1.64.2.1 src/usr.bin/make/make.h
cvs rdiff -r1.120 -r1.120.2.1 src/usr.bin/make/parse.c
cvs rdiff -r1.45 -r1.45.2.1 src/usr.bin/make/targ.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