The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.204 / (download) - annotate - [select for diffs], Thu Sep 18 08:06:13 2014 UTC (2 months, 1 week ago) by dholland
Branch: MAIN
CVS Tags: HEAD
Changes since 1.203: +40 -7 lines
Diff to previous 1.203 (colored)

Comments, and one very minor tidyup.

Revision 1.203 / (download) - annotate - [select for diffs], Sun Sep 7 20:55:34 2014 UTC (2 months, 2 weeks ago) by joerg
Branch: MAIN
Changes since 1.202: +92 -197 lines
Diff to previous 1.202 (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.202 / (download) - annotate - [select for diffs], Fri Aug 29 09:27:43 2014 UTC (2 months, 4 weeks ago) by christos
Branch: MAIN
Changes since 1.201: +4 -7 lines
Diff to previous 1.201 (colored)

undo eating the trailing backslash now that the shell has been fixed.

Revision 1.201 / (download) - annotate - [select for diffs], Thu Aug 28 14:39:13 2014 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.200: +7 -4 lines
Diff to previous 1.200 (colored)

don't leave trailing backlashes on commands, just like gmake does. What does
POSIX have to say?

Revision 1.200 / (download) - annotate - [select for diffs], Sat Aug 23 15:05:40 2014 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.199: +161 -72 lines
Diff to previous 1.199 (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.199 / (download) - annotate - [select for diffs], Sat Aug 23 14:50:24 2014 UTC (3 months ago) by christos
Branch: MAIN
Changes since 1.198: +39 -23 lines
Diff to previous 1.198 (colored)

PR/49085: Jarmo Jaakkola: fix several parsing errors

Don't exit from var.c:Var_Parse() before possible modifiers are handled
on D and F modified versions of local variables.  Properly expand $(?D)
and $(?F) too.

Make line continuations in rule's commands POSIX compliant.

Fix the syntax error caused by lib(member) as the last target before
a dependency operator.

Document the line continuation change in the manual page.  Also talk
more about the POSIX style local variables and their modifiers.

Add tests covering the fixed problems into d_posix.mk.  The test is
a known failure at the moment because of PR 49086 and PR 49092.

[XXX: unconverted tests]

Revision 1.198 / (download) - annotate - [select for diffs], Wed Jul 16 19:31:11 2014 UTC (4 months, 1 week ago) by justin
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base, netbsd-7
Changes since 1.197: +4 -4 lines
Diff to previous 1.197 (colored)

Avoid use of __arraycount in tools as not portable

Revision 1.197 / (download) - annotate - [select for diffs], Wed Jul 16 18:58:07 2014 UTC (4 months, 1 week ago) by justin
Branch: MAIN
Changes since 1.196: +5 -4 lines
Diff to previous 1.196 (colored)

Remove an accidental C99-ism in tools which needs to be portable

Revision 1.196 / (download) - annotate - [select for diffs], Wed Jul 16 16:52:59 2014 UTC (4 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.195: +5 -8 lines
Diff to previous 1.195 (colored)

remove debugging

Revision 1.195 / (download) - annotate - [select for diffs], Wed Jul 16 15:33:41 2014 UTC (4 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.194: +44 -4 lines
Diff to previous 1.194 (colored)

PR/48367: David A. Holland: Mark possible submake nodes so that we can
avoid closing the job pipe on exec for them in order to make recursive
makes work in parallel.

Revision 1.194 / (download) - annotate - [select for diffs], Sat Feb 15 00:17:17 2014 UTC (9 months, 1 week ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base9, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3
Branch point for: tls-earlyentropy
Changes since 1.193: +6 -5 lines
Diff to previous 1.193 (colored)

delete the correct variables on eof
fix typo in comment (from sjg)

Revision 1.193 / (download) - annotate - [select for diffs], Fri Jan 10 16:12:52 2014 UTC (10 months, 2 weeks ago) by christos
Branch: MAIN
Changes since 1.192: +51 -12 lines
Diff to previous 1.192 (colored)

add .INCLUDEDFROM{FILE,DIR}

Revision 1.192 / (download) - annotate - [select for diffs], Fri Oct 18 20:47:06 2013 UTC (13 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.191: +4 -5 lines
Diff to previous 1.191 (colored)

fix unused variable warnings

Revision 1.191 / (download) - annotate - [select for diffs], Wed Aug 28 21:56:49 2013 UTC (14 months, 4 weeks ago) by sjg
Branch: MAIN
Changes since 1.190: +9 -3 lines
Diff to previous 1.190 (colored)

Fix parsing of SUNSHCMD style :sh = assigments.

Submitted by: Will Andrews at freebsd.org

Revision 1.190 / (download) - annotate - [select for diffs], Sat Aug 10 21:20:03 2013 UTC (15 months, 2 weeks ago) by sjg
Branch: MAIN
Changes since 1.189: +13 -3 lines
Diff to previous 1.189 (colored)

ParseGetLine: don't treat a zero byte as end of buffer if P_end says it isn't.
Consume up to next newline, and issue a parse warning.
If no newline found before P_end, carry on as before.

Revision 1.189 / (download) - annotate - [select for diffs], Tue Jun 18 19:31:27 2013 UTC (17 months, 1 week ago) by sjg
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.188: +7 -5 lines
Diff to previous 1.188 (colored)

Fix use after free bug.
Parse_SetInput:
curFile->fname was using the buffer passed to it - which ReadMakefile frees.
This change makes the comment in ParseEOF about leaking curFile->fname true.

Revision 1.188 / (download) - annotate - [select for diffs], Fri Mar 22 16:07:59 2013 UTC (20 months ago) by sjg
Branch: MAIN
CVS Tags: agc-symver-base, agc-symver
Changes since 1.187: +4 -3 lines
Diff to previous 1.187 (colored)

ParseGmakeExport: terminate variable at '=', or setenv(3) will fail
on some systems.

Revision 1.187 / (download) - annotate - [select for diffs], Tue Mar 5 22:01:44 2013 UTC (20 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.186: +46 -41 lines
Diff to previous 1.186 (colored)

Add a .STALE special target that gets invoked when dependency files contain
stail entries.

Revision 1.186 / (download) - annotate - [select for diffs], Tue Mar 5 02:04:11 2013 UTC (20 months, 3 weeks ago) by christos
Branch: MAIN
Changes since 1.185: +15 -3 lines
Diff to previous 1.185 (colored)

Keep track of the location where a dependency is defined, so we can report
about it.

Revision 1.185 / (download) - annotate - [select for diffs], Tue Jun 12 19:21:51 2012 UTC (2 years, 5 months ago) by joerg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, dholland-make-base
Branch point for: tls-maxphys
Changes since 1.184: +5 -5 lines
Diff to previous 1.184 (colored)

Replace __dead, __unused and the various printf format attributes
with versions prefixed by MAKE_ATTR_* to avoid modifying the
implementation namespace. Make sure they are available in all places
using nonints.h to fix bootstrap on Linux.

Revision 1.184 / (download) - annotate - [select for diffs], Tue Apr 24 20:12:16 2012 UTC (2 years, 7 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.183: +34 -4 lines
Diff to previous 1.183 (colored)

Restore previous behavior - supressing duplicate entries in
.MAKE.MAKEFILES - it is more efficient.

Revision 1.183 / (download) - annotate - [select for diffs], Fri Apr 20 05:33:42 2012 UTC (2 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.182: +9 -40 lines
Diff to previous 1.182 (colored)

Fix some typos in/around ParseGmakeExport.
Remove the suppresssion of duplicate entries in .MAKE.MAKEFILES

Revision 1.182 / (download) - annotate - [select for diffs], Sat Mar 31 00:12:24 2012 UTC (2 years, 7 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base4
Changes since 1.181: +66 -3 lines
Diff to previous 1.181 (colored)

Add a gmake inspired export command

Revision 1.181 / (download) - annotate - [select for diffs], Sat Mar 24 20:28:41 2012 UTC (2 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.180: +6 -4 lines
Diff to previous 1.180 (colored)

Avoid the need to escape the # in :[#] when parsing conditionals.

Revision 1.180 / (download) - annotate - [select for diffs], Sun Nov 6 19:46:56 2011 UTC (3 years ago) by christos
Branch: MAIN
CVS Tags: yamt-pagecache-base3, yamt-pagecache-base2, 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
Changes since 1.179: +15 -11 lines
Diff to previous 1.179 (colored)

add debugging for parsedir and parsefile

Revision 1.179 / (download) - annotate - [select for diffs], Wed Aug 31 16:24:57 2011 UTC (3 years, 2 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-base
Branch point for: yamt-pagecache
Changes since 1.178: +5 -5 lines
Diff to previous 1.178 (colored)

NULL does not need a cast

Revision 1.178 / (download) - annotate - [select for diffs], Tue May 17 21:56:51 2011 UTC (3 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: cherry-xenmp-base, cherry-xenmp
Changes since 1.177: +11 -3 lines
Diff to previous 1.177 (colored)

If a makefile if a multiple of the page size and doesn't end with a
newline, then it all goes horribly wrong when make tries to terminate
the last input line.
This was all ok before the mmap changes (rev 1.169) because the last
32 bytes of the input buffer were never read into.
The non-mmap case has a similar problem.
Bug found because my .depend files don't have a newline at the end of
the .OPTIO|NAL line (don't know if that is a local change).

Revision 1.177 / (download) - annotate - [select for diffs], Thu Mar 3 14:53:02 2011 UTC (3 years, 8 months ago) by nakayama
Branch: MAIN
CVS Tags: bouyer-quota2-nbase
Changes since 1.176: +6 -3 lines
Diff to previous 1.176 (colored)

Fix build on Solaris 10.

Revision 1.176 / (download) - annotate - [select for diffs], Sun Feb 20 23:12:09 2011 UTC (3 years, 9 months ago) by joerg
Branch: MAIN
Changes since 1.175: +4 -4 lines
Diff to previous 1.175 (colored)

Use the current directory at start time for .PARSEDIR, if the filename
contains no /.

Revision 1.175 / (download) - annotate - [select for diffs], Sun Feb 20 20:17:35 2011 UTC (3 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.174: +4 -4 lines
Diff to previous 1.174 (colored)

Remove the extra blank line after "Fatal errors encountered -- cannot
continue". This has been there since 1.1 but I don't think it was
intentional. If anyone actually cares about the blank line being there
for some reason, go ahead and revert this change...

Revision 1.174 / (download) - annotate - [select for diffs], Sun Feb 20 20:15:36 2011 UTC (3 years, 9 months ago) by dholland
Branch: MAIN
Changes since 1.173: +4 -4 lines
Diff to previous 1.173 (colored)

Remove stray extra newline in error message.

Revision 1.173 / (download) - annotate - [select for diffs], Sat Dec 25 21:39:11 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, bouyer-quota2-base
Branch point for: bouyer-quota2
Changes since 1.172: +4 -4 lines
Diff to previous 1.172 (colored)

erm. fix previous...

Revision 1.172 / (download) - annotate - [select for diffs], Sat Dec 25 20:46:18 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.171: +7 -5 lines
Diff to previous 1.171 (colored)

Maybe fix a problem that appeared on loonix.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Dec 25 17:19:04 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.170: +4 -3 lines
Diff to previous 1.170 (colored)

Uses stat; needs sys/stat.h. No idea what's pulling it in implicitly on
NetBSD so I didn't notice. Woops. Noted by Kurt Schreiner on current-users.

Revision 1.170 / (download) - annotate - [select for diffs], Sat Dec 25 04:57:07 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.169: +265 -103 lines
Diff to previous 1.169 (colored)

Begin cleanup of the make parser: separate out the logic for reading files
from the parsing goo. This will now use mmap for reading if it works and
fall back to read only for pipes and such. Step 1 of a cleanup program
proposed without objection on tech-toolchain.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Dec 13 05:01:56 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.168: +4 -4 lines
Diff to previous 1.168 (colored)

typo in comment

Revision 1.168 / (download) - annotate - [select for diffs], Mon Dec 13 03:36:39 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.167: +4 -4 lines
Diff to previous 1.167 (colored)

Tables used by parser logic should be const.

Revision 1.167 / (download) - annotate - [select for diffs], Mon Dec 13 03:35:13 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.166: +3 -5 lines
Diff to previous 1.166 (colored)

Remove stray extern definition that's already in jobs.h.

Revision 1.166 / (download) - annotate - [select for diffs], Mon Dec 13 03:32:25 2010 UTC (3 years, 11 months ago) by dholland
Branch: MAIN
Changes since 1.165: +81 -36 lines
Diff to previous 1.165 (colored)

Cosmetic: declare types before variables, group variables by role,
update some comments, format comments properly, etc. No functional
change intended.

Revision 1.165 / (download) - annotate - [select for diffs], Mon Sep 13 15:36:57 2010 UTC (4 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.164: +9 -3 lines
Diff to previous 1.164 (colored)

Add meta.c which implements "meta" mode for make.
In this mode, a .meta file is created for each target, capturing
the expanded commands used, any command output, and if filemon(9)
is available, a record of system calls which are of interest.
Not enabled unless USE_META=yes is set when building make.
Also, if FILEMON_H exists, meta.c will be compiled to use filemon(9).

Revision 1.164 / (download) - annotate - [select for diffs], Mon May 24 21:04:49 2010 UTC (4 years, 6 months ago) by sjg
Branch: MAIN
Changes since 1.163: +12 -9 lines
Diff to previous 1.163 (colored)

Don't missinterpret targets that start with .info

Revision 1.163 / (download) - annotate - [select for diffs], Thu Apr 29 23:12:21 2010 UTC (4 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.162: +6 -3 lines
Diff to previous 1.162 (colored)

fflush stdout, before writing to stderr.

Revision 1.162 / (download) - annotate - [select for diffs], Thu Apr 8 17:41:29 2010 UTC (4 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.161: +8 -3 lines
Diff to previous 1.161 (colored)

Process .ERROR the same as .BEGIN, .END etc
so that it cannot be the default target.
Add unit-tests for .info - .error, and .ERROR.

Revision 1.161 / (download) - annotate - [select for diffs], Wed Apr 7 00:11:27 2010 UTC (4 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.160: +54 -5 lines
Diff to previous 1.160 (colored)

Add:

.error "message"
.warning "message"
	based on FreeBSD implementation.
	add .info while were at it.

.ERROR:	a target to run on error.
	We pass the failing GNode to PrintOnError so it can set
	.ERROR_TARGET.

.MAKE.MAKEFILE_PREFERENCE
	As a means to control make's list of prefered makefile names.
	(Default: "makefile Makefile")

.MAKE.DEPENDFILE
	Names the file to read dependencies from
	(Default ".depend")

.MAKE.MODE
	Processed after all makefiles are read.
	Can put make into "compat" mode (more to come).

Fix:

compat.c: Error code should not be sent to debug_file.
Make_DoAllVar: use DONE_ALLSRC to avoid processing a node multiple times.
ReadMakefile: we can simply use doing_depend to control setting MAKEFILE.

Revision 1.160 / (download) - annotate - [select for diffs], Thu Nov 19 00:30:25 2009 UTC (5 years ago) by sjg
Branch: MAIN
CVS Tags: matt-premerge-20091211
Changes since 1.159: +6 -3 lines
Diff to previous 1.159 (colored)

Add .unexport - the exact opposite of .export
and .unexport-env which unexport's all previously .export'd globals
as well as clearing environ[].
Allow's sys.mk near total controll.

Reviewed by: apb

Revision 1.159 / (download) - annotate - [select for diffs], Fri Nov 6 20:20:56 2009 UTC (5 years ago) by dsl
Branch: MAIN
Changes since 1.158: +10 -6 lines
Diff to previous 1.158 (colored)

Report lines that ought to contain a ':' operator but start with a '.'
as "Unknown directive" sinze they are more likely to be .elseif (etc).
Lets me close PR/37222!

Revision 1.158 / (download) - annotate - [select for diffs], Wed Oct 7 16:40:30 2009 UTC (5 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.157: +25 -10 lines
Diff to previous 1.157 (colored)

The parser used to break dependency lines at ';' without regard
for substitution patterns.  This (perhaps coupled with the
new handling of .for variables in ${:U<value>...) caused interesting
results for lines like:

.for file in ${LIST}
for-subst:       ${file:S;^;${here}/;g}

add a unit-test to keep an eye on this.

Revision 1.157 / (download) - annotate - [select for diffs], Fri Jan 23 21:26:30 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend
Changes since 1.156: +17 -17 lines
Diff to previous 1.156 (colored)

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

Revision 1.156 / (download) - annotate - [select for diffs], Fri Jan 16 20:50:24 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.155: +14 -19 lines
Diff to previous 1.155 (colored)

Parse_Error() really doesn't need to cruft up a dummy structure for curFile.
It only needs the 'fname' and 'lineno' fields - so just use NULL/0 when
curFile is NULL.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Jan 11 15:50:06 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.154: +47 -21 lines
Diff to previous 1.154 (colored)

Instead of stashing the body of every iteration of a .for loop, pass
Parse_SetInput() the name of a function to get the loop data blocks.
This should only be a change to the program logic.

Revision 1.154 / (download) - annotate - [select for diffs], Thu Jan 8 21:12:09 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.153: +25 -64 lines
Diff to previous 1.153 (colored)

Fix PR bin/1443 properly!
Ignore '=' and ' ' inside {} and () when looking for an assignment operator.
Also require the operator be immediately after any whitespace.
XXX mismatched (){} in variable modifiers will not DTRT.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Jan 4 20:17:36 2009 UTC (5 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.152: +16 -5 lines
Diff to previous 1.152 (colored)

Count () and {} when looking to the '=' that terminates the variable being
assigned to.
Should fix:  A.${B:S/=//} = c

Revision 1.152 / (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.151: +23 -23 lines
Diff to previous 1.151 (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.151 / (download) - annotate - [select for diffs], Sat Nov 29 17:50:11 2008 UTC (5 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.150: +14 -6 lines
Diff to previous 1.150 (colored)

Split For_Eval() into two functions.
For_Eval() is now only called for the first line of a .for.
For_Accum() is called for the subsequent lines.
Stops any problems with forLevel being left invalid after an error.
Use a return value of -1 from For_Eval() to mean 'skip input line' to stop
a .for line with a syntax error being reparsed by make.

Revision 1.150 / (download) - annotate - [select for diffs], Wed Nov 12 15:56:57 2008 UTC (6 years ago) by apb
Branch: MAIN
Changes since 1.149: +4 -4 lines
Diff to previous 1.149 (colored)

intFile.fd should be initialised to -1, not 0.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Nov 12 15:45:32 2008 UTC (6 years ago) by christos
Branch: MAIN
Changes since 1.148: +4 -6 lines
Diff to previous 1.148 (colored)

avoid using c99 struct named initializers because this is a host tool and
needs to be compiled by a host compiler which might not be c99 compliant.

Revision 1.148 / (download) - annotate - [select for diffs], Wed Oct 29 15:37:08 2008 UTC (6 years ago) by sjg
Branch: MAIN
CVS Tags: netbsd-5-base
Branch point for: netbsd-5
Changes since 1.147: +41 -22 lines
Diff to previous 1.147 (colored)

If Parse_Error is called after curFile is invalid, set it to a dummy
to avoid seg-fault.  Also the NULL filename will cause ParseVErrorInternal
to skip trying to report file and line number info.

If CondToken is called outside the context of a .if etc, variables in
the expression being parsed will already be expanded, so allow for
an unqouted number to jump us back into the compare logic.
This allows ${${SomeNumber:U42} > 0:?True:False} to work anywhere.

Job_Finish should process postCommands if it has commands or children.

Revision 1.147 / (download) - annotate - [select for diffs], Mon Oct 6 22:09:21 2008 UTC (6 years, 1 month ago) by joerg
Branch: MAIN
CVS Tags: matt-mips64-base2
Changes since 1.146: +11 -11 lines
Diff to previous 1.146 (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.146 / (download) - annotate - [select for diffs], Tue Jun 3 13:02:28 2008 UTC (6 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base
Changes since 1.145: +4 -3 lines
Diff to previous 1.145 (colored)

PR/38840: Pierre Pronchery: make crashes while parsing long lines in Makefiles

Revision 1.145 / (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-base2, yamt-pf42-base, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: yamt-pf42, wrstuden-revivesa
Changes since 1.144: +15 -15 lines
Diff to previous 1.144 (colored)

back all changes out until I fix it properly.

Revision 1.144 / (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.143: +18 -18 lines
Diff to previous 1.143 (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.143 / (download) - annotate - [select for diffs], Thu Jan 3 22:14:53 2008 UTC (6 years, 10 months ago) by dsl
Branch: MAIN
CVS Tags: matt-armv6-base
Changes since 1.142: +4 -3 lines
Diff to previous 1.142 (colored)

When we extend the buffer used to read makefiles (in order to read lines
longer than 32k) remember the new length so we DTRT for lines longer than 64k.
Should fix PR/37684

Revision 1.142 / (download) - annotate - [select for diffs], Mon Oct 22 15:36:13 2007 UTC (7 years, 1 month ago) by sjg
Branch: MAIN
CVS Tags: cube-autoconf-base, cube-autoconf
Changes since 1.141: +19 -8 lines
Diff to previous 1.141 (colored)

Allow .PATH<suffix> to be used for .include "".

Revision 1.141 / (download) - annotate - [select for diffs], Sat Oct 13 18:28:35 2007 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored)

strlen returns size_t

Revision 1.140 / (download) - annotate - [select for diffs], Sat Oct 13 11:08:05 2007 UTC (7 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.139: +22 -22 lines
Diff to previous 1.139 (colored)

When processing .include "../../foo.mk" lexically process the leading ../
against the directory name of the makefile being processed.
Shortens a lot of pathnames (especially in pkgsrc) and significantly
reduces the number of duplicate entries in .MAKE.MAKEFILES

Revision 1.139 / (download) - annotate - [select for diffs], Fri Oct 12 23:38:27 2007 UTC (7 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.138: +14 -23 lines
Diff to previous 1.138 (colored)

If we are going to save the names of all opened makefiles, do so when files
are first processed, not for every line of every loop inside the file.
When (attempting) to check for duplicate names, use the spaces between names
as separators rather than using strstr() - which is slow and wont find
duplicates after an incorect early match.
However the duplicate check is rather broken (especially for pkgsrc) where
names like ../../devel/atk/../../devel/glib2/../../devel/gettext-lib/ \
../../devel/gettext-lib/../../mk/buildlink3/../../mk/bsd.prefs.mk
which need (some form of) realpath() processing.
'cd pkgsrc/xaa/gtk2; make show-var VARNAME=.MAKE.MAKEFILES' shows the problem.

Revision 1.138 / (download) - annotate - [select for diffs], Fri Oct 12 23:13:16 2007 UTC (7 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.137: +5 -6 lines
Diff to previous 1.137 (colored)

static a const string.

Revision 1.137 / (download) - annotate - [select for diffs], Mon Oct 8 20:26:36 2007 UTC (7 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.136: +46 -3 lines
Diff to previous 1.136 (colored)

Use .MAKE.MAKEFILES to track all the makefiles that have been read
so they can be used in dependency rules.

Revision 1.136 / (download) - annotate - [select for diffs], Fri Oct 5 15:27:45 2007 UTC (7 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.135: +11 -4 lines
Diff to previous 1.135 (colored)

Add the ability to .export variables to the environment.

Revision 1.135 / (download) - annotate - [select for diffs], Mon Oct 1 22:14:11 2007 UTC (7 years, 1 month ago) by sjg
Branch: MAIN
Changes since 1.134: +5 -3 lines
Diff to previous 1.134 (colored)

Add the ability to tweak the token output before targets in job mode.
Eg.
.MAKE.JOB.PREFIX=${.newline}---${.MAKE:T}[${.MAKE.PID}]
would produce
---make[1234] target ---

Revision 1.134 / (download) - annotate - [select for diffs], Wed May 23 19:03:56 2007 UTC (7 years, 6 months ago) by dsl
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.133: +3 -8 lines
Diff to previous 1.133 (colored)

Delete some comments that refer to long-extinct code.

Revision 1.133 / (download) - annotate - [select for diffs], Sat Feb 24 17:55:54 2007 UTC (7 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.132: +6 -6 lines
Diff to previous 1.132 (colored)

Don't increment 'cp' twice when looking for commands following ';' on a
dependency line.
This makes the line "foo:;echo bar" not try to execute "cho bar", and the
line "baz:;" not treat the rest of the makefile as commands.
Pointed out by Takahiro Kambe on current-users.

Revision 1.132 / (download) - annotate - [select for diffs], Sun Feb 4 19:23:49 2007 UTC (7 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.131: +12 -12 lines
Diff to previous 1.131 (colored)

Add code to ensure that .if/.endif are correctly nested with .for/.endfor
and also include files don't have mismatched .if/.endif
It has been suggested that make used to have this test, but I can't
remember removing any code that might have performed it.

Revision 1.131 / (download) - annotate - [select for diffs], Wed Jan 24 21:43:01 2007 UTC (7 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.130: +14 -13 lines
Diff to previous 1.130 (colored)

Check of open conditionals before we trash 'curFile' - so we can actually
report the filename of the error (without core dumping!).
Also fix tests for reporting errors to the debug_file, and don't add $PWD
to (stdin).

Revision 1.130 / (download) - annotate - [select for diffs], Thu Jan 18 20:22:44 2007 UTC (7 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.129: +5 -5 lines
Diff to previous 1.129 (colored)

Don't delete '\' from before '#' in shell command lines.
Probably fixes build of pkgsrc:editors/xemacs.
Pointed out by Richard Earnshaw.

Revision 1.129 / (download) - annotate - [select for diffs], Mon Jan 15 01:26:32 2007 UTC (7 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.128: +8 -6 lines
Diff to previous 1.128 (colored)

Avoid coredumping. Found by accidentally running make instead of gmake
in java's control/make directory.

Revision 1.128 / (download) - annotate - [select for diffs], Tue Jan 2 23:22:37 2007 UTC (7 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.127: +4 -7 lines
Diff to previous 1.127 (colored)

Don't delete whitespace before a "\\\n" sequence. Somewhere I'd misread
the required behaviour and replaced it with something more sensible - except
for makefiles that contain "\n\t\\\n shell command"...

Revision 1.127 / (download) - annotate - [select for diffs], Mon Jan 1 21:47:32 2007 UTC (7 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.126: +299 -382 lines
Diff to previous 1.126 (colored)

Rework the code that separates the makefile into lines.
Instead of copying the file byte by byte into an expanding line buffer, just
scan the file buffer for (unescaped) newlines.
Escaped newlines (etc) are processed by modifying the file buffer later.
Speeds up 'nbmake obj' by a factor of 2.
I suspect it will do wonders for parts of pkgsrc as well, since it largely
eliminates cpu cycles from the false part of .ifs.

Revision 1.126 / (download) - annotate - [select for diffs], Mon Dec 18 15:06:16 2006 UTC (7 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.125: +3 -11 lines
Diff to previous 1.125 (colored)

From Anon Ymous:
Removed two "(void)&" constructs as there is no setjmp() or vfork() insight.
Flagged a few parameters __unused so this will compile with -Wextra now.

Revision 1.125 / (download) - annotate - [select for diffs], Sat Dec 16 08:59:29 2006 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.124: +114 -105 lines
Diff to previous 1.124 (colored)

Use open/read/close instead of stdio for makefiles.
Commons up the code for reading files and buffers, and allows a further
change where we don't copy the data out of the buffer when generating 'lines.
This will speed up makefile parsing (esp .if clauses).

Revision 1.124 / (download) - annotate - [select for diffs], Thu Dec 7 21:34:16 2006 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.123: +10 -9 lines
Diff to previous 1.123 (colored)

Revert part of a recent commit.
ParseEOF() shouldn't close the original file.

Revision 1.123 / (download) - annotate - [select for diffs], Thu Dec 7 21:07:01 2006 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.122: +87 -196 lines
Diff to previous 1.122 (colored)

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.

Revision 1.122 / (download) - annotate - [select for diffs], Mon Dec 4 21:34:47 2006 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.121: +27 -21 lines
Diff to previous 1.121 (colored)

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!

Revision 1.121 / (download) - annotate - [select for diffs], Sun Dec 3 20:40:44 2006 UTC (7 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.120: +188 -211 lines
Diff to previous 1.120 (colored)

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.

Revision 1.120 / (download) - annotate - [select for diffs], Fri Nov 17 22:07:39 2006 UTC (8 years ago) by dsl
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: netbsd-4
Changes since 1.119: +37 -212 lines
Diff to previous 1.119 (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.119 / (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.118: +37 -37 lines
Diff to previous 1.118 (colored)

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

Revision 1.118 / (download) - annotate - [select for diffs], Sun Oct 15 21:17:27 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.117: +45 -21 lines
Diff to previous 1.117 (colored)

Add some more explanitory comments.
Rename 'allsrc' to 'curSrcs' so that the variable passed to ParseDoSrc (etc)
has the same name as the local in the calling routine, rather than a name
that seems to imply a more global and persistent list.

Revision 1.117 / (download) - annotate - [select for diffs], Sun Oct 15 18:08:14 2006 UTC (8 years, 1 month ago) by dsl
Branch: MAIN
Changes since 1.116: +87 -85 lines
Diff to previous 1.116 (colored)

Change a 'while' loop to a 'for' loop so we can add 'free(line)' into the
loop continue part.  Remove the 'free(line)' from teh end of the loop body,
change the gotos into continues and collapse out some 'else if's.
All in the name of code transparency.  No functional changes.

Revision 1.116 / (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.115: +11 -11 lines
Diff to previous 1.115 (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.115 / (download) - annotate - [select for diffs], Sat Aug 26 18:17:42 2006 UTC (8 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.114: +10 -10 lines
Diff to previous 1.114 (colored)

More programs using efun.

Revision 1.114 / (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, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.113: +7 -9 lines
Diff to previous 1.113 (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.113 / (download) - annotate - [select for diffs], Fri Mar 31 21:05:34 2006 UTC (8 years, 7 months ago) by dsl
Branch: MAIN
Changes since 1.112: +4 -4 lines
Diff to previous 1.112 (colored)

There is no need to count jobs and job tokens.
If we don't create the job pipe, use the '-j n' option to limit the number
of tokens we will remove from the pipe.

Revision 1.112 / (download) - annotate - [select for diffs], Fri Mar 31 20:30:46 2006 UTC (8 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.111: +14 -10 lines
Diff to previous 1.111 (colored)

Coverity CID 544: Fix memory leak.

Revision 1.111 / (download) - annotate - [select for diffs], Tue Mar 28 17:41:35 2006 UTC (8 years, 8 months ago) by ginsbach
Branch: MAIN
Changes since 1.110: +13 -9 lines
Diff to previous 1.110 (colored)

- Change where variable substitution is done when processing traditional
  include statements so that if a variable expands to more than one file
  name make will "do the right thing".
- Add additional debug print

Reviewed by christos.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Feb 26 22:45:46 2006 UTC (8 years, 9 months ago) by apb
Branch: MAIN
Changes since 1.109: +6 -3 lines
Diff to previous 1.109 (colored)

Make ".WAIT" apply recursively to all children of nodes on the right
hand side of the .WAIT, except when the recursive interpretation would
cause a cycle in the dependency graph.

Discussed in tech-toolchain.  Reviewed by christos, sjg.

Revision 1.109 / (download) - annotate - [select for diffs], Sat Feb 11 20:59:49 2006 UTC (8 years, 9 months ago) by dsl
Branch: MAIN
Changes since 1.108: +30 -14 lines
Diff to previous 1.108 (colored)

Add some more debug prints.

Revision 1.108 / (download) - annotate - [select for diffs], Sun Jan 22 19:54:55 2006 UTC (8 years, 10 months ago) by dsl
Branch: MAIN
Changes since 1.107: +13 -6 lines
Diff to previous 1.107 (colored)

Make .NOTPARALLEL stop the job engine issuing more than one token (instead
of trying to de-jobify the make.
You can now put .NOTPARALLEL in a submake of a recursive make (where it is
using a job-token pipe from the outer make and have it only run a single job.
You can also specify .NOTPARRALEL in the root makefile of a large recursive
make and have the submakes run multiple commands.
Add some diagnostics printfs (enabled with -dp) to the parser.

Revision 1.107 / (download) - annotate - [select for diffs], Sat Dec 24 20:52:20 2005 UTC (8 years, 11 months ago) by perry
Branch: MAIN
Changes since 1.106: +5 -5 lines
Diff to previous 1.106 (colored)

Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.

Revision 1.106 / (download) - annotate - [select for diffs], Tue Aug 9 21:36:42 2005 UTC (9 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.105: +4 -4 lines
Diff to previous 1.105 (colored)

Add typedefs for DuplicateProc and FreeProc from Max Okumoto.

Revision 1.105 / (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.104: +25 -25 lines
Diff to previous 1.104 (colored)

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

Revision 1.104 / (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.103: +8 -8 lines
Diff to previous 1.103 (colored)

More KNF cleanups from Max Okumoto

Revision 1.103 / (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.102: +46 -46 lines
Diff to previous 1.102 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jun 18 14:32:04 2005 UTC (9 years, 5 months ago) by rpaulo
Branch: MAIN
Changes since 1.101: +10 -3 lines
Diff to previous 1.101 (colored)

PR standards/17732: make doesn't honour escaped comment lines. Now with
a real fix.
Ok'ed by sjg and hubertf.

Revision 1.101 / (download) - annotate - [select for diffs], Thu Jun 16 14:54:10 2005 UTC (9 years, 5 months ago) by rpaulo
Branch: MAIN
Changes since 1.100: +0 -8 lines
Diff to previous 1.100 (colored)

Back it out while I'm working on a real fix without introducing new bugs.

Revision 1.100 / (download) - annotate - [select for diffs], Wed Jun 15 22:26:54 2005 UTC (9 years, 5 months ago) by rpaulo
Branch: MAIN
Changes since 1.99: +11 -3 lines
Diff to previous 1.99 (colored)

PR bin/17732: Allow make to understand escaped comments.
Approved by sjg, christos and hubertf.

Revision 1.99 / (download) - annotate - [select for diffs], Sun May 8 00:38:48 2005 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.98: +4 -9 lines
Diff to previous 1.98 (colored)

Now that dependencies in .BEGIN, .END, and .INTERRUPT work, allow them.

Revision 1.98 / (download) - annotate - [select for diffs], Sun May 1 01:25:36 2005 UTC (9 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.97: +10 -5 lines
Diff to previous 1.97 (colored)

Don't accept dependencies for .BEGIN, .END, and .INTERRUPT since they
don't make sense or work anyway.

Revision 1.97 / (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
Branch point for: netbsd-3
Changes since 1.96: +84 -84 lines
Diff to previous 1.96 (colored)

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

Revision 1.96 / (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.95: +4 -4 lines
Diff to previous 1.95 (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.95 / (download) - annotate - [select for diffs], Sat Mar 6 03:57:07 2004 UTC (10 years, 8 months ago) by enami
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.94: +18 -12 lines
Diff to previous 1.94 (colored)

Print useful line number on error while executing .for directive.

Revision 1.94 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:56 2003 UTC (11 years, 3 months ago) by agc
Branch: MAIN
Changes since 1.93: +33 -3 lines
Diff to previous 1.93 (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.93 / (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.92: +15 -13 lines
Diff to previous 1.92 (colored)

Pass WARNS=3

Revision 1.92 / (download) - annotate - [select for diffs], Sun Mar 23 22:48:35 2003 UTC (11 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.91: +6 -4 lines
Diff to previous 1.91 (colored)

Comment in ParseDoSrc was no longer accurate.
Explain the difference between handling of src node
in ParseDoSpecialSrc cf. ParseDoSrc.

Revision 1.91 / (download) - annotate - [select for diffs], Sun Mar 23 05:11:22 2003 UTC (11 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.90: +4 -4 lines
Diff to previous 1.90 (colored)

We are supposed to pass the node for our expanded src to ParseAddDep
for each entry in allsrc.  Just like ParseDoSrc.  The only difference
in handling these special expanded srcs in in the call to ParseLinkSrc.

Revision 1.90 / (download) - annotate - [select for diffs], Sat Mar 22 23:41:02 2003 UTC (11 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.89: +31 -7 lines
Diff to previous 1.89 (colored)

ParseDoSpecialSrc: since we're already being called for each target
make it depend only on the expansion of src that matches.
Otherwise given:

a b c:  ${.TARGET}.x

a b and c will each depend on a.x, b.x and c.x

Further, we only _need_ to do ParseDoSpecialSrc if a .WAIT appears
in the source list - so establish that up front.

Revision 1.89 / (download) - annotate - [select for diffs], Fri Mar 21 19:14:53 2003 UTC (11 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.88: +10 -3 lines
Diff to previous 1.88 (colored)

don't mess with suffix rules.

Revision 1.88 / (download) - annotate - [select for diffs], Fri Mar 21 16:48:21 2003 UTC (11 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.87: +4 -4 lines
Diff to previous 1.87 (colored)

Missed a s/tn->name/pref/

Revision 1.87 / (download) - annotate - [select for diffs], Fri Mar 21 15:52:57 2003 UTC (11 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.86: +79 -7 lines
Diff to previous 1.86 (colored)

Add ParseDoSpecialSrc() to handle srcs that refer to ${.TARGET} etc.
These are expanded for each target (set in its own context) and
ParseDoSrc() is then called for the expanded src.

PR: 20828
Reviewed by: christos

Revision 1.86 / (download) - annotate - [select for diffs], Sun Dec 1 05:53:30 2002 UTC (11 years, 11 months ago) by sjg
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.85: +10 -10 lines
Diff to previous 1.85 (colored)

Parse_DoVar: don't free cp until we are done with it!

Reviewed by: hannken

Revision 1.85 / (download) - annotate - [select for diffs], Tue Nov 26 06:13:01 2002 UTC (12 years ago) by sjg
Branch: MAIN
Changes since 1.84: +15 -3 lines
Diff to previous 1.84 (colored)

Whenever we update .PATH, set the variable ${.PATH} to reflect the
search list that will be used.  Thus 'dot' and 'cur' will appear in
${.PATH} either at the start or end depending on .DOTLAST even though
they are not strictly in dirSearchPath.

When .CURDIR is assigned to - re-set the 'cur' Path.

Finally, when checking subdirs, look in 'dot' and 'cur' (first or last
depending on .DOTLAST) just as we do in other situations.

Revision 1.84 / (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.83: +119 -150 lines
Diff to previous 1.83 (colored)

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

Revision 1.83 / (download) - annotate - [select for diffs], Wed Mar 20 18:10:31 2002 UTC (12 years, 8 months ago) by pk
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, netbsd-1-6
Changes since 1.82: +5 -3 lines
Diff to previous 1.82 (colored)

Xref: parse.c, rev 1.46; make.c, rev 1.23

In these revisions `::' dependency handling was simplified by not linking
the cohort nodes into the dependency graph. This broke dependency checking
on all but the first instance of a `::' target since all of the cohort nodes
now just form a collection of disconnected dependency graphs.

Fix this by keeping a back-reference in each cohort to its leader (the
first instance of a :: node with the same name) and a count of the number
of cohorts that need to be made before dependent nodes are scheduled.

Classically, we'd need six centurions for cohort, but in this case one
suffices...

Revision 1.82 / (download) - annotate - [select for diffs], Thu Feb 21 22:21:34 2002 UTC (12 years, 9 months ago) by reinoud
Branch: MAIN
Changes since 1.81: +70 -76 lines
Diff to previous 1.81 (colored)

Pull every file parsing context into one structure instead of using a few
file global variables... adding an extra context variable is thus allmost
trivial now.

Revision 1.81 / (download) - annotate - [select for diffs], Sun Feb 17 23:53:46 2002 UTC (12 years, 9 months ago) by pk
Branch: MAIN
Changes since 1.80: +4 -3 lines
Diff to previous 1.80 (colored)

Add the default main target to the ${.TARGETS} variable, too.

Revision 1.80 / (download) - annotate - [select for diffs], Mon Feb 4 17:24:56 2002 UTC (12 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.79: +3 -5 lines
Diff to previous 1.79 (colored)

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

Revision 1.79 / (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.78: +5 -3 lines
Diff to previous 1.78 (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.78 / (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.77: +8 -11 lines
Diff to previous 1.77 (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.77 / (download) - annotate - [select for diffs], Sat Jan 26 20:42:14 2002 UTC (12 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.76: +50 -14 lines
Diff to previous 1.76 (colored)

Process escaped characters properly. Now:

foo\:bar:
	touch $@

works. Of course I am lazy right now, and I am not removing the '\' escapes
so the output looks fine, but it is functionally correct.

Revision 1.76 / (download) - annotate - [select for diffs], Thu Jan 24 01:39:03 2002 UTC (12 years, 10 months ago) by reinoud
Branch: MAIN
Changes since 1.75: +19 -20 lines
Diff to previous 1.75 (colored)

Small update to make(1) to let it follow more its own guidelines ! ... This
patch makes sure that files included using ".include <bsd.own.mk>" are
really looked for in the system make file directory or in the specified -m
paths instead of allways looking in the other -I and .PATH specified paths
... This speeds up the make a few procents at times for all the system make
files are now found directly instead of searching several paths, saving a
lot of stat() calls.

The number of stat calls is still exorbirant hight though... 910 or so for
making `make' alone ....

Revision 1.75 / (download) - annotate - [select for diffs], Wed Oct 31 03:59:42 2001 UTC (13 years, 1 month ago) by tv
Branch: MAIN
Changes since 1.74: +13 -5 lines
Diff to previous 1.74 (colored)

Overhaul the initialization and handling of .OBJDIR:

* Replace chdir_verify_path() with Main_SetObjdir(), which can be called
  externally, and can take a "const char *".  (There's a lot of non-const
  "char *" passing around in var.c of what should be const strings....)

* Rewrite the initial "find my .OBJDIR" code to make use of the new
  function.  This still functions as it had in the past, but the comment
  above this block was changed to reflect reality:  if MAKEOBJDIRPREFIX
  or MAKEOBJDIR are set in the environment, then *only that value* is
  tried; make does not fall back to obj.MACHINE, obj, and /usr/obj/`pwd`
  as it would without these env vars set.

* Add a new special target, .OBJDIR:, which when parsed will cause make to
  change to a new object directory and reset .OBJDIR, and PWD in the
  environment.  This will allow some makefiles (mainly, src/tools)
  to override the default objdir semantics in order to add custom logic.

Revision 1.74 / (download) - annotate - [select for diffs], Wed Oct 31 01:15:57 2001 UTC (13 years, 1 month ago) by tv
Branch: MAIN
Changes since 1.73: +10 -6 lines
Diff to previous 1.73 (colored)

Allow "-m" to be used in a .MAKEFLAGS: special target and get it to work.
(This splits out the "default system include paths" into its own Lst
variable, and uses it only if sysIncPath is empty.  This allows sysIncPath
to be filled in by the Makefile itself.)

Revision 1.73 / (download) - annotate - [select for diffs], Mon Sep 24 13:22:35 2001 UTC (13 years, 2 months ago) by wiz
Branch: MAIN
Changes since 1.72: +3 -4 lines
Diff to previous 1.72 (colored)

va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.

Revision 1.72 / (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.71: +4 -4 lines
Diff to previous 1.71 (colored)

precede, not preceed.

Revision 1.71 / (download) - annotate - [select for diffs], Tue Jul 3 18:08:51 2001 UTC (13 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.70: +4 -3 lines
Diff to previous 1.70 (colored)

add .USEBEFORE Attribute

Revision 1.70 / (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.69: +12 -12 lines
Diff to previous 1.69 (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.69 / (download) - annotate - [select for diffs], Sun Jun 10 02:31:00 2001 UTC (13 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.68: +5 -5 lines
Diff to previous 1.68 (colored)

Simplify the exporting of VAR_CMD's via MAKEFLAGS.
We now just list the names of such variables in .MAKEOVERRIDES.
When we come to export MAKEFLAGS we quote the value of each exported variable
using :Q, using: ${.MAKEOVERRIDES:O:u:@v@$v=${$v:Q}@}
The :O:u suppresses duplicate names.
Also modifed Parse_DoVar to re-export MAKEFLAGS whenever .MAKEOVERRIDES
is assigned to so .MAKEOVERRIDES+= PATH will export PATH=${PATH:Q}
to the environment, while .MAKEOVERRIDES= will disable export of VAR_CMD's.

Revision 1.68 / (download) - annotate - [select for diffs], Sat Jun 9 05:22:47 2001 UTC (13 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.67: +5 -3 lines
Diff to previous 1.67 (colored)

Modify handling of command line variable assignments and their exporting
via MAKEFLAGS.  Instead of appending them directly to .MAKEFLAGS, put
them in .MAKEOVERRIDES (and ensure they are quoted).  This is now done
in Var_Set when it exports VAR_CMD's.
Use ExportMAKEFLAGS() to export MAKEFLAGS, using the combined content
of .MAKEFLAGS and .MAKEOVERRIDES (with duplicate supression).
If .MAKEFLAGS is assigned to in a Makefile, ExportMAKEFLAGS is called again.
This allows a line like:
.MAKEOVERRIDES=
to effectively stop the exporting of the command line vars in MAKEFLAGS.

Revision 1.67 / (download) - annotate - [select for diffs], Sat Jun 2 18:04:44 2001 UTC (13 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.66: +4 -4 lines
Diff to previous 1.66 (colored)

Avoid being overly specific since the unresolved merge conflict tags
we detect could have come from something other than cvs.

Revision 1.66 / (download) - annotate - [select for diffs], Sat Jun 2 16:17:08 2001 UTC (13 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.65: +5 -4 lines
Diff to previous 1.65 (colored)

mention `cvs' in the the previous hack so that the clueless get a clue.

Revision 1.65 / (download) - annotate - [select for diffs], Sat Jun 2 14:25:23 2001 UTC (13 years, 5 months ago) by sommerfeld
Branch: MAIN
Changes since 1.64: +11 -5 lines
Diff to previous 1.64 (colored)

Gratuitous make(1) hack of the morning: if operator-less lines start
with merge delimeters (<<<<<<, ======, >>>>>>), report "Makefile
contains unresolved merge conflict" rather than "Need an operator".

Revision 1.64 / (download) - annotate - [select for diffs], Fri Jun 1 20:33:38 2001 UTC (13 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.63: +4 -3 lines
Diff to previous 1.63 (colored)

A number of semi-related changes.
1. make -dx turns on DEBUG_SHELL which causes sh -x to be used where
   possible.
2. PrintOnError() is now called when make is stopping due to an error.
   This routine reports the curdir and the value of any variables listed
   in MAKE_PRINT_VAR_ON_ERROR.
3. Variables set via command line, are propagated to child-makes via
   MAKEFLAGS.  This behaviour appears to be necessary for POSIX (according
   to the GNU folk anyway).
4. Do not reset MAKEFILE when reading ".depend" as this rather eliminates the
   usefulness of ${MAKEFILE}.
5. Added ${.newline} as a simple means of being able to include \n in the
   result of a :@ loop expansion.
6. Set ${MAKE_VERSION} if defined.  Need to come up with a useful value.

Reviewed: christos

Revision 1.63 / (download) - annotate - [select for diffs], Fri Feb 23 21:11:38 2001 UTC (13 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.62: +15 -7 lines
Diff to previous 1.62 (colored)

PR/12251: Thomas Klausner: Make core dumps on unclosed conditional.
Well, it should say 'make core-dumps on any error on the primary makefile'.
This was a result of the new changes to print the path to the parsed
Makefile... Made the code a lot more conservative, plus prepended <progname>:
to each message.

Revision 1.62 / (download) - annotate - [select for diffs], Sun Jan 14 20:54:16 2001 UTC (13 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.61: +8 -6 lines
Diff to previous 1.61 (colored)

Once again, do the warning in a format that doesn't completely blow, and that
corresponds with text in the man page.  Also split it into 2 pieces that can
both be used with, e.g., C-x` in Emacs.

Revision 1.61 / (download) - annotate - [select for diffs], Sun Jan 14 06:02:25 2001 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.60: +7 -7 lines
Diff to previous 1.60 (colored)

convert error messages into english

Revision 1.60 / (download) - annotate - [select for diffs], Sun Jan 14 05:41:08 2001 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.59: +11 -3 lines
Diff to previous 1.59 (colored)

We cannot override commands yet, ignore the additional sets for now.
This will be reverted when the tree is fixed.

Revision 1.59 / (download) - annotate - [select for diffs], Sun Jan 14 05:34:06 2001 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.58: +32 -8 lines
Diff to previous 1.58 (colored)

- make the second list of commands override the first like gmake does
- remember where the first command definition occured so that we can debug
  things.

Revision 1.58 / (download) - annotate - [select for diffs], Sat Jan 13 20:36:58 2001 UTC (13 years, 10 months ago) by cgd
Branch: MAIN
Changes since 1.57: +1 -3 lines
Diff to previous 1.57 (colored)

back out the change in rev 1.57.  it was misguided; see discussion
on current-users (subject "build problem - multibyte.c").

Revision 1.57 / (download) - annotate - [select for diffs], Fri Jan 12 09:27:44 2001 UTC (13 years, 10 months ago) by jdolecek
Branch: MAIN
Changes since 1.56: +6 -4 lines
Diff to previous 1.56 (colored)

only print the 'duplicate script for target' warning if
parseWarnFatal is on

Revision 1.56 / (download) - annotate - [select for diffs], Wed Jan 10 15:54:00 2001 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.55: +16 -6 lines
Diff to previous 1.55 (colored)

PR/11800: Chris Demetriou: Add -W flag to exit on parse warnings.
While I am here, s/make:.*"/%s:\1", progname/

Revision 1.55 / (download) - annotate - [select for diffs], Sun Jan 7 06:08:33 2001 UTC (13 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.54: +18 -4 lines
Diff to previous 1.54 (colored)

Always try an give the absolute pathname of the Makefile that we got an error in.
Use .PARSEDIR if set and not '.', otherwise .CURDIR to qualify the Makefile's path.

Revision 1.54 / (download) - annotate - [select for diffs], Tue Dec 5 17:07:01 2000 UTC (13 years, 11 months ago) by sommerfeld
Branch: MAIN
Changes since 1.53: +4 -4 lines
Diff to previous 1.53 (colored)

Boolean consistancy (use TRUE, not 1)

Revision 1.53 / (download) - annotate - [select for diffs], Wed Oct 11 14:46:12 2000 UTC (14 years, 1 month ago) by is
Branch: MAIN
Changes since 1.52: +7 -5 lines
Diff to previous 1.52 (colored)

More format string cleanup by sommerfeld.

Revision 1.52 / (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-ALPHA2
Branch point for: netbsd-1-5
Changes since 1.51: +7 -9 lines
Diff to previous 1.51 (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.51 / (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.50: +9 -7 lines
Diff to previous 1.50 (colored)

Back out last night's optimization for now.

Revision 1.50 / (download) - annotate - [select for diffs], Sat Jun 10 21:44:08 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.49: +7 -13 lines
Diff to previous 1.49 (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.49 / (download) - annotate - [select for diffs], Sat Jun 10 13:48:48 2000 UTC (14 years, 5 months ago) by mycroft
Branch: MAIN
Changes since 1.48: +7 -3 lines
Diff to previous 1.48 (colored)

Nuke an `optimization' that made source list creation O(n^2).  This may cause
more memory to be used with stupid Makefiles, but it saves a fair amount of
time (~13% just for libc) with sane ones.

Revision 1.48 / (download) - annotate - [select for diffs], Thu May 11 08:22:40 2000 UTC (14 years, 6 months ago) by sjg
Branch: MAIN
CVS Tags: minoura-xpg4dl-base
Branch point for: minoura-xpg4dl
Changes since 1.47: +14 -3 lines
Diff to previous 1.47 (colored)

allow .POSIX to define %POSIX as in FreeBSD

Revision 1.47 / (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.46: +5 -5 lines
Diff to previous 1.46 (colored)

Some minor cleanup of :: tests.

Revision 1.46 / (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.45: +17 -40 lines
Diff to previous 1.45 (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.45 / (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.44: +11 -3 lines
Diff to previous 1.44 (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.44 / (download) - annotate - [select for diffs], Mon Aug 9 21:06:28 1999 UTC (15 years, 3 months ago) by aidan
Branch: MAIN
Changes since 1.43: +46 -3 lines
Diff to previous 1.43 (colored)

Added .PARSEDIR and .PARSEFILE variables to make(1).

Revision 1.43 / (download) - annotate - [select for diffs], Wed Aug 4 02:54:57 1999 UTC (15 years, 3 months ago) by ross
Branch: MAIN
Changes since 1.42: +5 -5 lines
Diff to previous 1.42 (colored)

Trivial speed hack.

Revision 1.42 / (download) - annotate - [select for diffs], Wed Jun 2 18:47:11 1999 UTC (15 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.41: +11 -3 lines
Diff to previous 1.41 (colored)

Fix awful bug where:

	V := $V foo
	V := $V bar

would report that variable V is recursive...

Revision 1.41 / (download) - annotate - [select for diffs], Tue Nov 17 23:56:23 1998 UTC (16 years ago) by ross
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE
Branch point for: netbsd-1-4
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored)

Fix a bug that apparently prevented, since day 1, the .-include / .sinclude
feature from ever working. Also, fix the man page that incorrectly described
the syntax of the feature that didn't work.

Revision 1.40 / (download) - annotate - [select for diffs], Fri Nov 6 23:31:09 1998 UTC (16 years ago) by christos
Branch: MAIN
Changes since 1.39: +16 -16 lines
Diff to previous 1.39 (colored)

- full prototypes
- more conservative printf
- char -> unsigned char

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

PR/6174: ITOH Yasufumi: Purify bug and a compile error in utility code.

Revision 1.38 / (download) - annotate - [select for diffs], Thu Aug 6 13:42:22 1998 UTC (16 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.37: +206 -116 lines
Diff to previous 1.37 (colored)

- Add {.,}[s-]include for silent include file failures
- Make traditional include statement include more than one file if present
  on the line.

Keeping up with the other's :-)

Revision 1.37 / (download) - annotate - [select for diffs], Mon Mar 23 08:52:48 1998 UTC (16 years, 8 months ago) by fair
Branch: MAIN
Changes since 1.36: +9 -9 lines
Diff to previous 1.36 (colored)

patch from PR#3573 to rename a variable "main" to "mainList"

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

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

Revision 1.35 / (download) - annotate - [select for diffs], Fri Jul 11 20:17:37 1997 UTC (17 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored)

#if __STDC__ -> #ifdef __STDC__

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

Add WARNS=1
RCSID police

Revision 1.33 / (download) - annotate - [select for diffs], Fri May 9 04:08:26 1997 UTC (17 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.32: +12 -2 lines
Diff to previous 1.32 (colored)

Make sure to propagate OP_PHONY to all cohorts that already existed.

Revision 1.32 / (download) - annotate - [select for diffs], Thu May 8 21:24:48 1997 UTC (17 years, 6 months ago) by gwr
Branch: MAIN
Changes since 1.31: +7 -4 lines
Diff to previous 1.31 (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.31 / (download) - annotate - [select for diffs], Wed May 7 13:12:33 1997 UTC (17 years, 6 months ago) by mycroft
Branch: MAIN
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored)

Copy the .PHONY attribute to the cohorts of a double dependency.

Revision 1.30 / (download) - annotate - [select for diffs], Fri May 2 14:24:30 1997 UTC (17 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.29: +4 -4 lines
Diff to previous 1.29 (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.29 / (download) - annotate - [select for diffs], Mon Mar 10 21:20:04 1997 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.28: +3 -2 lines
Diff to previous 1.28 (colored)

Add a .MADE directive to indicated that the children of a target are
up-to-date, even when they are not. This is to simulate our current
make install behavior with proper dependencies.

Revision 1.28 / (download) - annotate - [select for diffs], Tue Dec 31 17:55:28 1996 UTC (17 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

add a missing 'static' decl.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:20 1996 UTC (18 years ago) by christos
Branch: MAIN
Changes since 1.26: +100 -119 lines
Diff to previous 1.26 (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.26 / (download) - annotate - [select for diffs], Fri Sep 27 02:36:58 1996 UTC (18 years, 2 months ago) by thorpej
Branch: MAIN
Changes since 1.25: +3 -3 lines
Diff to previous 1.25 (colored)

Fix extra "make:" and newline in error message.
From enami tsugutomo <enami@ba2.so-net.or.jp>, PR #2651.

Revision 1.25 / (download) - annotate - [select for diffs], Fri Sep 13 04:22:09 1996 UTC (18 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.24: +14 -7 lines
Diff to previous 1.24 (colored)

- Fix bug where the first line after a conditionally skipped was not ready
  in its entirety if it contained a continuation.
- Print the whole error line, not just the first 20 characters of it.

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

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

Revision 1.23 / (download) - annotate - [select for diffs], Tue May 28 23:34:46 1996 UTC (18 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.22: +44 -143 lines
Diff to previous 1.22 (colored)

- Move -D flags from Makefile to config.h and explain what they do. Add
  -Wall -Wno-unused to CFLAGS. Add new define SYSVVARSUB to enable SysV
  style variable substitutions and enable them.
- Add SunOS style command substitutions via SUNSHCMD
- Fix core dump with '{variable = value'

Revision 1.22 / (download) - annotate - [select for diffs], Fri Mar 15 21:52:41 1996 UTC (18 years, 8 months 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.21: +5 -2 lines
Diff to previous 1.21 (colored)

Add PHONY attribute and target. This is the first step to cleanup the
xinstall and xlint crud.

Revision 1.21 / (download) - annotate - [select for diffs], Wed Mar 6 00:15:23 1996 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.20: +2 -21 lines
Diff to previous 1.20 (colored)

Fix PR/2118; apply sysincludes patch.

Revision 1.20 / (download) - annotate - [select for diffs], Sat Feb 17 13:28:09 1996 UTC (18 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.19: +4 -3 lines
Diff to previous 1.19 (colored)

if PR/2090, sysvinclude too optimistic, did not check for space after the
include keyword

Revision 1.19 / (download) - annotate - [select for diffs], Wed Feb 7 23:04:04 1996 UTC (18 years, 9 months ago) by thorpej
Branch: MAIN
Changes since 1.18: +9 -5 lines
Diff to previous 1.18 (colored)

In ParseDoInclude(), make a temporary copy of the current file name
while searching for ""-type include files, since the current file name
might not be a writeable string.

Revision 1.18 / (download) - annotate - [select for diffs], Sat Dec 16 05:03:13 1995 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.17: +89 -16 lines
Diff to previous 1.17 (colored)

- Added .WAIT to synchronize between sources like other pmake variants.
- Updated documentation to include .ORDER .PARALLEL .NO_PARALLEL .NONPARALLEL

Revision 1.17 / (download) - annotate - [select for diffs], Thu Nov 2 23:55:03 1995 UTC (19 years ago) by christos
Branch: MAIN
Changes since 1.16: +7 -3 lines
Diff to previous 1.16 (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.16 / (download) - annotate - [select for diffs], Sun Sep 10 03:58:16 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.15: +51 -40 lines
Diff to previous 1.15 (colored)

Fix PR/1443:
Dependency rules with `=' in the lhs are parsed as variable assignments.
E.g., the following Makefile fails:

A=a b c d
all: $(A:%=%b)
$(A:%=%b):
	@echo $@

Revision 1.15 / (download) - annotate - [select for diffs], Wed Jun 14 15:19:48 1995 UTC (19 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.14: +7 -2 lines
Diff to previous 1.14 (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.14 / (download) - annotate - [select for diffs], Mon May 15 13:10:10 1995 UTC (19 years, 6 months ago) by ws
Branch: MAIN
Changes since 1.13: +2 -2 lines
Diff to previous 1.13 (colored)

Sort keyword table correctly, so binary search really works

Revision 1.13 / (download) - annotate - [select for diffs], Wed Feb 8 04:36:41 1995 UTC (19 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.12: +4 -3 lines
Diff to previous 1.12 (colored)

Fixed so that orphan tabs are ignored. Should close PR760.

Revision 1.12 / (download) - annotate - [select for diffs], Fri Jan 6 19:57:31 1995 UTC (19 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.11: +17 -1 lines
Diff to previous 1.11 (colored)

Fixes from Paul Borman (prb@bsdi.com)
1. Honor environment variable $MACHINE if set over uname.machine
2. archives with :: are always out of date, even when they have no children.
3. VAR= a b c     # comment, gets the trailing blanks trimmed, unless
   escaped by \. I'll have to read the posix manul to make sure that it
   is ok to handle escapes here.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Oct 18 20:36:26 1994 UTC (20 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.10: +11 -5 lines
Diff to previous 1.10 (colored)

Deal with lines that contain only spaces, per PR 515, but implemented
differently.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 18 20:16:13 1994 UTC (20 years, 1 month ago) by mycroft
Branch: MAIN
Changes since 1.9: +1 -5 lines
Diff to previous 1.9 (colored)

Remove an outdated comment that is very confusing.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:39 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.8: +85 -52 lines
Diff to previous 1.8 (colored)

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

Revision 1.8 / (download) - annotate - [select for diffs], Sat May 21 16:36:01 1994 UTC (20 years, 6 months ago) by jtc
Branch: MAIN
Changes since 1.7: +2 -2 lines
Diff to previous 1.7 (colored)

Fix from Thorsten Lockert: don't ignore \ before # characters
in strings (Fixes bug 255).

Revision 1.7 / (download) - annotate - [select for diffs], Mon Mar 7 22:22:05 1994 UTC (20 years, 8 months ago) by cgd
Branch: MAIN
Changes since 1.6: +21 -2 lines
Diff to previous 1.6 (colored)

kill some warnings, from Christos.

Revision 1.6 / (download) - annotate - [select for diffs], Sat Mar 5 01:58:23 1994 UTC (20 years, 8 months ago) by jtc
Branch: MAIN
Changes since 1.5: +4 -9 lines
Diff to previous 1.5 (colored)

Apply fix that was lost when Christos Zoulas' changes were integrated:
  Shell commands start with tabs, not whitespace.  Pmake's
  POSIX behavior must have been derrived from an early draft.

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

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

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

Include appropriate header files to bring prototypes into scope.

Revision 1.3 / (download) - annotate - [select for diffs], Fri Dec 17 23:52:04 1993 UTC (20 years, 11 months ago) by jtc
Branch: MAIN
Changes since 1.2: +4 -9 lines
Diff to previous 1.2 (colored)

Fix bug #47.  Shell commands start with tabs, not whitespace.  Pmake's
POSIX behavior must have been derrived from an early draft.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:44 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>