Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src
Module Name: src
Committed By: christos
Date: Sat Aug 23 15:05:41 UTC 2014
Modified Files:
src/tests/usr.bin/make: t_make.sh
src/usr.bin/make: compat.c lst.h main.c make.1 make.c make.h nonints.h
parse.c suff.c targ.c
src/usr.bin/make/lst.lib: lstInt.h lstRemove.c
Added Files:
src/usr.bin/make/unit-tests: impsrc.exp impsrc.mk suffixes.exp
suffixes.mk
Log Message:
PR/46096: Jarmo Jaakkola: fix many problems with dependencies (PR 49086)
Quite extensive rewrite of the Suff module. Some ripple effects into
Parse and Targ modules too.
Dependency searches in general were made to honor explicit rules so
implicit and explicit sources are no longer applied on targets that
do not invoke a transformation rule.
Archive member dependency search was rewritten. Explicit rules now
work properly and $(.TARGET) is set correctly. POSIX semantics for
lib(member.o) and .s1.a rules are supported.
.SUFFIXES list maintenance was rewritten so that scanning of existing
rules works when suffixes are added and that clearing the suffix list
removes single suffix rules too. Transformation rule nodes are now
mixed with regular nodes so they are available as regular targets too
if needed (especially after the known suffixes are cleared).
The .NULL target was documented in the manual page, especially to
warn against using it when a single suffix rule would work.
A deprecation warning was also added to the manual and make also
warns the user if it encounters .NULL.
Search for suffix rules no longer allows the explicit dependencies
to override the selected transformation rule. A check is made in
the search that the transformation that would be tried does not
already exist in the chain. This prevents getting stuck in an infinite
loop under specific circumstances. Local variables are now set
before node's children are expanded so dynamic sources work in
multi-stage transformations. Make_HandleUse() no longer expands
the added children for transformation nodes, preventing triple
expansion and allowing the Suff module to properly postpone their
expansion until proper values are set for the local variables.
Directory prefix is no longer removed from $(.PREFIX) if the target
is found via directory search.
The last rule defined is now used instead of the first one (POSIX
requirement) in case a rule is defined multiple times. Everything
defined in the first instance is undone, but things added "globally"
are honored. To implement this, each node tracks attribute bits
which have been set by special targets (global) instead of special
sources (local). They also track dependencies that were added by
a rule with commands (local) instead of rule with no commands (global).
New attribute, OP_FROM_SYS_MK is introduced. It is set on all targets
found in system makefiles so that they are not eligible to become
the main target. We cannot just set OP_NOTMAIN because it is one of
the attributes inherited from transformation and .USE rules and would
make any eligible target that uses a built-in inference rule ineligible.
The $(.IMPSRC) local variable now works like in gmake: it is set to
the first prerequisite for explicit rules. For implicit rules it
is still the implied source.
The manual page is improved regarding the fixed features. Test cases
for the fixed problems are added.
Other improvements in the Suff module include:
- better debug messages for transformation rule search (length of
the chain is now visualized by indentation)
- Suff structures are created, destroyed and moved around by a set
of maintenance functions so their reference counts are easier
to track (this also gets rid of a lot of code duplication)
- some unreasonably long functions were split into smaller ones
- many local variables had their names changed to describe their
purpose instead of their type
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/make/t_make.sh
cvs rdiff -u -r1.94 -r1.95 src/usr.bin/make/compat.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/make/lst.h
cvs rdiff -u -r1.228 -r1.229 src/usr.bin/make/main.c
cvs rdiff -u -r1.232 -r1.233 src/usr.bin/make/make.1
cvs rdiff -u -r1.88 -r1.89 src/usr.bin/make/make.c
cvs rdiff -u -r1.93 -r1.94 src/usr.bin/make/make.h
cvs rdiff -u -r1.65 -r1.66 src/usr.bin/make/nonints.h
cvs rdiff -u -r1.199 -r1.200 src/usr.bin/make/parse.c
cvs rdiff -u -r1.70 -r1.71 src/usr.bin/make/suff.c
cvs rdiff -u -r1.57 -r1.58 src/usr.bin/make/targ.c
cvs rdiff -u -r1.20 -r1.21 src/usr.bin/make/lst.lib/lstInt.h
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/make/lst.lib/lstRemove.c
cvs rdiff -u -r0 -r1.1 src/usr.bin/make/unit-tests/impsrc.exp \
src/usr.bin/make/unit-tests/impsrc.mk \
src/usr.bin/make/unit-tests/suffixes.exp \
src/usr.bin/make/unit-tests/suffixes.mk
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