The NetBSD Project

CVS log for src/usr.bin/make/suff.c

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.73 / (download) - annotate - [select for diffs], Sun Sep 7 20:55:34 2014 UTC (2 months, 2 weeks ago) by joerg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.72: +1449 -1647 lines
Diff to previous 1.72 (colored)

Revert all make changes except the unit tests to the state of three
weeks ago. Individual changes can be reapplied after review.

Revision 1.72 / (download) - annotate - [select for diffs], Wed Aug 27 08:50:38 2014 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.71: +14 -11 lines
Diff to previous 1.71 (colored)

Make .INVISIBLE nodes be ignored by suffix transformations.

Revision 1.71 / (download) - annotate - [select for diffs], Sat Aug 23 15:05:40 2014 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.70: +1642 -1447 lines
Diff to previous 1.70 (colored)

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

Revision 1.70 / (download) - annotate - [select for diffs], Sat May 18 13:13:34 2013 UTC (18 months, 1 week ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base9, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-7-base, netbsd-7
Changes since 1.69: +96 -95 lines
Diff to previous 1.69 (colored)

We cannot skip all Suff processing for .PHONY targets,
else, srcs which are wildcards do not get expanded as needed.

Revision 1.69 / (download) - annotate - [select for diffs], Thu Sep 29 23:38:04 2011 UTC (3 years, 1 month ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, dholland-make-base, agc-symver-base, agc-symver
Branch point for: yamt-pagecache, tls-maxphys
Changes since 1.68: +15 -6 lines
Diff to previous 1.68 (colored)

Make sure .PHONY targets get .TARGET set.
This wasn't happening when a dependency of .END.
Set .PREFIX too and add a unit-test.

PR: 43534

Revision 1.68 / (download) - annotate - [select for diffs], Thu Jun 30 20:09:42 2011 UTC (3 years, 4 months ago) by wiz
Branch: MAIN
Changes since 1.67: +4 -4 lines
Diff to previous 1.67 (colored)

dependant -> dependent

Revision 1.67 / (download) - annotate - [select for diffs], Fri Jan 23 21:58:28 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.66: +23 -25 lines
Diff to previous 1.66 (colored)

Sprinkle some const.
In particular for Lst_Find() and Lst_FindFrom().
Remove some unneeded casts and some now-undeeded UNCONST().

Revision 1.66 / (download) - annotate - [select for diffs], Fri Jan 23 21:26:30 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.65: +28 -28 lines
Diff to previous 1.65 (colored)

Change 'ClientData' to 'void *' so that relevant parameters can
be made 'const void *'.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Dec 13 15:19:29 2008 UTC (5 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.64: +59 -59 lines
Diff to previous 1.64 (colored)

Use NULL instead of -1 cast to the relavant type (usually via NIL).
This was a suggestion from christos - so blame him if there is a deep
reason for using -1 :-)

Revision 1.64 / (download) - annotate - [select for diffs], Mon Oct 6 22:09:21 2008 UTC (6 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Changes since 1.63: +18 -18 lines
Diff to previous 1.63 (colored)

Don't use emalloc and friends directly, but call them consistently
bmake_malloc and friends. Implement them via macros for the native case
and provide fallback implementations otherwise. Avoid polluting the
namespace by not defining enomem globally. Don't bother to provide
strdup and strndup, they were only used for the estrdup and estrndup
comapt code.

This addresses the presence of emalloc in system libraries on A/UX and
resulted strange issues as reported by Timothy E. Larson.

Revision 1.63 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, mjf-devfs2-base, mjf-devfs2, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Changes since 1.62: +23 -23 lines
Diff to previous 1.62 (colored)

back all changes out until I fix it properly.

Revision 1.62 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (6 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.61: +26 -26 lines
Diff to previous 1.61 (colored)

- use pid_t/size_t as appropriate instead of int.
- use %ld to print pids.
- fix a bit of lint.
- WARNS=4

Revision 1.61 / (download) - annotate - [select for diffs], Fri Nov 17 22:07:39 2006 UTC (8 years ago) by dsl
Branch: MAIN
CVS Tags: wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-base, matt-armv6, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Changes since 1.60: +11 -3 lines
Diff to previous 1.60 (colored)

A rather large rototil in the way the parallel make code schedules jobs.
This gives a considerable speedup in the processing of .WAIT and .ORDER.
Both .WAIT and .ORDER stop both the commands of the node, and its dependant
nodes being built until the LH nodes are complete.
.WAIT only applies to the dependency line on which it appears, whereas
.ORDER applies globally between the two nodes.
In both cases dependant nodes can be built because other targets need them.
make now processes the target list left to right, scheduling child nodes
as they are needed to make other nodes (instead of attempting to generate
a bottom-up dependency graph at the start).  This means that 'make -j1'
will tend to build in the same order as a non-parallel make.
Note that:
    all: x y
    x: a .WAIT b
    y: b .WAIT a
does not generate a dependency loop.
But
    x: y
    .ORDER y x
does (unless something elswhere causes 'y' to be built).

Revision 1.60 / (download) - annotate - [select for diffs], Sat Nov 11 21:21:17 2006 UTC (8 years ago) by dsl
Branch: MAIN
Changes since 1.59: +6 -6 lines
Diff to previous 1.59 (colored)

Point a few diagnostic printfs (the ones that got away) to debug_file
instead of stdout.

Revision 1.59 / (download) - annotate - [select for diffs], Fri Oct 27 21:00:19 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.58: +65 -65 lines
Diff to previous 1.58 (colored)

Since 'ClientData' is 'void *', nuke almost all the (ClientData) casts.

Revision 1.58 / (download) - annotate - [select for diffs], Wed Oct 25 20:17:40 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.57: +6 -6 lines
Diff to previous 1.57 (colored)

Rename Lst_Append() to Lst_InsertAfter() and Lst_Insert() to Lst_InsertBefore()
to better explain their actions.

Revision 1.57 / (download) - annotate - [select for diffs], Wed Oct 25 20:05:59 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored)

Fix previous - need to add a lstPrev()

Revision 1.56 / (download) - annotate - [select for diffs], Wed Oct 25 19:44:10 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.55: +158 -156 lines
Diff to previous 1.55 (colored)

Only do dynamic dependecy expansion once, and follow by a single filename
globbing.
The old behaviour was the perform variable expansion and globbing on the
output of both the variable expansion and globbing.  Which allows some very
strange behaviour if, for example, globbed filenames contain $ symbols.
Unconditionally add new nodes from these expansions even if the names are
already children.  The .WAIT code needs the order of children preserved.

Revision 1.55 / (download) - annotate - [select for diffs], Sun Oct 15 08:38:22 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.54: +58 -58 lines
Diff to previous 1.54 (colored)

Output all debug trace output through 'debug_file' defaulting to 'stdout'.
(Almost all the debug output went there, but some went to stderr.)
Split the parsing of -d (debug flags) out into its own routine.
Allow the output filename to be changed by specifying -dF<file> to create
a log file, or -dF+<file> to append to it. <file> may be stdout or stderr.
Also change so that -d-<flags> acts on <flags> locally but doesn't copy
them to MAKEFLAGS so they aren't inherited by child makes.
I'm not 100% happy with the command line syntax for the above, so they are
currently undocumented.

Revision 1.54 / (download) - annotate - [select for diffs], Thu Jun 29 22:02:06 2006 UTC (8 years, 5 months ago) by rillig
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

Fixed gcc warnings about signed vs. unsigned in comparisons.

Revision 1.53 / (download) - annotate - [select for diffs], Fri Mar 31 21:58:08 2006 UTC (8 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: chap-midi-nbase, chap-midi-base, chap-midi
Changes since 1.52: +7 -8 lines
Diff to previous 1.52 (colored)

Add some coverity allocation comments, and change the way the allocator
functions work. When they allocate storage that needs to be freed, instead
of setting a boolean, set the pointer to be freed. Plug some more memory
leaks found by inspection.

Revision 1.52 / (download) - annotate - [select for diffs], Sun Jan 8 12:59:52 2006 UTC (8 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.51: +14 -3 lines
Diff to previous 1.51 (colored)

Don't (try to) use files marked .OPTIONAL as implicit sources.
There existance hasn't been verified at the point the implicit rules are
checked.

Revision 1.51 / (download) - annotate - [select for diffs], Mon Aug 8 16:42:54 2005 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.50: +32 -32 lines
Diff to previous 1.50 (colored)

From Max Okumoto:
- Remove casts to NULL.
- Remove space between cast and object.

Revision 1.50 / (download) - annotate - [select for diffs], Fri Aug 5 00:53:18 2005 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.49: +9 -9 lines
Diff to previous 1.49 (colored)

More KNF cleanups from Max Okumoto

Revision 1.49 / (download) - annotate - [select for diffs], Mon Jul 25 22:55:58 2005 UTC (9 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.48: +59 -59 lines
Diff to previous 1.48 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.48 / (download) - annotate - [select for diffs], Wed Feb 16 15:11:52 2005 UTC (9 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3
Changes since 1.47: +89 -89 lines
Diff to previous 1.47 (colored)

PR/29203, PR/29204: Max Okumoto: KNF changes to make [no functional changes]

Revision 1.47 / (download) - annotate - [select for diffs], Wed Dec 29 01:55:25 2004 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.46: +25 -14 lines
Diff to previous 1.46 (colored)

Add comments in the pmake style, and factor out a local variable.
No functional change.

Revision 1.46 / (download) - annotate - [select for diffs], Wed Dec 29 00:43:02 2004 UTC (9 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.45: +45 -33 lines
Diff to previous 1.45 (colored)

Dir_MTime did not search for a file using the correct parh; i.e. it was
ignoring suffix-specific path search. So if a node was marked .MADE,
then suffix rules would not be applied to it, and we would look for
the file only in the default path, not the suffix-specific path.

XXX: Now that we looked for the suffix, we can save it in the GNode,
but we don't do this yet.

Revision 1.45 / (download) - annotate - [select for diffs], Fri May 7 00:04:40 2004 UTC (10 years, 6 months ago) by ross
Branch: MAIN
Changes since 1.44: +4 -4 lines
Diff to previous 1.44 (colored)

Simplify build, no functional changes.

Instead of adding MAKE_BOOTSTRAP for hosted environments, i.e., when
you want things simple, instead add MAKE_NATIVE to get those hugely
important features like __RCSID().

It's now possible to build make on some hosts with: cc *.c */*.c

Revision 1.44 / (download) - annotate - [select for diffs], Fri Feb 13 17:56:17 2004 UTC (10 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.43: +4 -4 lines
Diff to previous 1.43 (colored)

Spell the plural of suffix "suffixes", not "suffices".
Inspired by PR 24400 by Todd Vierling.

Revision 1.43 / (download) - annotate - [select for diffs], Sun Jan 11 17:24:25 2004 UTC (10 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.42: +52 -50 lines
Diff to previous 1.42 (colored)

Reindent search loop in SuffFindCmds using 'continue' and 'break' instead
of netsted ifs.  No logic change.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:57 2003 UTC (11 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.41: +33 -3 lines
Diff to previous 1.41 (colored)

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22365, verified by myself.

Revision 1.41 / (download) - annotate - [select for diffs], Mon Jul 14 18:19:13 2003 UTC (11 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.40: +7 -5 lines
Diff to previous 1.40 (colored)

Pass WARNS=3

Revision 1.40 / (download) - annotate - [select for diffs], Thu Dec 5 15:56:52 2002 UTC (11 years, 11 months ago) by scw
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.39: +9 -9 lines
Diff to previous 1.39 (colored)

Lst exp -> Lst explist, to avoid warnings about gcc-current's
builtin exp() function.

Revision 1.39 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:57 2002 UTC (12 years, 5 months ago) by wiz
Branch: MAIN
Changes since 1.38: +169 -143 lines
Diff to previous 1.38 (colored)

Remove !__STDC__ stuff, de-__P(), ANSIfy, and de-register.

Revision 1.38 / (download) - annotate - [select for diffs], Mon Feb 4 17:24:57 2002 UTC (12 years, 9 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-6-base, netbsd-1-6-RELEASE, netbsd-1-6-RC3, netbsd-1-6-RC2, netbsd-1-6-RC1, netbsd-1-6-PATCH002-RELEASE, netbsd-1-6-PATCH002-RC4, netbsd-1-6-PATCH002-RC3, netbsd-1-6-PATCH002-RC2, netbsd-1-6-PATCH002-RC1, netbsd-1-6-PATCH002, netbsd-1-6-PATCH001-RELEASE, netbsd-1-6-PATCH001-RC3, netbsd-1-6-PATCH001-RC2, netbsd-1-6-PATCH001-RC1, netbsd-1-6-PATCH001
Branch point for: netbsd-1-6
Changes since 1.37: +5 -5 lines
Diff to previous 1.37 (colored)

Remove OP_NOSUFF, fix OP_MADE in compat mode [from pk], and make the OP_MADE
comment reflect reality.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Feb 3 21:41:44 2002 UTC (12 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.36: +5 -5 lines
Diff to previous 1.36 (colored)

Bring down the number of stat(2) system calls from 682 to 294. This change
adds a .NOSUFF directive that has been applied to targets that have been
already made, and are not supposed to have suffix rules applied to them.

Revision 1.36 / (download) - annotate - [select for diffs], Sun Jan 27 01:50:55 2002 UTC (12 years, 10 months ago) by reinoud
Branch: MAIN
Changes since 1.35: +3 -4 lines
Diff to previous 1.35 (colored)

Fix major bug in make(1) ... due to shadowing of the dotLast path used for
the .DOTLAST primitive by a boolean variable with the same name, this whole
mechanism was broken ... it doesn't save much stat calls but it was wrong.

Thanks to Jason Thorpe for the other shadow-variable fixing patches he
made.

Revision 1.35 / (download) - annotate - [select for diffs], Wed Nov 14 19:27:40 2001 UTC (13 years ago) by tv
Branch: MAIN
Changes since 1.34: +4 -4 lines
Diff to previous 1.34 (colored)

Fix a very old and annoying bug: Adding suffixes to sufflist wasn't setting
a refCount of 1 to indicate its presence on sufflist.  Hence suffixes were
being removed by Suff_EndTransform() and being freed before all the
referential links were removed.  This resulted in a malloc warning on 1.5.x:
  make in free(): warning: chunk is already free.

This could be reproduced with the following simple Makefile passed to
"make -r":
=====
.SUFFIXES: .l .c
.l.c:
foo:

Revision 1.34 / (download) - annotate - [select for diffs], Mon Aug 20 12:00:55 2001 UTC (13 years, 3 months ago) by wiz
Branch: MAIN
Changes since 1.33: +4 -4 lines
Diff to previous 1.33 (colored)

precede, not preceed.

Revision 1.33 / (download) - annotate - [select for diffs], Tue Jun 12 23:36:18 2001 UTC (13 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.32: +17 -17 lines
Diff to previous 1.32 (colored)

Add 4th arg (flags) to Var_Set so that VarLoopExpand can tell it not
to export interator variables when using context VAR_CMD.

Reviewed: christos

Revision 1.32 / (download) - annotate - [select for diffs], Tue May 8 15:15:53 2001 UTC (13 years, 6 months ago) by aymeric
Branch: MAIN
Changes since 1.31: +31 -26 lines
Diff to previous 1.31 (colored)

Fix core dump triggered by a .DEFAULT target with no commands.
Bug reported privately by Nicolas Ollinger <nollinge@ens-lyon.fr>.

You can trigger this bug prior to updating your sources with for example:
% cat > Makefile <<EOF
.DEFAULT:
a
EOF
% make

Revision 1.31 / (download) - annotate - [select for diffs], Sun Jun 11 07:39:53 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
CVS Tags: netbsd-1-5-base, netbsd-1-5-RELEASE, netbsd-1-5-PATCH003, netbsd-1-5-PATCH002, netbsd-1-5-PATCH001, netbsd-1-5-BETA2, netbsd-1-5-BETA, netbsd-1-5-ALPHA2, netbsd-1-5
Changes since 1.30: +12 -17 lines
Diff to previous 1.30 (colored)

Readd optimization last night.  Problems earlier were partially due to the
arguments names on one function being swapped (by a previous author).

Do not do any duplicate suppression when a source list is created.  Instead:
* OP_MADE protects against trying to make the source multiple times.
* A new OP_MARK flag is introduced to suppress duplicates while expanding
  the .ALLSRC variable and .USE targets.
This turns the O(n^2) insertion into O(n) in most cases.

This is tested with a `make build' and some special test cases.

Revision 1.30 / (download) - annotate - [select for diffs], Sat Jun 10 22:28:34 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.29: +14 -9 lines
Diff to previous 1.29 (colored)

Back out last night's optimization for now.

Revision 1.29 / (download) - annotate - [select for diffs], Sat Jun 10 21:44:09 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.28: +12 -17 lines
Diff to previous 1.28 (colored)

Introduce an OP_MARK bit, and use it to suppress duplicates during .ALLSRC
and .USE expansion.  Also, remove some more Lst_Member() checks that are now
redundant.

Revision 1.28 / (download) - annotate - [select for diffs], Sat Jan 22 19:28:11 2000 UTC (14 years, 10 months ago) by mycroft
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.27: +5 -4 lines
Diff to previous 1.27 (colored)

Don't apply suffix rules for .PHONY targets.  (gmake doesn't do this either.)

Revision 1.27 / (download) - annotate - [select for diffs], Thu Sep 16 00:54:15 1999 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
CVS Tags: wrstuden-devbsize-base, wrstuden-devbsize-19991221, wrstuden-devbsize, comdex-fall-1999-base, comdex-fall-1999
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored)

Some minor cleanup of :: tests.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Sep 15 10:47:44 1999 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.25: +5 -24 lines
Diff to previous 1.25 (colored)

Rework how :: dependencies are handled.
Build a list of `cohorts' as before, but do *not* link each one into all the
parent nodes; instead, copy the `cohort' lists into the stream of targets to
be built inside Make_ExpandUse().  Also do the attribute propagation as a
separate pass after parsing.
This eliminates several O(n^2) algorithms.

Revision 1.25 / (download) - annotate - [select for diffs], Wed Sep 15 08:43:22 1999 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.24: +11 -3 lines
Diff to previous 1.24 (colored)

Don't bother iterating through all the data structures to free(3) everything
right before exiting.
(The code is still present, `#ifdef CLEANUP', in case someone needs it...)

Revision 1.24 / (download) - annotate - [select for diffs], Wed Sep 15 03:59:44 1999 UTC (15 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.23: +31 -29 lines
Diff to previous 1.23 (colored)

Avoid using Lst_Member() in SuffExpandChildren(), by avoiding Lst_ForEach() and
passing in the LstNode of the child being inspected.  Shaves off another few %,
particularly when there are long child lists containing $ expansions (e.g. in
libc).

Revision 1.23 / (download) - annotate - [select for diffs], Sun Nov 1 03:07:34 1998 UTC (16 years, 1 month ago) by itohy
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH003, netbsd-1-4-PATCH002, netbsd-1-4-PATCH001, netbsd-1-4
Changes since 1.22: +4 -3 lines
Diff to previous 1.22 (colored)

Reduced memory leaks.
I found some more leaks, but are not in inside of iterations.

Revision 1.22 / (download) - annotate - [select for diffs], Sun Nov 1 03:05:03 1998 UTC (16 years, 1 month ago) by itohy
Branch: MAIN
Changes since 1.21: +40 -19 lines
Diff to previous 1.21 (colored)

If the target name is shorter than the suffix,
the previous garbage bytes may be read.
Example: "make n" --- target = n, suffix = .ln

Changing interface of SuffSuffIsSuffix() is required to fix this bug.

Revision 1.21 / (download) - annotate - [select for diffs], Fri Sep 18 20:20:52 1998 UTC (16 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.20: +7 -5 lines
Diff to previous 1.20 (colored)

PR/6162: Greg A. Woods: pmake does not add suffix rules if gnodes have children.
	 This is traditional make behavior (Solaris make does the same), but
	 GNU does not. Lets see what breaks.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Jul 4 21:53:11 1998 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.19: +10 -4 lines
Diff to previous 1.19 (colored)

Fix access to freed memory; pointed out by Todd Miller.

Revision 1.19 / (download) - annotate - [select for diffs], Thu Jul 2 23:30:18 1998 UTC (16 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.18: +14 -5 lines
Diff to previous 1.18 (colored)

PR/5690: Wolfgang Rupprecht: deleting a suffix that has 0 source references
	 causes core-dump. Fix: when an unused suffix gets removed, delete
	 it from the suffix list.

Revision 1.18 / (download) - annotate - [select for diffs], Sun Sep 28 03:31:11 1997 UTC (17 years, 2 months ago) by lukem
Branch: MAIN
CVS Tags: netbsd-1-3-base, netbsd-1-3-RELEASE, netbsd-1-3-PATCH003-CANDIDATE2, netbsd-1-3-PATCH003-CANDIDATE1, netbsd-1-3-PATCH003-CANDIDATE0, netbsd-1-3-PATCH003, netbsd-1-3-PATCH002, netbsd-1-3-PATCH001, netbsd-1-3-BETA, netbsd-1-3
Changes since 1.17: +6 -2 lines
Diff to previous 1.17 (colored)

wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP

Revision 1.17 / (download) - annotate - [select for diffs], Tue Jul 1 21:17:39 1997 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.16: +4 -2 lines
Diff to previous 1.16 (colored)

Add WARNS=1
RCSID police

Revision 1.16 / (download) - annotate - [select for diffs], Thu May 8 21:24:50 1997 UTC (17 years, 6 months ago) by gwr
Branch: MAIN
Changes since 1.15: +3 -3 lines
Diff to previous 1.15 (colored)

Add the new .NOPATH feature which can be used to disable .PATH search
for particular targets, i.e. .depend, objects, etc.  (from Christos).

Revision 1.15 / (download) - annotate - [select for diffs], Tue May 6 22:06:58 1997 UTC (17 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.14: +45 -43 lines
Diff to previous 1.14 (colored)

Don't do a suffix search for a .PHONY target.

Revision 1.14 / (download) - annotate - [select for diffs], Fri May 2 14:24:32 1997 UTC (17 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.13: +134 -82 lines
Diff to previous 1.13 (colored)

- Target searching addition:
	Make used to only use the search path for nodes that were pure
	sources (not targets of other sources). This has been corrected
	and now gnu-autoconf generated Makefiles work in directories other
	than the source one.

- Suffix transformation rescanning:
	Suffix transformations (.c.o:; cc ...) were only recognized in
	the past when both suffixes were members of the suffix list.
	Thus a sequence like:
		.z.b:
			echo ${.TARGET}
		.SUFFIXES: .z
	would cause .z.b: to be inserted as a regular target (and the main
	target in this case). Other make programs always add rules that
	start with a period in the transformation list and never consider
	them as targets. We cannot do that (consider .depend files) so we
	resort to scanning the list of the current targets every time a
	suffix gets added, and we mutate existing targets that are now
	valid transformation rules into transformation rules. If the
	transformed target was also the main target, we set the main target
	to be the next target in the targets list.

Revision 1.13 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:25 1996 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.12: +42 -42 lines
Diff to previous 1.12 (colored)

- Merge in FreeBSD and Lite2 changes.
- Fix bug where a non-archive target with a .a suffix would always
  be considered to be out of date, since it does not have a TOC.

Revision 1.12 / (download) - annotate - [select for diffs], Tue Aug 13 16:42:16 1996 UTC (18 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.11: +11 -11 lines
Diff to previous 1.11 (colored)

Add estrdup(), a checked version of strdup and use it.

Revision 1.11 / (download) - annotate - [select for diffs], Thu Nov 2 23:55:08 1995 UTC (19 years ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-2-base, netbsd-1-2-RELEASE, netbsd-1-2-BETA
Branch point for: netbsd-1-2
Changes since 1.10: +20 -9 lines
Diff to previous 1.10 (colored)

Minor:
    - ${.PREFIX} should never contain a full pathname
    - Fixed gcc -Wall warnings
Major:
    - compatMake is now FALSE. This means that we are now running in
      full pmake mode:
	  * rules on dependency lines can be executed in parallel and or
	    out of sequence:

	    foo: bar baz

	    can fire the rule for baz before the rule for bar is fired.
	    To enforce bar to be fired before baz, another rule needs to be
	    added. [bar: baz]
	  * adjacent shell commands in a target are now executed by a single
	    invocation of the shell, not one invocation of the shell per line
      (compatMake can be turned off using the -B flag)
    - The -j flag now works... I.e. make -j 4 will fork up to four jobs in
      parallel when it can. The target name is printed before each burst
      of output caused by the target execution as '--- target ---', when j > 1
    - I have changed all the Makefiles so that they work with make -j N, and
      I have tested the whole netbsd by:
	  'make -j 4 cleandir; make -j 4 depend; make -j 4; make -j 4 install'
    - I have not compiled or tested this version of make with -DREMOTE.

Revision 1.10 / (download) - annotate - [select for diffs], Mon Sep 25 02:46:30 1995 UTC (19 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.9: +2 -12 lines
Diff to previous 1.9 (colored)

Revert previous suffix fix. If the .a suffix is present and a .c.a rule is
there, then the rule should be applied. This is the correct behavior.

Revision 1.9 / (download) - annotate - [select for diffs], Fri Sep 22 00:42:10 1995 UTC (19 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.8: +15 -4 lines
Diff to previous 1.8 (colored)

Don't apply the default suffix rules for nodes that are not in our
current directory because we could be building things outside our
directory that were not meant to be build... Fixes PR/1488

Revision 1.8 / (download) - annotate - [select for diffs], Wed Jun 14 15:19:59 1995 UTC (19 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.7: +7 -2 lines
Diff to previous 1.7 (colored)

- $NetBSD$ rcsids
- Fixed so that .[A-Z]* targets that do not match keywords are ignored as
  Posix mandates
- Added .PHONY target keyword

Revision 1.7 / (download) - annotate - [select for diffs], Sat Feb 4 23:44:43 1995 UTC (19 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.6: +16 -3 lines
Diff to previous 1.6 (colored)

str.c: Don't free NULL; does not work with non posix frees.
var.c: Minor memory leak plugged.
suff.c: Don't add extra sources on the null suffix if it has dependency
	lines or commands attached to it [POSIX says so]

Revision 1.6 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:44 1994 UTC (20 years, 5 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-0-base, netbsd-1-0-RELEASE, netbsd-1-0-PATCH1, netbsd-1-0-PATCH06, netbsd-1-0-PATCH05, netbsd-1-0-PATCH04, netbsd-1-0-PATCH03, netbsd-1-0-PATCH02, netbsd-1-0-PATCH0, netbsd-1-0
Changes since 1.5: +353 -150 lines
Diff to previous 1.5 (colored)

Fixes from Christos Zoulas, who used purify, objectcenter and testcenter
to find memory leaks and illegal memory accesses.

Revision 1.5 / (download) - annotate - [select for diffs], Wed Mar 23 00:52:14 1994 UTC (20 years, 8 months ago) by jtc
Branch: MAIN
Changes since 1.4: +34 -2 lines
Diff to previous 1.4 (colored)

Fixes from Christos Zoulas:
The following two patches fix a couple of problems with make(1)

1. Null Suffixes were not being copied, but they were being free'd
   This caused rules of the form:

   .c:
	${CC} ...

   to access invalid memory and potentially core dump..
   [That was always broken; I did not break that one :-)]

2. My recent fixes to parse ${VAR:%.foo=%.bar} handled the null string
   case incorrectly (${VAR:=.c} was broken).

Revision 1.4 / (download) - annotate - [select for diffs], Sat Mar 5 00:35:11 1994 UTC (20 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.3: +62 -35 lines
Diff to previous 1.3 (colored)

fixes/improvements from Christos Zoulas <christos@deshaw.com>.

Revision 1.3 / (download) - annotate - [select for diffs], Thu Jan 13 21:02:06 1994 UTC (20 years, 10 months ago) by jtc
Branch: MAIN
Changes since 1.2: +2 -1 lines
Diff to previous 1.2 (colored)

Include appropriate header files to bring prototypes into scope.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:41 1993 UTC (21 years, 4 months ago) by mycroft
Branch: MAIN
Changes since 1.1: +2 -1 lines
Diff to previous 1.1 (colored)

Add RCS identifiers.

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (21 years, 8 months ago) by cgd
Branch: MAIN

Initial revision

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>