The NetBSD Project

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

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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: MAIN


Revision 1.254 / (download) - annotate - [select for diffs], Sun Mar 10 02:53:37 2024 UTC (2 weeks, 5 days ago) by sjg
Branch: MAIN
CVS Tags: HEAD
Changes since 1.253: +4 -2 lines
Diff to previous 1.253 (colored) to selected 1.4 (colored)

make: record exit status in GNode

SetErrorVars can now set .ERROR_EXIT which allows
a .ERROR target to ignore the case of .ERROR_EXIT == 6
which means failure happened elsewhere.

Reviewed by:

Revision 1.253 / (download) - annotate - [select for diffs], Fri Mar 1 16:41:42 2024 UTC (3 weeks, 6 days ago) by sjg
Branch: MAIN
Changes since 1.252: +3 -3 lines
Diff to previous 1.252 (colored) to selected 1.4 (colored)

make: export target scope values

Pass target scope to Var_ReexportVars so that a target process
will see the correct values in its env.
We must then mark any Global scope variable as unexported
so targets without local value get the Global one.

Revision 1.252 / (download) - annotate - [select for diffs], Fri Jan 5 23:22:06 2024 UTC (2 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.251: +5 -9 lines
Diff to previous 1.251 (colored) to selected 1.4 (colored)

make: miscellaneous cleanups

Revision 1.251 / (download) - annotate - [select for diffs], Tue Dec 26 20:09:42 2023 UTC (3 months ago) by sjg
Branch: MAIN
Changes since 1.250: +3 -4 lines
Diff to previous 1.250 (colored) to selected 1.4 (colored)

Move fflush to a point to catch all cases.

Revision 1.250 / (download) - annotate - [select for diffs], Tue Dec 26 17:12:33 2023 UTC (3 months ago) by sjg
Branch: MAIN
Changes since 1.249: +4 -2 lines
Diff to previous 1.249 (colored) to selected 1.4 (colored)

make: fix order of output in compat mode

Ensure that make's output is correctly ordered with the output of the
target's commands, even when the output does not go to a terminal.

Reviewed by: rillig

Revision 1.249 / (download) - annotate - [select for diffs], Sun Dec 24 16:48:30 2023 UTC (3 months ago) by sjg
Branch: MAIN
Changes since 1.248: +7 -6 lines
Diff to previous 1.248 (colored) to selected 1.4 (colored)

Compat_RunCommand call Shell_Init is shellPath is NULL

Since .SHELL is potentially used in compat mode as well,
the man page description should not imply it is only used in jobs mode.

Remove path="sh" from shell-sh unit-test - and it would have detected
this bug.

Reviewed by: rillig

Revision 1.248 / (download) - annotate - [select for diffs], Tue Dec 19 19:33:39 2023 UTC (3 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.247: +8 -37 lines
Diff to previous 1.247 (colored) to selected 1.4 (colored)

make: clean up comments

No binary change, except for line numbers in assertions.

Revision 1.247 / (download) - annotate - [select for diffs], Thu May 4 22:31:17 2023 UTC (10 months, 3 weeks ago) by sjg
Branch: MAIN
Changes since 1.246: +3 -3 lines
Diff to previous 1.246 (colored) to selected 1.4 (colored)

Compat_RunCommand mark bp volatile

gcc 4.8.5 (NetBSD 7.2) gets upset about bp.

Revision 1.246 / (download) - annotate - [select for diffs], Sat Mar 18 22:20:11 2023 UTC (12 months, 1 week ago) by sjg
Branch: MAIN
Changes since 1.245: +4 -3 lines
Diff to previous 1.245 (colored) to selected 1.4 (colored)

make: handle .PHONY consitently on interrupt

JobDeleteTarget skips .PHONY targets
CompatDeleteTarget should do the same

This addresses https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269663

Revision 1.245 / (download) - annotate - [select for diffs], Tue Feb 14 21:38:31 2023 UTC (13 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.244: +3 -3 lines
Diff to previous 1.244 (colored) to selected 1.4 (colored)

make: clean up calls to Var_Subst

None of the calls to Var_Subst used the return value, and the return
value was always VPR_OK.

No functional change.

Revision 1.244 / (download) - annotate - [select for diffs], Tue Jan 17 21:35:19 2023 UTC (14 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.243: +4 -3 lines
Diff to previous 1.243 (colored) to selected 1.4 (colored)

Accept whitespace between command specifiers @+- like gmake does. New binutils
does this.

Revision 1.243 / (download) - annotate - [select for diffs], Wed Dec 7 10:28:48 2022 UTC (15 months, 3 weeks ago) by rillig
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.242: +4 -4 lines
Diff to previous 1.242 (colored) to selected 1.4 (colored)

make: clean up comments

Revision 1.242 / (download) - annotate - [select for diffs], Mon Oct 10 21:17:25 2022 UTC (17 months, 2 weeks ago) by rillig
Branch: MAIN
Changes since 1.241: +3 -3 lines
Diff to previous 1.241 (colored) to selected 1.4 (colored)

make: change return type of unlink_file back to int

As unlink_file is a wrapper around unlink, use the same encoding for the
possible return values as in the wrapped function.  This consistency is
more important than expressing all possible return values in the return
type 'bool'.

https://mail-index.netbsd.org/tech-toolchain/2022/10/06/msg004155.html

No functional change.

Revision 1.241 / (download) - annotate - [select for diffs], Wed Aug 17 20:10:29 2022 UTC (19 months, 1 week ago) by rillig
Branch: MAIN
Changes since 1.240: +3 -3 lines
Diff to previous 1.240 (colored) to selected 1.4 (colored)

make: fix exit status for '-q' (since 1994)

Revision 1.240 / (download) - annotate - [select for diffs], Sat May 7 17:49:47 2022 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.239: +56 -4 lines
Diff to previous 1.239 (colored) to selected 1.4 (colored)

make: allow to randomize build order of targets

In complex dependency structures, when a build fails, a probable cause
is a missing dependency declaration between some files.  In compat mode,
the build order is deterministic, in jobs mode, it is somewhat
deterministic.  To explore more edge cases, add the line ".MAKE.MODE +=
randomize-targets" somewhere in the makefile.

Fixes PR bin/45226 by riastradh.  Reviewed by christos.

Revision 1.239 / (download) - annotate - [select for diffs], Sat May 7 08:01:20 2022 UTC (22 months, 3 weeks ago) by rillig
Branch: MAIN
Changes since 1.238: +6 -17 lines
Diff to previous 1.238 (colored) to selected 1.4 (colored)

make: rename Compat_Run to Compat_MakeAll

No functional change.

Revision 1.238 / (download) - annotate - [select for diffs], Sat Jan 22 18:59:23 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.237: +5 -5 lines
Diff to previous 1.237 (colored) to selected 1.4 (colored)

make: add missing newline after "cannot continue" message

It was wrong of Parse_File to output an unfinished line and hope for
some other code to finish it.  As demonstrated in the test, PrintOnError
did not do that in the case of additional debug output.

To keep the overall behavior as close as possible to before, the other
callers of PrintOnError now have to pass the newline themselves. Passing
strings that start with newlines but don't end with them looked
suspicious anyway.

Revision 1.237 / (download) - annotate - [select for diffs], Sat Jan 8 09:53:44 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.236: +10 -19 lines
Diff to previous 1.236 (colored) to selected 1.4 (colored)

make: remove redundant braces

No binary change, except for assertion line numbers.

Revision 1.236 / (download) - annotate - [select for diffs], Fri Jan 7 19:24:27 2022 UTC (2 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.235: +4 -4 lines
Diff to previous 1.235 (colored) to selected 1.4 (colored)

make: rename and inline Targ_Precious

No functional change.

Revision 1.235 / (download) - annotate - [select for diffs], Mon Dec 27 18:26:22 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.234: +6 -6 lines
Diff to previous 1.234 (colored) to selected 1.4 (colored)

make: remove unnecessary words from command line options

Several years ago, the command line options were individual global
variables.  The global variable could therefore not be named 'silent'
since that would have conflicted with local variables of the same name.
After moving the global variable to the namespace 'struct CmdOpts',
there is no conflict anymore.

There doesn't seem to be any risk of naming collisions for the names
'touch' and 'query'.

No functional change.

Revision 1.234 / (download) - annotate - [select for diffs], Mon Dec 27 17:18:57 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.233: +3 -3 lines
Diff to previous 1.233 (colored) to selected 1.4 (colored)

make: rename eunlink to unlink_file

The name eunlink suggested a relation with the similarly named functions
emalloc or esnprintf, but that was misleading.  Instead, unlink_file
works like unlink, except that it refuses to remove an empty directory.

No functional change.

Revision 1.233 / (download) - annotate - [select for diffs], Wed Dec 15 13:03:33 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.232: +6 -6 lines
Diff to previous 1.232 (colored) to selected 1.4 (colored)

make: amend leftover cleanups from the previous commits

No functional change.

Revision 1.232 / (download) - annotate - [select for diffs], Wed Dec 15 12:58:01 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.231: +11 -7 lines
Diff to previous 1.231 (colored) to selected 1.4 (colored)

make: format comments according to /usr/share/misc/style

Assisted by indent(1), with manual corrections due to its many remaining
bugs.

No functional change.

Revision 1.231 / (download) - annotate - [select for diffs], Wed Dec 15 12:24:13 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.230: +4 -4 lines
Diff to previous 1.230 (colored) to selected 1.4 (colored)

make: use consistent indentation for statements and continuations

No binary change, except for line numbers in assertions in suff.c.

Revision 1.230 / (download) - annotate - [select for diffs], Wed Dec 15 10:04:49 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.229: +11 -11 lines
Diff to previous 1.229 (colored) to selected 1.4 (colored)

make: change return type of Compat_RunCommand from int to bool

The documentation was wrong before since status was not restricted to
only 0 or 1.

No functional change.

Revision 1.229 / (download) - annotate - [select for diffs], Sun Nov 28 23:12:51 2021 UTC (2 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.228: +4 -4 lines
Diff to previous 1.228 (colored) to selected 1.4 (colored)

make: fix a few lint warnings about type mismatch in enum comparisons

These warnings were triggered with the lint flag '-e', which enables
additional checks on enums.  This check would have detected the type
mismatch from the previous commit.

The check has a few strange warnings though, complaining about
initialization of 'unsigned long' with 'unsigned long', so don't enable
it for the official builds.

No functional change.

Revision 1.228 / (download) - annotate - [select for diffs], Sun Nov 28 19:51:06 2021 UTC (2 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.227: +11 -11 lines
Diff to previous 1.227 (colored) to selected 1.4 (colored)

make: convert GNodeFlags from enum into bit-fields

Now that Enum_ToString is implemented for each type separately, it's
easy to convert them to bit-fields.  This gets rid of the magic numbers
12 for CYCLE and 13 for DONECYCLE that left a suspicious gap in the
numbers.  This gap was not needed since the code didn't make use of the
relative ordering of the enum constants.

The effects of this conversion are fewer capital letters in the code,
smaller scope for the GNode flags, and clearer code especially when
setting a flag back to false.

One strange thing is that GCC 10.3.0 doesn't optimize GNodeFlags_IsNone
to an single bitmasking instruction, at least on x86_64.  Instead it
generates a testb instruction for each of the flags, even loading bit 8
separately from the others.  Clang 12.0.1 knows this optimization
though and generates the obvious sequence of movzwl, testl, jz.

No functional change.

Revision 1.227 / (download) - annotate - [select for diffs], Tue Apr 27 15:19:25 2021 UTC (2 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.226: +3 -3 lines
Diff to previous 1.226 (colored) to selected 1.4 (colored)

add const

Revision 1.226 / (download) - annotate - [select for diffs], Sun Apr 4 10:05:08 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.225: +3 -3 lines
Diff to previous 1.225 (colored) to selected 1.4 (colored)

make: rename a few functions to be more descriptive

No functional change.

Revision 1.225 / (download) - annotate - [select for diffs], Sat Apr 3 11:08:40 2021 UTC (2 years, 11 months ago) by rillig
Branch: MAIN
Changes since 1.224: +19 -19 lines
Diff to previous 1.224 (colored) to selected 1.4 (colored)

make: use C99 bool type instead of defining its own

No functional change.

Revision 1.224 / (download) - annotate - [select for diffs], Fri Feb 5 05:15:12 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.223: +4 -4 lines
Diff to previous 1.223 (colored) to selected 1.4 (colored)

make: in the Var_ functions, move the scope to the front

This change provides for a more natural reading order in the code.
Placing the scope first makes it immediately clear in which context the
remaining parameters are interpreted.

No functional change.

Revision 1.223 / (download) - annotate - [select for diffs], Thu Feb 4 21:42:46 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.222: +3 -3 lines
Diff to previous 1.222 (colored) to selected 1.4 (colored)

make: rename context and ctxt to scope

This continues the previous commit, in which VAR_GLOBAL, VAR_INTERNAL
and VAR_CMDLINE were renamed.

Renaming the variable 'ctxt' was trivial since that word is used nowhere
else.  In the comments though, each occurrence of the word 'context' had
to be checked individually since the word 'context' was not only used
for referring to a variable scope.  It is also used to distinguish
different situations where characters are escaped in a certain way
('parsing context') and in a few other expressions.

Revision 1.222 / (download) - annotate - [select for diffs], Tue Feb 2 17:47:56 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.221: +6 -2 lines
Diff to previous 1.221 (colored) to selected 1.4 (colored)

make: when exiting due to an error, print graph information

The code now does what the manual page has been promising since at least
1993.

Revision 1.221 / (download) - annotate - [select for diffs], Mon Feb 1 21:04:10 2021 UTC (3 years, 1 month ago) by rillig
Branch: MAIN
Changes since 1.220: +3 -3 lines
Diff to previous 1.220 (colored) to selected 1.4 (colored)

make: always use vfork, never fork

Before compat.c 1.217, job.c 1.390 and main.c 1.504 from 2020-12-27, the
exported make variables were exported from each freshly forked child
process.  There was no practical difference though between exporting the
variables from the parent process or the child process since these two
processes share the same address space, except that the forked process
is very limited in what it may actually do.  This limitation was
violated on a regular basis.

When an exported variable referred to a variable that used the :sh
variable modifier, this led to a fork from within vfork, which is not
allowed.  Since 2020-12-27, exporting the variables is done from the
main process, which prevents this situation from ever occurring.

Since that day, there is no need anymore to distinguish between vfork
and fork, which removes any need for the macro.

Revision 1.220 / (download) - annotate - [select for diffs], Tue Jan 19 20:51:46 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.219: +3 -3 lines
Diff to previous 1.219 (colored) to selected 1.4 (colored)

make(1): remove do-not-format markers from comments

These markers had been used inconsistently.  Furthermore the source code
had not been formatted automatically before 2020 at all, otherwise there
wouldn't have been any trailing whitespace left.

Revision 1.219 / (download) - annotate - [select for diffs], Sun Jan 10 21:20:46 2021 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.218: +5 -5 lines
Diff to previous 1.218 (colored) to selected 1.4 (colored)

make(1): consistently use boolean expressions in conditions

Most of the make code already followed the style of explicitly writing
(ptr != NULL) instead of the shorter (ptr) in conditions.

The remaining 50 instances have been found by an experimental,
unpublished check in lint(1) that treats bool expressions as
incompatible to any other scalar type, just as in Java, C#, Pascal and
several other languages.

The only unsafe operation on Boolean that is left over is (flags &
FLAG), for an enum implementing a bit set.  If Boolean is an ordinary
integer type (the default), some high bits may get lost.  But if Boolean
is the same as _Bool (by compiling with -DUSE_C99_BOOLEAN), C99 6.3.1.2
defines that a conversion from any scalar to the type _Bool acts as a
comparison to 0, which cannot lose any bits.

Revision 1.218 / (download) - annotate - [select for diffs], Wed Dec 30 10:03:16 2020 UTC (3 years, 2 months ago) by rillig
Branch: MAIN
Changes since 1.217: +10 -6 lines
Diff to previous 1.217 (colored) to selected 1.4 (colored)

make(1): format multi-line comments

Revision 1.217 / (download) - annotate - [select for diffs], Sun Dec 27 05:16:26 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.216: +4 -3 lines
Diff to previous 1.216 (colored) to selected 1.4 (colored)

make(1): re-export variables from the actual make process

Since make uses vfork if available, re-exporting the variables happens
in the address space of the main process anyway, so there is no point in
mentioning anything about "our client process" anywhere.

Revision 1.216 / (download) - annotate - [select for diffs], Sun Dec 20 21:07:32 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.215: +8 -14 lines
Diff to previous 1.215 (colored) to selected 1.4 (colored)

make(1): omit linear search for command in Compat_RunCommand

Revision 1.215 / (download) - annotate - [select for diffs], Sun Dec 13 19:33:53 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.214: +11 -19 lines
Diff to previous 1.214 (colored) to selected 1.4 (colored)

make(1): fix .ERROR_TARGET in compat -k mode (since 2010-04-07)

Revision 1.214 / (download) - annotate - [select for diffs], Sun Dec 13 18:57:44 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.213: +13 -2 lines
Diff to previous 1.213 (colored) to selected 1.4 (colored)

make(1): document variable expansion in the .END node

Revision 1.213 / (download) - annotate - [select for diffs], Sun Dec 13 18:12:29 2020 UTC (3 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.212: +3 -3 lines
Diff to previous 1.212 (colored) to selected 1.4 (colored)

fix comment

Revision 1.212 / (download) - annotate - [select for diffs], Sun Dec 13 16:47:19 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.211: +10 -3 lines
Diff to previous 1.211 (colored) to selected 1.4 (colored)

make(1): add comments for strange error handling in Compat_Run

Revision 1.211 / (download) - annotate - [select for diffs], Sun Dec 13 16:32:57 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.210: +16 -10 lines
Diff to previous 1.210 (colored) to selected 1.4 (colored)

make(1): extract InitSignals from Compat_Run

Revision 1.210 / (download) - annotate - [select for diffs], Sun Dec 13 16:30:08 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.209: +18 -16 lines
Diff to previous 1.209 (colored) to selected 1.4 (colored)

make(1): extract MakeBeginNode from Compat_Run

The comment "execute the commands" had once been correct but not
anymore.  Since a few years, not only the commands of the .BEGIN and
.END nodes are executed, instead the nodes are made as usual, including
their dependencies.

Revision 1.209 / (download) - annotate - [select for diffs], Sun Dec 13 16:14:40 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.208: +29 -24 lines
Diff to previous 1.208 (colored) to selected 1.4 (colored)

make(1): extract UseShell from Compat_RunCommand

Revision 1.208 / (download) - annotate - [select for diffs], Sat Dec 12 18:53:53 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.207: +3 -3 lines
Diff to previous 1.207 (colored) to selected 1.4 (colored)

make(1): rename Var_ExportVars to Var_ReexportVars

Revision 1.207 / (download) - annotate - [select for diffs], Sat Dec 12 00:33:25 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.206: +3 -3 lines
Diff to previous 1.206 (colored) to selected 1.4 (colored)

make(1): remove const from function parameters

These have been left-overs from refactoring, when these pieces were
extracted to separate functions.

Revision 1.206 / (download) - annotate - [select for diffs], Sat Dec 12 00:05:05 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.205: +4 -4 lines
Diff to previous 1.205 (colored) to selected 1.4 (colored)

make(1): inline Targ_Ignore and Targ_Silent

Each of these functions was only used 2 times, and each of these calls
used a different part of the whole expression.

Revision 1.205 / (download) - annotate - [select for diffs], Thu Dec 10 20:49:11 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.204: +3 -3 lines
Diff to previous 1.204 (colored) to selected 1.4 (colored)

make(1): split JobFlags into separate fields

Having all these flags in a single bitmask makes it harder to see where
exactly they can possibly be used since their state could also be
modified using the unsuspicious job->flags = 0.  Using individual names
just leaves the single memset, and that is only used during
initialization.

Revision 1.204 / (download) - annotate - [select for diffs], Mon Dec 7 01:35:33 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.203: +5 -14 lines
Diff to previous 1.203 (colored) to selected 1.4 (colored)

make(1): fix wrong exit status for multiple failed main targets

Revision 1.203 / (download) - annotate - [select for diffs], Mon Dec 7 01:32:04 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.202: +3 -2 lines
Diff to previous 1.202 (colored) to selected 1.4 (colored)

make(1): add test for wrong exit status 0 after failed targets with -k

Revision 1.202 / (download) - annotate - [select for diffs], Mon Dec 7 01:10:03 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.201: +10 -12 lines
Diff to previous 1.201 (colored) to selected 1.4 (colored)

make(1): merge local variables in Compat_Run

Revision 1.201 / (download) - annotate - [select for diffs], Mon Dec 7 01:07:13 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.200: +8 -8 lines
Diff to previous 1.200 (colored) to selected 1.4 (colored)

make(1): clean up Compat_Run

Now that errors in the main targets and in their dependencies have the
same effect on the .END node and its dependencies, the two variables can
be merged.

Revision 1.200 / (download) - annotate - [select for diffs], Mon Dec 7 01:04:06 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.199: +3 -3 lines
Diff to previous 1.199 (colored) to selected 1.4 (colored)

make(1): don't make .END if the main targets already failed

This only applies to -k mode.  By default, make exits earlier and skips
the .END node as well if an error occurs.

Revision 1.199 / (download) - annotate - [select for diffs], Mon Dec 7 00:53:30 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.198: +3 -3 lines
Diff to previous 1.198 (colored) to selected 1.4 (colored)

make(1): fix exit status in -k mode if a dependency fails

Whether in -k mode or not, the exit status tells whether all requested
targets were made or not.  If a dependency could not be made, the main
target was not made as well, therefore the exit status must be nonzero
in such a case.

This part of the code lacked proper unit tests until today.  The unit
test deptgt-end-fail.mk is compatible with make>=2003 at least, allowing
to compare the output over time.

In 2003, in the ok-ok-ok-ok case, "Making all from all-dep." was printed
twice in a row, for whatever reason  ... (40 minutes later) ... If I had
just made the two commands for 'all' and '.END' more distinguishable.
Back in 2003, the local variables for .END had not been initialized,
instead the .END node was run with the local variables of the last
preceding node.  In this case, that node was 'all', therefore ${.TARGET}
had obviously expanded to 'all'.

Somewhere in 2004, the shell commands were no longer run with the -e
flag, which resulted in the "exit status $?" line to be printed in cases
that had stopped early before.

Somewhere in 2005, the local variables for the .END node had been fixed.
The variable ${.TARGET} now had the value '.END', just as expected.  In
addition, the dependencies for the .END node were made, although without
getting their proper local variables.  This resulted in the output
"Making  out of nothing" instead of the expected "Making end-dep out of
nothing".

Still in 2005, in the test case "all=ok all-dep=ok end=ok end-dep=ERR",
the error code of the failed 'end-dep' was first reported as "*** Error
code 1 (continuing)".  To compensate for this improvement, a new bug had
been introduced.  The test case "all=ok all-dep=ok end=ERR end-dep=ERR"
had properly exited with status 1 on 2005-01-01, but on 2006-01-01 it
exited with status 0, thereby ignoring errors in the .END node.

Somewhere in 2008, some of the error messages (but not all) were
directed to stderr instead of stdout.  The actual output stayed the same
though.

Somewhere in 2011, the dependency of the .END node got its own local
variables, and ${.TARGET} now expanded to 'end-dep', as expected.

Somewhere in 2016, the two empty lines between the "*** Error code 1
(continuing)" and the "Stop." got compressed into a single empty line.

On 2020-12-07 (that is, today), the exit status 1 has been restored in
the error cases, after it had been wrong for at least 14 years.

Revision 1.198 / (download) - annotate - [select for diffs], Sun Dec 6 23:02:56 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.197: +21 -13 lines
Diff to previous 1.197 (colored) to selected 1.4 (colored)

make(1): refactor Compat_Run to show the error condition more clearly

This refactoring allows to gradually change the conditions for the
"Stop." error message, to demonstrate which cases are affected by each
tiny change.

Revision 1.197 / (download) - annotate - [select for diffs], Sun Dec 6 22:49:40 2020 UTC (3 years, 3 months ago) by rillig
Branch: MAIN
Changes since 1.196: +7 -4 lines
Diff to previous 1.196 (colored) to selected 1.4 (colored)

make(1): refactor error handling in Compat_Run

This is in preparation for the upcoming bug fixes.

Revision 1.196 / (download) - annotate - [select for diffs], Sat Nov 28 19:22:32 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.195: +4 -4 lines
Diff to previous 1.195 (colored) to selected 1.4 (colored)

make(1): reduce pointer indirection for GNode.implicitParents

Revision 1.195 / (download) - annotate - [select for diffs], Sat Nov 28 19:20:03 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.194: +3 -3 lines
Diff to previous 1.194 (colored) to selected 1.4 (colored)

make(1): reduce pointer indirection for GNode.cohorts

Revision 1.194 / (download) - annotate - [select for diffs], Sat Nov 28 19:12:28 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.193: +3 -3 lines
Diff to previous 1.193 (colored) to selected 1.4 (colored)

make(1): reduce memory allocation for GNode.parents and GNode.children

Revision 1.193 / (download) - annotate - [select for diffs], Sat Nov 28 18:55:52 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.192: +5 -5 lines
Diff to previous 1.192 (colored) to selected 1.4 (colored)

make(1): remove pointer indirection from GNode.commands

Just to save a few memory allocations.  No noticeable effect on the
performance though.

Revision 1.192 / (download) - annotate - [select for diffs], Tue Nov 24 19:04:42 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.191: +3 -4 lines
Diff to previous 1.191 (colored) to selected 1.4 (colored)

make(1): fix error handling for .BEGIN dependency in -k mode

Revision 1.191 / (download) - annotate - [select for diffs], Tue Nov 24 18:17:45 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.190: +6 -3 lines
Diff to previous 1.190 (colored) to selected 1.4 (colored)

make(1): fix error handling for dependency of .END in -k mode

Fix one bug, find 4 new ones.  All these bugs have been around since
2005-05-08, when dependencies on the .BEGIN, .END and .INTERRUPT nodes
were implemented.  Before that, checking gn->made == ERROR was
appropriate, but adding the dependencies made ABORTED a new possible
error value from Compat_Make.

Revision 1.190 / (download) - annotate - [select for diffs], Tue Nov 24 17:42:31 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.189: +12 -7 lines
Diff to previous 1.189 (colored) to selected 1.4 (colored)

make(1): document the enum GNodeMade

Given only the state names and their individual documentation, it is
hard to see the full picture.  To make this easier, provide typical
examples of the ways that a GNode takes through these states.

Revision 1.189 / (download) - annotate - [select for diffs], Tue Nov 24 16:28:44 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.188: +15 -16 lines
Diff to previous 1.188 (colored) to selected 1.4 (colored)

make(1): move documentation about the result of Compat_Make

Revision 1.188 / (download) - annotate - [select for diffs], Tue Nov 24 15:59:18 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.187: +3 -4 lines
Diff to previous 1.187 (colored) to selected 1.4 (colored)

make(1): fix missing "Stop." after failed .END node in -k mode

Revision 1.187 / (download) - annotate - [select for diffs], Mon Nov 23 23:41:11 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.186: +3 -3 lines
Diff to previous 1.186 (colored) to selected 1.4 (colored)

make(1): use comparisons in boolean expressions

The generated code stays exactly the same.

Revision 1.186 / (download) - annotate - [select for diffs], Mon Nov 23 19:35:10 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.185: +354 -343 lines
Diff to previous 1.185 (colored) to selected 1.4 (colored)

make(1): indent compat.c with tabs instead of spaces

Revision 1.185 / (download) - annotate - [select for diffs], Mon Nov 23 19:27:20 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.184: +89 -73 lines
Diff to previous 1.184 (colored) to selected 1.4 (colored)

make(1): split Compat_Make into smaller functions

Revision 1.184 / (download) - annotate - [select for diffs], Mon Nov 23 19:14:24 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.183: +25 -20 lines
Diff to previous 1.183 (colored) to selected 1.4 (colored)

make(1): extract DebugFailedTarget from Compat_RunCommand

Revision 1.183 / (download) - annotate - [select for diffs], Sun Nov 15 22:31:03 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.182: +3 -4 lines
Diff to previous 1.182 (colored) to selected 1.4 (colored)

make(1): clean up coding style in compat, parse, suff

Revision 1.182 / (download) - annotate - [select for diffs], Sat Nov 14 14:16:01 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.181: +3 -4 lines
Diff to previous 1.181 (colored) to selected 1.4 (colored)

make(1): clean up Job_Touch

Several more outdated comments were removed.  To compensate for that,
several new comments mark places where errors are not properly
propagated.

Revision 1.181 / (download) - annotate - [select for diffs], Sun Nov 8 08:33:07 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.180: +4 -4 lines
Diff to previous 1.180 (colored) to selected 1.4 (colored)

make(1): rename Make_OODate to GNode_IsOODate

It doesn't matter which of the make modules is in charge of determining
whether a node is out-of-date.  Therefore, remove the module name from
the function name.

Revision 1.180 / (download) - annotate - [select for diffs], Sun Nov 8 08:26:22 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.179: +5 -5 lines
Diff to previous 1.179 (colored) to selected 1.4 (colored)

make(1): rename Make_TimeStamp to GNode_UpdateYoungestChild

Revision 1.179 / (download) - annotate - [select for diffs], Sat Nov 7 14:32:12 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.178: +7 -6 lines
Diff to previous 1.178 (colored) to selected 1.4 (colored)

make(1): clean up Compat_Make

Revision 1.178 / (download) - annotate - [select for diffs], Sat Nov 7 14:27:16 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.177: +17 -22 lines
Diff to previous 1.177 (colored) to selected 1.4 (colored)

make(1): clean up Compat_RunCommand

Revision 1.177 / (download) - annotate - [select for diffs], Sat Nov 7 14:18:25 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.176: +8 -11 lines
Diff to previous 1.176 (colored) to selected 1.4 (colored)

make(1): replace switch with if-else chain in Compat_RunCommand

Revision 1.176 / (download) - annotate - [select for diffs], Sat Nov 7 10:23:20 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.175: +4 -3 lines
Diff to previous 1.175 (colored) to selected 1.4 (colored)

make(1): omit redundant bitwise or in Compat_Make

Revision 1.175 / (download) - annotate - [select for diffs], Sat Nov 7 10:16:18 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.174: +6 -7 lines
Diff to previous 1.174 (colored) to selected 1.4 (colored)

make(1): clean up code stylistically

* Replace character literal 0 with '\0'.
* Replace pointer literal 0 with NULL.
* Remove redundant parentheses.
* Parentheses in multi-line conditions are not redundant at the
  beginning of a line.
* Replace a few !ptr with ptr == NULL.
* Replace a few ptr with ptr != NULL.
* Replace (expr & mask) == 0 with !(expr & mask).
* Remove redundant braces for blocks in cases where the generated code
  stays the same.  (Assertions further down in the code would get
  different line numbers.)
* Rename parameters in CondParser_String to reflect the data flow.
* Replace #ifdef notdef with #if 0.

The generated code stays exactly the same, at least with GCC 5.5.0 on
NetBSD 8.0 amd64 using the default configuration.

Revision 1.174 / (download) - annotate - [select for diffs], Mon Nov 2 20:50:24 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.173: +5 -7 lines
Diff to previous 1.173 (colored) to selected 1.4 (colored)

make(1): clean up CompatDeleteTarget and CompatInterrupt

Revision 1.173 / (download) - annotate - [select for diffs], Sun Nov 1 17:47:26 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.172: +6 -6 lines
Diff to previous 1.172 (colored) to selected 1.4 (colored)

make(1): negate NoExecute to GNode_ShouldExecute

Revision 1.172 / (download) - annotate - [select for diffs], Sat Oct 31 18:20:00 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.171: +3 -3 lines
Diff to previous 1.171 (colored) to selected 1.4 (colored)

make(1): remove unused code from needshell

Since usr.bin/xinstall no longer uses this code, there is no need to
keep the second parameter.

Revision 1.171 / (download) - annotate - [select for diffs], Sat Oct 31 11:54:33 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.170: +6 -14 lines
Diff to previous 1.170 (colored) to selected 1.4 (colored)

make(1): do not look up local variables like .TARGET anywhere else

Nobody defines a global variable named .TARGET since that would have
many unpredictable effects, applying to all targets at once.

Nobody defines an environment variable named .TARGET since that's
against the naming conventions for environment variables and would have
the same effect.

Because of this, there is no point looking up the variables that are
local to a GNode anywhere else.  This means they cannot come from the
environment and thus their value doesn't need to be freed after use,
which makes the code simpler.

The newly added accessor functions in make.h refer to external
functions, but since that header is not used anywhere outside of
usr.bin/make, it doesn't matter.  Between 2020-08-25 and 2020-10-30,
that header had been referenced by usr.bin/xinstall.

Revision 1.170 / (download) - annotate - [select for diffs], Fri Oct 30 20:30:44 2020 UTC (3 years, 4 months ago) by rillig
Branch: MAIN
Changes since 1.169: +5 -5 lines
Diff to previous 1.169 (colored) to selected 1.4 (colored)

make(1): change char * to void * in Var_Value

The only purpose of the parameter freeIt is to free the memory
associated with the return value.  To do this, no pointer arithmetic is
needed.  Therefore, change to a void pointer, to catch accidental use of
that pointer.

Revision 1.169 / (download) - annotate - [select for diffs], Mon Oct 26 21:34:10 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.168: +8 -8 lines
Diff to previous 1.168 (colored) to selected 1.4 (colored)

make(1): group the command line options and arguments

By having a single struct that holds all command line options and
arguments, it is easy to see in the code when such a command line
argument is modified.  It also cleans up the namespace since the command
line options don't follow a common naming style.  Having them in a
struct also means that there is a single place for putting the
documentation, not two as before.

The struct also suggests to extract the initialization code out of main,
which is still too large, having more than 400 lines of code and
covering far too many topics.

Revision 1.168 / (download) - annotate - [select for diffs], Sat Oct 24 04:40:45 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.167: +14 -26 lines
Diff to previous 1.167 (colored) to selected 1.4 (colored)

make(1): clean up code style in compat.c

Revision 1.167 / (download) - annotate - [select for diffs], Fri Oct 23 19:48:17 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.166: +3 -3 lines
Diff to previous 1.166 (colored) to selected 1.4 (colored)

make(1): rename GNode.cmgn to youngestChild

The name is longer than before but also clearer.

Revision 1.166 / (download) - annotate - [select for diffs], Sun Oct 18 07:46:04 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.165: +3 -4 lines
Diff to previous 1.165 (colored) to selected 1.4 (colored)

make(1): replace execError with execDie

All calls to this function were followed by _exit(1).

Revision 1.165 / (download) - annotate - [select for diffs], Mon Oct 5 19:27:47 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.164: +38 -55 lines
Diff to previous 1.164 (colored) to selected 1.4 (colored)

make(1): revert previous commit

It had accidentally reverted all the work from the past few days.

Revision 1.164 / (download) - annotate - [select for diffs], Mon Oct 5 19:24:29 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.163: +55 -38 lines
Diff to previous 1.163 (colored) to selected 1.4 (colored)

make(1): fix double-free bug in -DCLEANUP mode (since 2020-10-02)

The bug had been introduced with dir.c 1.155 on 2020-10-02 22:20:25.  In
that commit, openDirectories was replaced with a combination of a list
with a hash table, for more efficient lookup by name.

Upon cleanup, OpenDirs_Done is called, which in turn called
Dir_ClearPath.  Dir_ClearPath takes full ownership of the given list and
empties it.  This was no problem before since afterwards the list was
empty and calling Lst_Free just frees the remaining list pointer.

With OpenDirs, this list was combined with a hash table, and the hash
table contains the list nodes, assuming that the OpenDirs functions have
full ownership of both the list and the hash table.  This assumption was
generally correct, except for the one moment during cleanup where full
ownership of the list was passed to Dir_ClearPath, while the hash table
still contained pointers to the (now freed) list nodes.  This by itself
was not a problem since the hash table would be freed afterwards.  But
as part of Dir_ClearPath, OpenDirs_Remove was called, which looked up
the freed directory by name and now found the freed list node, trying to
free it again.  Boom.

Fixed by replacing the call to Dir_ClearPath with code that only frees
the directories, without giving up control over the list.

Revision 1.163 / (download) - annotate - [select for diffs], Mon Oct 5 18:04:57 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.162: +38 -52 lines
Diff to previous 1.162 (colored) to selected 1.4 (colored)

make(1): clean up compat.c

Only cosmetic changes, no change of functionality.

Revision 1.162 / (download) - annotate - [select for diffs], Sat Oct 3 21:52:50 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.161: +2 -5 lines
Diff to previous 1.161 (colored) to selected 1.4 (colored)

make(1): clean up #include sections

Revision 1.161 / (download) - annotate - [select for diffs], Thu Oct 1 22:42:00 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.160: +2 -3 lines
Diff to previous 1.160 (colored) to selected 1.4 (colored)

make(1): remove redundant function prototypes

Revision 1.160 / (download) - annotate - [select for diffs], Thu Oct 1 21:00:55 2020 UTC (3 years, 5 months ago) by rillig
Branch: MAIN
Changes since 1.159: +7 -2 lines
Diff to previous 1.159 (colored) to selected 1.4 (colored)

make(1): add note about "..." with duplicate shell commands

Revision 1.159 / (download) - annotate - [select for diffs], Mon Sep 28 23:13:57 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.158: +3 -3 lines
Diff to previous 1.158 (colored) to selected 1.4 (colored)

make(1): replace += 1 with ++ and -= 1 with --

Just for visual consistency.  The generated code stays exactly the same.

Revision 1.158 / (download) - annotate - [select for diffs], Mon Sep 28 22:23:35 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.157: +7 -7 lines
Diff to previous 1.157 (colored) to selected 1.4 (colored)

make(1): make debug logging simpler

This avoids referring to the debug_file variable in many places where
this implementation detail is not necessary.

Revision 1.157 / (download) - annotate - [select for diffs], Mon Sep 28 20:46:11 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.156: +7 -13 lines
Diff to previous 1.156 (colored) to selected 1.4 (colored)

make(1): make debugging code shorter

Revision 1.156 / (download) - annotate - [select for diffs], Sun Sep 27 21:35:16 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.155: +25 -25 lines
Diff to previous 1.155 (colored) to selected 1.4 (colored)

make(1): normalize whitespace in source code

There is no more space tab.  Either only tabs or only spaces or tabs
followed by spaces, but not spaces followed by tabs.

Revision 1.155 / (download) - annotate - [select for diffs], Sun Sep 27 11:43:46 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.154: +12 -7 lines
Diff to previous 1.154 (colored) to selected 1.4 (colored)

make(1): inline Lst_ForEachUntil in Compat_Make

This avoids the extra local function and a few conversions to void
pointers, to gain additional type safety.

The code in Compat_RunCommand does not modify gn->commands structurally,
therefore it does not need the extra complexity of Lst_ForEachUntil.  It
does have access to a list node to exactly this list.  This list node is
only used to set the command to NULL after processing it, not for
removing the node from the list.

Revision 1.154 / (download) - annotate - [select for diffs], Sun Sep 27 11:39:02 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.153: +5 -5 lines
Diff to previous 1.153 (colored) to selected 1.4 (colored)

make(1): rename local variable in MakeNodes

By convention, list nodes are named ln to distinguish them from GNodes,
which are called gn.

Revision 1.153 / (download) - annotate - [select for diffs], Sun Sep 27 11:37:19 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.152: +6 -5 lines
Diff to previous 1.152 (colored) to selected 1.4 (colored)

make(1): make parameter of Compat_RunCommand const

Revision 1.152 / (download) - annotate - [select for diffs], Sat Sep 26 16:41:42 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.151: +17 -23 lines
Diff to previous 1.151 (colored) to selected 1.4 (colored)

make(1): inline Lst_ForEachUntil in Compat_Make

Revision 1.151 / (download) - annotate - [select for diffs], Sat Sep 26 16:00:12 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.150: +4 -4 lines
Diff to previous 1.150 (colored) to selected 1.4 (colored)

make(1): clean up API for finding and creating GNodes

The previous API had complicated rules for the cases in which the single
function returned NULL or what it did.  The flags for that function were
confusing since passing TARG_NOHASH would create a new node even though
TARG_CREATE was not included in that bit mask.

Splitting the function into 3 separate functions avoids this confusion.
It also reveals several places where the complicated API led to
unreachable code.  Such code has been removed.

Revision 1.150 / (download) - annotate - [select for diffs], Thu Sep 24 07:11:29 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.149: +5 -5 lines
Diff to previous 1.149 (colored) to selected 1.4 (colored)

make(1): rename Lst_ForEach to Lst_ForEachUntil

Since the callback function returns a terminating condition, this is not
really a foreach loop.

Many of the calls to Lst_ForEachUntil don't make use of the terminating
condition, and several don't modify the list structurally, which means
they don't need this complicated implementation.

In a follow-up commit, Lst_ForEach will be added back with a much
simpler implementation that iterates over the list naively, without a
terminating condition and without taking the iteration state from
Lst_Open/Lst_Next/Lst_Close into account.  The migration to this simpler
implementation will be done step by step since each callback function
needs to be examined closely.

Revision 1.149 / (download) - annotate - [select for diffs], Wed Sep 23 03:06:38 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.148: +15 -10 lines
Diff to previous 1.148 (colored) to selected 1.4 (colored)

make(1): fix assertion failure in -j mode with .END node

There had been two separate global variables for the .END node, and in
parallel mode, only the one in jobs.c was initialized.

The code in JobRun heads over to Compat_Make without calling Compat_Run
first, which left the variable ENDNode uninitialized.

Revision 1.148 / (download) - annotate - [select for diffs], Tue Sep 22 20:19:46 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.147: +4 -3 lines
Diff to previous 1.147 (colored) to selected 1.4 (colored)

make(1): prepare Var_Subst for proper error handling

Returning a VarParseResult instead of a string makes it possible to let
the error bubble up, until it reaches the main expression.

Revision 1.147 / (download) - annotate - [select for diffs], Tue Sep 22 04:05:41 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.146: +3 -3 lines
Diff to previous 1.146 (colored) to selected 1.4 (colored)

make(1): use fine-grained type names for lists and their nodes

This is only intended to help the human reader.  There is no additional
type safety yet.

Revision 1.146 / (download) - annotate - [select for diffs], Mon Sep 21 17:44:25 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.145: +3 -3 lines
Diff to previous 1.145 (colored) to selected 1.4 (colored)

make(1): add specific typedefs for lists

These typedefs are only intended to help human readers, they do not
provide any type-safety.  They also make the pointers explicit, which
had been hidden before by the typedef for Lst and LstNode.  Typing a few
'*' is less work than finding out which of the many types are pointers
and which aren't.

In meta.c, the variable "ln" served two completely different purposes,
which have been split again.  Register allocation is the job of the
compiler, not of the human source code reader.

Revision 1.145 / (download) - annotate - [select for diffs], Sun Sep 13 15:15:51 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.144: +3 -14 lines
Diff to previous 1.144 (colored) to selected 1.4 (colored)

make(1): clean up RCSID blocks

These blocks mostly consisted of redundant structure, following the same
#ifndef pattern over and over, with only minimal variation.

It's easier to maintain if the common structure is only written once and
encapsulated in a macro.

To avoid "defined but unused" warnings from GCC in the case where
MAKE_NATIVE is not defined, I had to add volatile.  Adding
MAKE_ATTR_UNUSED alone would not preserve the rcsid variable in the
resulting binary.

Revision 1.144 / (download) - annotate - [select for diffs], Sun Sep 13 06:36:54 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.143: +62 -67 lines
Diff to previous 1.143 (colored) to selected 1.4 (colored)

make(1): reduce indentation in Compat_RunCommand

The while (1) had been there since the initial import on 1993-03-21, and
in all that time there had never been a good reason for having it.

Revision 1.143 / (download) - annotate - [select for diffs], Sat Sep 12 15:10:55 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.142: +12 -9 lines
Diff to previous 1.142 (colored) to selected 1.4 (colored)

make(1): fix prototype of Compat_Make

Revision 1.142 / (download) - annotate - [select for diffs], Sat Sep 12 15:03:39 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.141: +10 -5 lines
Diff to previous 1.141 (colored) to selected 1.4 (colored)

make(1): fix name and prototype of Compat_RunCommand

By convention, exported identifiers are written with underscore.

The prototype of an exported function must not use void * just because
it is used in Lst_ForEach.  This is an implementation detail and must
remain so.

Revision 1.141 / (download) - annotate - [select for diffs], Sat Sep 12 14:41:00 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.140: +4 -4 lines
Diff to previous 1.140 (colored) to selected 1.4 (colored)

make(1): fix inconsistent code indentation

Revision 1.140 / (download) - annotate - [select for diffs], Fri Sep 11 17:32:36 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.139: +6 -6 lines
Diff to previous 1.139 (colored) to selected 1.4 (colored)

make(1): add wrappers around ctype.h functions

This avoids casting the argument to unsigned char, and to cast the
result of toupper/tolower back to char.

Revision 1.139 / (download) - annotate - [select for diffs], Sun Aug 30 20:08:47 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.138: +4 -9 lines
Diff to previous 1.138 (colored) to selected 1.4 (colored)

make(1): remove unreachable code from CompatRunCommand

At the point where Str_Words is called, the string contains no
meta-characters.  This means that the parameter "expand" in Str_Words is
never looked at.  This in turn means that this parameter can be set to
FALSE, thereby making it impossible that Str_Words returns NULL.

Revision 1.138 / (download) - annotate - [select for diffs], Sun Aug 30 19:56:02 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.137: +7 -6 lines
Diff to previous 1.137 (colored) to selected 1.4 (colored)

make(1): replace brk_string with Str_Words

The API is much simpler, and there is less detail that is exposed by
default and fewer punctuation to type on the caller's side.  To see that
there is some memory to be freed, one would have to look into the
struct.  Having part of the return value as the actual return value and
the rest in output parameters was unnecessarily asymmetrical.

Revision 1.137 / (download) - annotate - [select for diffs], Sun Aug 30 14:11:42 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.136: +5 -5 lines
Diff to previous 1.136 (colored) to selected 1.4 (colored)

make(1): rename GNode.iParents to implicitParents

The i alone was too ambiguous.  It could have meant ignore, implicit,
interactive, and probably many more.

Revision 1.136 / (download) - annotate - [select for diffs], Sun Aug 30 11:12:05 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.135: +6 -6 lines
Diff to previous 1.135 (colored) to selected 1.4 (colored)

make(1): rename Lst_Memeber to Lst_FindDatum

The new name nicely aligns with Lst_Find and Lst_FindFrom.

Revision 1.135 / (download) - annotate - [select for diffs], Sat Aug 29 14:47:26 2020 UTC (3 years, 6 months ago) by rillig
Branch: MAIN
Changes since 1.134: +5 -4 lines
Diff to previous 1.134 (colored) to selected 1.4 (colored)

make(1): fix assertion failure for .SUFFIXES in archives

This occurred in the posix1.mk test, even though it is disabled in
unit-tests.  But in tests/usr.bin/make it still runs.  There, it should
have produced an "expected failure" but crashed instead.

The archive-suffix test is the stripped-down version of the posix1 test.

Revision 1.134 / (download) - annotate - [select for diffs], Sat Aug 29 12:36:20 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.133: +8 -29 lines
Diff to previous 1.133 (colored) to selected 1.4 (colored)

make(1): clean up documentation for CompatInterrupt and Compat_Run

Revision 1.133 / (download) - annotate - [select for diffs], Sat Aug 29 08:09:07 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.132: +6 -6 lines
Diff to previous 1.132 (colored) to selected 1.4 (colored)

make(1): add another Boolean variant to check during development

Revision 1.132 / (download) - annotate - [select for diffs], Fri Aug 28 04:48:56 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.131: +14 -14 lines
Diff to previous 1.131 (colored) to selected 1.4 (colored)

make(1): remove trailing 'S' from names of Lst functions

The migration from null-passing Lst functions to argument-checking Lst
functions is completed.

There were 2 surprises: The targets list may be NULL, and in Dir_AddDir,
the path may be NULL.  The latter case is especially surprising since
that function turns into an almost-nop in that case.  This is another
case where probably 2 independent functions have been squeezed into a
single function.  This may be improved in a follow-up commit.

All other lists were fine.  They were always defined and thus didn't
need much work.

Revision 1.131 / (download) - annotate - [select for diffs], Thu Aug 27 19:15:35 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.130: +4 -4 lines
Diff to previous 1.130 (colored) to selected 1.4 (colored)

make(1): migrate Lst_IsEmpty to Lst_IsEmptyS

Revision 1.130 / (download) - annotate - [select for diffs], Thu Aug 27 06:53:57 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.129: +6 -6 lines
Diff to previous 1.129 (colored) to selected 1.4 (colored)

make(1): migrate Lst_ForEach to Lst_ForEachS

Most lists are always valid.  Only the "targets" variable may be null in
some cases, probably.

Revision 1.129 / (download) - annotate - [select for diffs], Sun Aug 23 19:00:19 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.128: +7 -7 lines
Diff to previous 1.128 (colored) to selected 1.4 (colored)

make(1): make compat.c ready for WARNS=6

Revision 1.128 / (download) - annotate - [select for diffs], Sun Aug 23 18:26:35 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.127: +5 -7 lines
Diff to previous 1.127 (colored) to selected 1.4 (colored)

make(1): make brk_string return size_t for the number of words

Revision 1.127 / (download) - annotate - [select for diffs], Sun Aug 23 10:53:27 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.126: +7 -5 lines
Diff to previous 1.126 (colored) to selected 1.4 (colored)

make(1): handle special case of a list containing null pointers

GNode.commands is the only place in make where a list can contain null
pointers.  That's unexpected, and memory management in CompatRunCommand
looks suspicous enough to warrant extensive documentation.

Revision 1.126 / (download) - annotate - [select for diffs], Sat Aug 22 21:42:38 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.125: +3 -4 lines
Diff to previous 1.125 (colored) to selected 1.4 (colored)

make(1): clean up headers

Remove redundant headers that are already included by "make.h".
Make <assert.h> available to all compilation units that use "make.h".

Revision 1.125 / (download) - annotate - [select for diffs], Sat Aug 22 19:53:22 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.124: +5 -3 lines
Diff to previous 1.124 (colored) to selected 1.4 (colored)

make(1): replace segmentation fault with failed assertion

To reproduce: ./make -r -C unit-tests -f sh-dots.mk -j1

Without -j1, the test succeeds.

Revision 1.124 / (download) - annotate - [select for diffs], Sat Aug 22 15:43:32 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.123: +6 -6 lines
Diff to previous 1.123 (colored) to selected 1.4 (colored)

make(1): require argument of Lst_Member to be non-null

Since the lists don't contain null pointers, it doesn't make sense to
search for a null pointer.  All calls but one already had obviously
non-null arguments.  The one remaining call using targ->suff has been
guarded for now.

The code for Lst_Member became much simpler than before.  Partly because
the old code had an extra condition for circular lists, which are not
used by make.

Revision 1.123 / (download) - annotate - [select for diffs], Sat Aug 22 14:39:12 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.122: +5 -5 lines
Diff to previous 1.122 (colored) to selected 1.4 (colored)

make(1): convert Lst_Enqueue and Lst_Dequeue to nonnull variants

Except for once instance in parse.c, the usage pattern for Lst_Dequeue
was to first test whether the list is empty.  This pattern allowed the
implementation of Lst_Dequeue to become simpler since the null check is
not needed anymore.

The calls to Lst_Enqueue never pass an invalid list or a null pointer,
therefore making them strict was trivial.

Revision 1.122 / (download) - annotate - [select for diffs], Sat Aug 22 11:35:00 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.121: +4 -4 lines
Diff to previous 1.121 (colored) to selected 1.4 (colored)

make(1): replace "(void)Lst_AtEnd" with stricter "Lst_AppendS"

This change ensures that there is actually something added to the list.
Lst_AtEnd had silently skipped the addition if the list was invalid
(null pointer), which was not intended in these cases.  The "(void)" is
assumed to mean "I know that this cannot fail", while it could also mean
"I don't care whether something actually happened".

Running "./build.sh -j6 tools" still succeeds after this change,
therefore chances are very low that this change breaks anything.  If
there is any change, it's an obvious assertion failure.  There is no
silent change in behavior though.

Revision 1.121 / (download) - annotate - [select for diffs], Sat Aug 22 10:07:29 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.120: +4 -11 lines
Diff to previous 1.120 (colored) to selected 1.4 (colored)

make(1): remove constant variable

The variable "local" had been TRUE for at least the last 28 years.

No change in binary size, as expected.

Revision 1.120 / (download) - annotate - [select for diffs], Sat Aug 22 08:01:34 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.119: +6 -6 lines
Diff to previous 1.119 (colored) to selected 1.4 (colored)

make(1): remove form feeds in the code

Revision 1.119 / (download) - annotate - [select for diffs], Fri Aug 21 03:36:03 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.118: +5 -5 lines
Diff to previous 1.118 (colored) to selected 1.4 (colored)

make(1): make list library code stricter

Up to now, the list library didn't distinguish between programming
mistakes (violations of invariants, illegal parameter values) and
actually interesting situations like "element not found in list".

The current code contains many branches for conditions that are neither
exercised by the unit tests nor by real-world usage.  There is no point
in keeping this unnecessary code.

The list functions will be migrated from their lenient variants to the
stricter variants in small parts, each function getting the S suffix
when it is made strict, to avoid any confusion about how strict a
particular function is.  When all functions have been migrated, they
will be renamed back to their original names.

While here, the comments of the functions are cleaned up since they
mention irrelevant implementation details in the API comments, as well
as "side effects" that are really main effects.

Revision 1.118 / (download) - annotate - [select for diffs], Sat Aug 1 14:47:49 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.117: +14 -14 lines
Diff to previous 1.117 (colored) to selected 1.4 (colored)

make(1): use consistent indentation in source code

Tabs for multiples of 8, then spaces.

The usage string has been kept as-is since the spaces there are
indentional and do influence the output.

Revision 1.117 / (download) - annotate - [select for diffs], Sat Aug 1 09:55:00 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.116: +6 -6 lines
Diff to previous 1.116 (colored) to selected 1.4 (colored)

make(1): avoid calls to free(3) in the common case of a NULL pointer

Revision 1.116 / (download) - annotate - [select for diffs], Sat Aug 1 09:25:36 2020 UTC (3 years, 7 months ago) by rillig
Branch: MAIN
Changes since 1.115: +5 -5 lines
Diff to previous 1.115 (colored) to selected 1.4 (colored)

make(1): let Var_Value return a const char *

The return value must not be modified anyway, so let the compiler check
this for free.

Revision 1.115 / (download) - annotate - [select for diffs], Tue Jul 28 16:42:22 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.114: +4 -4 lines
Diff to previous 1.114 (colored) to selected 1.4 (colored)

make(1): remove dead code from Var_Subst

The first parameter from Var_Subst had been a literal NULL in all cases.
These have been fixed using this command:

sed -i 's|Var_Subst(NULL, |Var_Subst(|' *.c

The one remaining case was not found because the "NULL," was followed by
a line break instead of a space.

The removed code probably wouldn't have worked as expected anyway.
Expanding a single variable to a literal string would have led to
unexpected behavior for cases like ${VAR:M${pattern}}, in case pattern
would contain an unescaped ':' itself.

Revision 1.114 / (download) - annotate - [select for diffs], Sun Jul 19 12:26:17 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.113: +4 -4 lines
Diff to previous 1.113 (colored) to selected 1.4 (colored)

make(1): rename Varf_Flags to VarEvalFlags

In var.c there are lots of different flag types.  To make any accidental
mixture obvious, each flag group gets its own prefix.

The only flag group that is visible outside of var.c is concerned with
evaluating variables, therefore the "e", which replaces the former "f"
that probably just meant "flag".

Revision 1.113 / (download) - annotate - [select for diffs], Fri Jul 3 08:13:23 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.112: +7 -7 lines
Diff to previous 1.112 (colored) to selected 1.4 (colored)

make(1): remove trailing whitespace

Revision 1.112 / (download) - annotate - [select for diffs], Fri Jul 3 08:02:55 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.111: +10 -10 lines
Diff to previous 1.111 (colored) to selected 1.4 (colored)

make(1): remove redundant parentheses around return values

Revision 1.111 / (download) - annotate - [select for diffs], Thu Jul 2 15:47:38 2020 UTC (3 years, 8 months ago) by rillig
Branch: MAIN
Changes since 1.110: +5 -5 lines
Diff to previous 1.110 (colored) to selected 1.4 (colored)

make(1): remove useless parameter from Var_Set

The enum corresponding to this int parameter is only defined in var.c,
which makes it impractical for the outside to set this parameter to
anything but 0.

On x86_64, this reduces the size of the resulting executable by 5 kB.

Revision 1.110 / (download) - annotate - [select for diffs], Sun Jan 19 19:42:32 2020 UTC (4 years, 2 months ago) by riastradh
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.109: +4 -4 lines
Diff to previous 1.109 (colored) to selected 1.4 (colored)

Reimplement make(1) meta mode without filemon(4).

Revision 1.109 / (download) - annotate - [select for diffs], Thu Dec 19 07:14:07 2019 UTC (4 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.108: +5 -0 lines
Diff to previous 1.108 (colored) to selected 1.4 (colored)

Revert the filemon removal in bmake, as pointed out by maya we do care
about not introducing divergence with FreeBSD, and the cost of unused
is acceptable here.

Revision 1.108 / (download) - annotate - [select for diffs], Wed Dec 18 07:37:19 2019 UTC (4 years, 3 months ago) by maxv
Branch: MAIN
Changes since 1.107: +3 -8 lines
Diff to previous 1.107 (colored) to selected 1.4 (colored)

Retire filemon, discussed on tech-kern@.

Revision 1.107 / (download) - annotate - [select for diffs], Thu Jul 20 19:29:54 2017 UTC (6 years, 8 months ago) by sjg
Branch: MAIN
CVS Tags: phil-wifi-base, phil-wifi-20191119, phil-wifi-20190609, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Branch point for: phil-wifi
Changes since 1.106: +23 -7 lines
Diff to previous 1.106 (colored) to selected 1.4 (colored)

Make compat.c handle SIGINT etc more like job.c

If there is a running child, pass the signal on, and
wait for it to exit before we self-terminate.

Reviewed by: christos

Revision 1.106 / (download) - annotate - [select for diffs], Fri Aug 26 23:28:39 2016 UTC (7 years, 7 months ago) by dholland
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, localcount-20160914, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Changes since 1.105: +35 -16 lines
Diff to previous 1.105 (colored) to selected 1.4 (colored)

Add a .DELETE_ON_ERROR: magic target that causes *failed* targets as
well as *interrupted* targets to be deleted. The name and behavior of
the variable matches gmake.

Also fix a glitch in newline output on error in compat mode that I
discovered while doing it.

Closes PR 51376.

Revision 1.105 / (download) - annotate - [select for diffs], Thu May 12 20:28:34 2016 UTC (7 years, 10 months ago) by sjg
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount
Changes since 1.104: +5 -4 lines
Diff to previous 1.104 (colored) to selected 1.4 (colored)

Propagate errors from filemon.

If we encounter errors producing a .meta file,
we should not consider the target completed successfully.

Revision 1.104 / (download) - annotate - [select for diffs], Thu Feb 18 18:29:14 2016 UTC (8 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.103: +4 -4 lines
Diff to previous 1.103 (colored) to selected 1.4 (colored)

Collapse the 3 boolean parameter to 1 flags parameter. No functional change.

Revision 1.103 / (download) - annotate - [select for diffs], Sun Jan 17 17:45:21 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.102: +11 -13 lines
Diff to previous 1.102 (colored) to selected 1.4 (colored)

remove free NULL checks (Tilman Sauerbeck)

Revision 1.102 / (download) - annotate - [select for diffs], Sat Jan 9 00:55:17 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.101: +4 -4 lines
Diff to previous 1.101 (colored) to selected 1.4 (colored)

Preserve $$ in := assignments..

FOO=\$$CRAP
BAR:=${FOO}

all:
	echo ${FOO}
	echo ${BAR}

Revision 1.101 / (download) - annotate - [select for diffs], Sun Oct 11 04:51:24 2015 UTC (8 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.100: +4 -4 lines
Diff to previous 1.100 (colored) to selected 1.4 (colored)

Add Boolean wantit to Var_Parse and Var_Subst

wantit will be FALSE when we are just consuming to discard
in which case we skip "expensive" things like Cmd_Exec.

Reviewed by: christos

Revision 1.100 / (download) - annotate - [select for diffs], Fri Jun 19 14:32:04 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.99: +4 -4 lines
Diff to previous 1.99 (colored) to selected 1.4 (colored)

make needshell customizable, so that xinstall can use it.

Revision 1.99 / (download) - annotate - [select for diffs], Fri Jun 19 14:25:34 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.98: +4 -4 lines
Diff to previous 1.98 (colored) to selected 1.4 (colored)

create needshell so we don't scan the string multiple times.

Revision 1.98 / (download) - annotate - [select for diffs], Fri Jun 19 08:03:35 2015 UTC (8 years, 9 months ago) by mlelstv
Branch: MAIN
Changes since 1.97: +8 -4 lines
Diff to previous 1.97 (colored) to selected 1.4 (colored)

Adjust metachar handling to previous behaviour:
- space and tab are no shell metachars, remove them from generic
  metachar function
- add space and tab as to-be-quoted characters for :Q modifier
- add = and : as characters that require command handling by the shell

Revision 1.97 / (download) - annotate - [select for diffs], Wed Jun 17 17:43:23 2015 UTC (8 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.96: +12 -36 lines
Diff to previous 1.96 (colored) to selected 1.4 (colored)

Centralize the "is a meta char" test, instead of using two different arrays.

Revision 1.96 / (download) - annotate - [select for diffs], Sun Sep 7 20:55:34 2014 UTC (9 years, 6 months ago) by joerg
Branch: MAIN
Changes since 1.95: +12 -2 lines
Diff to previous 1.95 (colored) to selected 1.4 (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.95 / (download) - annotate - [select for diffs], Sat Aug 23 15:05:40 2014 UTC (9 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.94: +5 -15 lines
Diff to previous 1.94 (colored) to selected 1.4 (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.94 / (download) - annotate - [select for diffs], Fri Jan 3 00:02:01 2014 UTC (10 years, 2 months 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, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7
Changes since 1.93: +4 -4 lines
Diff to previous 1.93 (colored) to selected 1.4 (colored)

Treat '~' as a meta char requiring a shell.
Patch from Steve McIntyre 93sam at debian.org

Reviewed by: christos

Revision 1.93 / (download) - annotate - [select for diffs], Mon Sep 2 19:26:42 2013 UTC (10 years, 6 months ago) by sjg
Branch: MAIN
Changes since 1.92: +4 -4 lines
Diff to previous 1.92 (colored) to selected 1.4 (colored)

Do not apply shellErrFlag unless errCheck is true.

Revision 1.92 / (download) - annotate - [select for diffs], Fri Jul 5 22:14:56 2013 UTC (10 years, 8 months ago) by sjg
Branch: MAIN
CVS Tags: riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2
Changes since 1.91: +14 -9 lines
Diff to previous 1.91 (colored) to selected 1.4 (colored)

If commandShell hasErrCtl is true, set shellErrFlag for use by
CompatRunCommand() so that behavior in jobs and compat mode
remains consistent.

Revision 1.91 / (download) - annotate - [select for diffs], Fri Jan 25 02:01:10 2013 UTC (11 years, 2 months ago) by sjg
Branch: MAIN
CVS Tags: dholland-make-base, agc-symver-base, agc-symver
Changes since 1.90: +3 -4 lines
Diff to previous 1.90 (colored) to selected 1.4 (colored)

Remove Check_Cwd - it is no longer needed.

Revision 1.90 / (download) - annotate - [select for diffs], Sun Oct 7 19:17:31 2012 UTC (11 years, 5 months ago) by sjg
Branch: MAIN
CVS Tags: yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6
Changes since 1.89: +3 -4 lines
Diff to previous 1.89 (colored) to selected 1.4 (colored)

Treat empty commands same as jobs mode

Revision 1.89 / (download) - annotate - [select for diffs], Sun Jun 10 21:44:01 2012 UTC (11 years, 9 months ago) by wiz
Branch: MAIN
Branch point for: tls-maxphys
Changes since 1.88: +4 -4 lines
Diff to previous 1.88 (colored) to selected 1.4 (colored)

Remove a __dead for an undead function (clang errors out otherwise).

Revision 1.88 / (download) - annotate - [select for diffs], Tue Jun 5 17:31:04 2012 UTC (11 years, 9 months ago) by sjg
Branch: MAIN
Changes since 1.87: +4 -4 lines
Diff to previous 1.87 (colored) to selected 1.4 (colored)

kill(2) is more appropriate and more portable than raise(3)

Revision 1.87 / (download) - annotate - [select for diffs], Tue Jun 5 06:11:51 2012 UTC (11 years, 9 months ago) by sjg
Branch: MAIN
Changes since 1.86: +7 -4 lines
Diff to previous 1.86 (colored) to selected 1.4 (colored)

Re-raising SIGINT etc, after running .INTERRUPT
provides much more reliable shutdown on some systems.
Based on CompatInterrupt in FreeBSD's make.

Revision 1.86 / (download) - annotate - [select for diffs], Wed May 30 21:42:04 2012 UTC (11 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.85: +9 -3 lines
Diff to previous 1.85 (colored) to selected 1.4 (colored)

An empty command is quietly ignored in jobs mode, but causes a failure
in compat mode.  Just skip it.

Revision 1.85 / (download) - annotate - [select for diffs], Tue May 15 17:51:51 2012 UTC (11 years, 10 months ago) by seanb
Branch: MAIN
CVS Tags: yamt-pagecache-base5
Changes since 1.84: +4 -4 lines
Diff to previous 1.84 (colored) to selected 1.4 (colored)

- Use _exit() instead of exit() in signal handler since
  the latter isn't signal safe.

Revision 1.84 / (download) - annotate - [select for diffs], Fri Sep 16 15:38:03 2011 UTC (12 years, 6 months ago) by joerg
Branch: MAIN
CVS Tags: 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
Branch point for: yamt-pagecache
Changes since 1.83: +4 -4 lines
Diff to previous 1.83 (colored) to selected 1.4 (colored)

Use __dead consistently. If it doesn't exist, define it away.

Revision 1.83 / (download) - annotate - [select for diffs], Sun Aug 14 13:06:09 2011 UTC (12 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.82: +4 -4 lines
Diff to previous 1.82 (colored) to selected 1.4 (colored)

- remove gcc-4.5 warnings
- simplify job printing code
- document non-literal format strings

Revision 1.82 / (download) - annotate - [select for diffs], Thu Nov 25 21:31:09 2010 UTC (13 years, 4 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.81: +7 -7 lines
Diff to previous 1.81 (colored) to selected 1.4 (colored)

Instead of keeping around the mtime of the youngest child, keep a pointer
to it, so that we can print it when we do the out of date determination.

Revision 1.81 / (download) - annotate - [select for diffs], Mon Sep 13 15:36:57 2010 UTC (13 years, 6 months ago) by sjg
Branch: MAIN
Changes since 1.80: +40 -3 lines
Diff to previous 1.80 (colored) to selected 1.4 (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.80 / (download) - annotate - [select for diffs], Sat Aug 7 06:44:08 2010 UTC (13 years, 7 months ago) by sjg
Branch: MAIN
Changes since 1.79: +5 -3 lines
Diff to previous 1.79 (colored) to selected 1.4 (colored)

wait[pid]() is called in several places.
If we encounter an error and run the .ERROR target, we may
reap a pid which jobs is waiting for.  Ensure that we
cleanup so that make isn't left waiting for an already
deceased child.

Revision 1.79 / (download) - annotate - [select for diffs], Thu Jun 3 15:40:15 2010 UTC (13 years, 9 months ago) by sjg
Branch: MAIN
Changes since 1.78: +11 -11 lines
Diff to previous 1.78 (colored) to selected 1.4 (colored)

We have required sigaction() for quite a while.
Use bmake_signal() - a wrapper around sigaction()
rather than signal() to ensure that signals are handled
consistently.

Revision 1.78 / (download) - annotate - [select for diffs], Fri Apr 23 00:18:50 2010 UTC (13 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.77: +4 -4 lines
Diff to previous 1.77 (colored) to selected 1.4 (colored)

On darwin at least, vfork() fails in child of vfork().
It probably shouldn't work anyway, so avoid this.
We use the macro vFork() - a function seems to cause problems
and is unnecessary overhead.

Revision 1.77 / (download) - annotate - [select for diffs], Wed Apr 7 00:11:27 2010 UTC (13 years, 11 months ago) by sjg
Branch: MAIN
Changes since 1.76: +7 -7 lines
Diff to previous 1.76 (colored) to selected 1.4 (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.76 / (download) - annotate - [select for diffs], Sun Feb 22 07:33:00 2009 UTC (15 years, 1 month ago) by dholland
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.75: +5 -5 lines
Diff to previous 1.75 (colored) to selected 1.4 (colored)

Use pid_t for the result of fork and wait. PR 38031 from Ryan Stutsman.

Revision 1.75 / (download) - annotate - [select for diffs], Fri Jan 23 21:26:30 2009 UTC (15 years, 2 months ago) by dsl
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.74: +5 -5 lines
Diff to previous 1.74 (colored) to selected 1.4 (colored)

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

Revision 1.74 / (download) - annotate - [select for diffs], Fri Jan 16 21:14:30 2009 UTC (15 years, 2 months ago) by dsl
Branch: MAIN
Changes since 1.73: +8 -6 lines
Diff to previous 1.73 (colored) to selected 1.4 (colored)

Debug print improvements.

Revision 1.73 / (download) - annotate - [select for diffs], Fri Dec 19 22:01:19 2008 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.72: +9 -4 lines
Diff to previous 1.72 (colored) to selected 1.4 (colored)

if brk_string failed, use the shell.

Revision 1.72 / (download) - annotate - [select for diffs], Sat Dec 13 15:19:29 2008 UTC (15 years, 3 months ago) by dsl
Branch: MAIN
Changes since 1.71: +10 -10 lines
Diff to previous 1.71 (colored) to selected 1.4 (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.71 / (download) - annotate - [select for diffs], Fri Feb 15 21:29:50 2008 UTC (16 years, 1 month 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, 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, mjf-devfs2-base, mjf-devfs2, 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, matt-armv6-nbase, keiichi-mipv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Changes since 1.70: +5 -5 lines
Diff to previous 1.70 (colored) to selected 1.4 (colored)

back all changes out until I fix it properly.

Revision 1.70 / (download) - annotate - [select for diffs], Thu Feb 14 22:11:20 2008 UTC (16 years, 1 month ago) by christos
Branch: MAIN
CVS Tags: christos-broken
Changes since 1.69: +8 -8 lines
Diff to previous 1.69 (colored) to selected 1.4 (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.69 / (download) - annotate - [select for diffs], Sat Jan 19 06:52:13 2008 UTC (16 years, 2 months ago) by sjg
Branch: MAIN
Changes since 1.68: +4 -4 lines
Diff to previous 1.68 (colored) to selected 1.4 (colored)

Implement -dl (aka LOUD) to override '@' at the start of script lines.
Based on supplied patch.

PR: 37202

Revision 1.68 / (download) - annotate - [select for diffs], Fri Oct 5 15:27:45 2007 UTC (16 years, 5 months ago) by sjg
Branch: MAIN
CVS Tags: matt-armv6-base, cube-autoconf-base, cube-autoconf
Changes since 1.67: +4 -3 lines
Diff to previous 1.67 (colored) to selected 1.4 (colored)

Add the ability to .export variables to the environment.

Revision 1.67 / (download) - annotate - [select for diffs], Thu Apr 5 14:11:35 2007 UTC (16 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: matt-mips64-base, matt-mips64, hpcarm-cleanup
Branch point for: matt-armv6
Changes since 1.66: +3 -7 lines
Diff to previous 1.66 (colored) to selected 1.4 (colored)

kill clobbered warning from Tobias Nygren

Revision 1.66 / (download) - annotate - [select for diffs], Fri Nov 17 22:07:39 2006 UTC (17 years, 4 months ago) by dsl
Branch: MAIN
CVS Tags: netbsd-4-base
Branch point for: wrstuden-fixsa, netbsd-4
Changes since 1.65: +4 -4 lines
Diff to previous 1.65 (colored) to selected 1.4 (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.65 / (download) - annotate - [select for diffs], Fri Oct 27 21:00:18 2006 UTC (17 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.64: +9 -9 lines
Diff to previous 1.64 (colored) to selected 1.4 (colored)

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

Revision 1.64 / (download) - annotate - [select for diffs], Sun Oct 22 16:23:20 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.63: +8 -13 lines
Diff to previous 1.63 (colored) to selected 1.4 (colored)

sprinkle volatile.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Oct 15 08:38:21 2006 UTC (17 years, 5 months ago) by dsl
Branch: MAIN
Changes since 1.62: +11 -11 lines
Diff to previous 1.62 (colored) to selected 1.4 (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.62 / (download) - annotate - [select for diffs], Mon Oct 9 20:46:33 2006 UTC (17 years, 5 months ago) by apb
Branch: MAIN
Changes since 1.61: +19 -6 lines
Diff to previous 1.61 (colored) to selected 1.4 (colored)

In a non-native build, always use a shell to execute commands.  This may
be necessary in a weird cross-build environment.  Previously, if the
command looked simple enough, we would try to exec it directly.

OK sjg, christos

Revision 1.61 / (download) - annotate - [select for diffs], Sat Apr 22 18:43:06 2006 UTC (17 years, 11 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.60: +10 -7 lines
Diff to previous 1.60 (colored) to selected 1.4 (colored)

Coverity CID 530: Don't leak the argument vector.

Revision 1.60 / (download) - annotate - [select for diffs], Mon Aug 8 16:42:54 2005 UTC (18 years, 7 months ago) by christos
Branch: MAIN
Changes since 1.59: +8 -8 lines
Diff to previous 1.59 (colored) to selected 1.4 (colored)

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

Revision 1.59 / (download) - annotate - [select for diffs], Mon Jul 25 22:55:58 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.58: +15 -15 lines
Diff to previous 1.58 (colored) to selected 1.4 (colored)

Whitespace KNF cleanup from Max Okumoto

Revision 1.58 / (download) - annotate - [select for diffs], Sun May 8 04:19:12 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.57: +4 -3 lines
Diff to previous 1.57 (colored) to selected 1.4 (colored)

Don't complain that we cannot make .END.

Revision 1.57 / (download) - annotate - [select for diffs], Sun May 8 00:38:47 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.56: +16 -15 lines
Diff to previous 1.56 (colored) to selected 1.4 (colored)

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

Revision 1.56 / (download) - annotate - [select for diffs], Wed Feb 16 15:11:52 2005 UTC (19 years, 1 month 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.55: +23 -23 lines
Diff to previous 1.55 (colored) to selected 1.4 (colored)

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

Revision 1.55 / (download) - annotate - [select for diffs], Thu Jul 1 04:39:30 2004 UTC (19 years, 9 months ago) by jmc
Branch: MAIN
Changes since 1.54: +4 -3 lines
Diff to previous 1.54 (colored) to selected 1.4 (colored)

Add some checks for gcc around a few function declarations and note the
unused variables. Also fix a few other warnings that PR#22118 shows when
trying to compile bmake on non-NetBSD hosts

Revision 1.54 / (download) - annotate - [select for diffs], Fri May 7 08:12:15 2004 UTC (19 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.53: +39 -25 lines
Diff to previous 1.53 (colored) to selected 1.4 (colored)

Remove use of sh -e when running in compat mode.
Its not posix compliant and serves very little purpose.
With this change compat and jobs modes are consistent wrt how
they treat each line of a script.

Add support for the '+' command line prefix as required by posix.
Lines prefixed with '+' are executed even when -n is given.
[Actually posix says they should also be done for -q and -t]

PR:
Reviewed by: jmc

Revision 1.53 / (download) - annotate - [select for diffs], Fri May 7 00:04:38 2004 UTC (19 years, 10 months ago) by ross
Branch: MAIN
Changes since 1.52: +4 -4 lines
Diff to previous 1.52 (colored) to selected 1.4 (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.52 / (download) - annotate - [select for diffs], Wed Sep 10 18:04:22 2003 UTC (20 years, 6 months ago) by jmmv
Branch: MAIN
CVS Tags: netbsd-2-0-base
Branch point for: netbsd-2-0
Changes since 1.51: +18 -15 lines
Diff to previous 1.51 (colored) to selected 1.4 (colored)

Add the 'e' debug flag (i.e., '-d e'):  when enabled, show the "target
failed" and "command failed" messages added recently.  These introduce
too much noise when debugging some kind of problems, specially in pkgsrc.

Revision 1.51 / (download) - annotate - [select for diffs], Tue Sep 9 16:16:02 2003 UTC (20 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.50: +16 -6 lines
Diff to previous 1.50 (colored) to selected 1.4 (colored)

when displaying the 'Failed command:', collapse runs of whitespace in the
command to a single space.   suggested by David Laight in private mail.

Revision 1.50 / (download) - annotate - [select for diffs], Mon Sep 8 23:54:54 2003 UTC (20 years, 6 months ago) by lukem
Branch: MAIN
Changes since 1.49: +4 -4 lines
Diff to previous 1.49 (colored) to selected 1.4 (colored)

don't free cmdStart too early, as cmd points somewhere in there and we
may want cmd for error messages.
should fix [bin/22705] from itojun@

Revision 1.49 / (download) - annotate - [select for diffs], Tue Sep 2 23:40:11 2003 UTC (20 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.48: +5 -4 lines
Diff to previous 1.48 (colored) to selected 1.4 (colored)

Also display failed target.  Given
	printf "all:\n\ttrue\n\t@false\n" | make -f -
the error output now looks like:
	*** Failed target:  all
	*** Failed command: false
	*** Error code 1
instead of just
	*** Error code 1

XXX: add this support for  make -j  builds.

Revision 1.48 / (download) - annotate - [select for diffs], Tue Sep 2 12:17:40 2003 UTC (20 years, 7 months ago) by lukem
Branch: MAIN
Changes since 1.47: +4 -3 lines
Diff to previous 1.47 (colored) to selected 1.4 (colored)

display the command that failed.
this is useful if the command-line had been suppressed.

Revision 1.47 / (download) - annotate - [select for diffs], Thu Aug 7 11:14:48 2003 UTC (20 years, 7 months ago) by agc
Branch: MAIN
Changes since 1.46: +34 -3 lines
Diff to previous 1.46 (colored) to selected 1.4 (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.46 / (download) - annotate - [select for diffs], Fri Aug 1 00:39:52 2003 UTC (20 years, 8 months ago) by sjg
Branch: MAIN
Changes since 1.45: +10 -4 lines
Diff to previous 1.45 (colored) to selected 1.4 (colored)

Allow .SHELL: to control the shell used by compat mode too.
Add a shell spec for ksh - a nice portable posix shell.
Document .SHELL:

Revision 1.45 / (download) - annotate - [select for diffs], Mon Jul 14 18:19:11 2003 UTC (20 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.44: +9 -9 lines
Diff to previous 1.44 (colored) to selected 1.4 (colored)

Pass WARNS=3

Revision 1.44 / (download) - annotate - [select for diffs], Sat Jun 15 18:24:56 2002 UTC (21 years, 9 months ago) by wiz
Branch: MAIN
CVS Tags: fvdl_fs64_base
Changes since 1.43: +24 -17 lines
Diff to previous 1.43 (colored) to selected 1.4 (colored)

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

Revision 1.43 / (download) - annotate - [select for diffs], Sat Apr 27 15:14:30 2002 UTC (21 years, 11 months ago) by bjh21
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.42: +5 -4 lines
Diff to previous 1.42 (colored) to selected 1.4 (colored)

Rather than hardcoding "/bin/sh", use _PATH_BSHELL.  To allow bootstrapping,
provide a default for this in pathnames.h, and only include <paths.h> ifndef
MAKE_BOOTSTRAP.

Revision 1.42 / (download) - annotate - [select for diffs], Thu Mar 21 01:24:43 2002 UTC (22 years ago) by christos
Branch: MAIN
Changes since 1.41: +5 -5 lines
Diff to previous 1.41 (colored) to selected 1.4 (colored)

don't print extra newlines on errors.

Revision 1.41 / (download) - annotate - [select for diffs], Thu Mar 14 16:08:37 2002 UTC (22 years ago) by pk
Branch: MAIN
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored) to selected 1.4 (colored)

JobExec(): don't use Punt() in the child; it can't possibly DTRT, and will also
mess up the parents variables.

Instead, use execError() for all error paths in the child code.

Revision 1.40 / (download) - annotate - [select for diffs], Thu Feb 7 16:48:22 2002 UTC (22 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.39: +4 -9 lines
Diff to previous 1.39 (colored) to selected 1.4 (colored)

When making a node which is the source of both a .MADE target and a
normal target (the latter dependency being the reason why it's made),
the .MADE parent should not be put on the `toBeMade' list again (in
Make_Update()) since it was already put on it in Make_ExpandUse().
Doing so would cause the rules for the .MADE target to be executed
(at least) twice, and also mess up the unmade children count of _its_
parent, resulting in spurious graph cylce detection.

To achieve this, make sure the unmade children count of the .MADE target
is set to zero before enqueueing it on the `toBeMade' list in
Make_ExpandUse(). Then, in Make_Update(), check if the parent has the
.MADE attribute before diddling with the queue.

For the same reason the status of a node must not be set to UPTODATE
unconditionally in compat mode, since that will prevent the node from
being built even if it is the source of a normal target. Instead,
check both its state and the type of the parent to decide whether to
continue on behalf of the current parent.

Revision 1.39 / (download) - annotate - [select for diffs], Mon Feb 4 17:24:56 2002 UTC (22 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.38: +4 -4 lines
Diff to previous 1.38 (colored) to selected 1.4 (colored)

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

Revision 1.38 / (download) - annotate - [select for diffs], Sun Feb 3 19:58:15 2002 UTC (22 years, 1 month ago) by pk
Branch: MAIN
Changes since 1.37: +5 -4 lines
Diff to previous 1.37 (colored) to selected 1.4 (colored)

Don't bother to apply suffix rules to find sources for a target marked
as .MADE.

Revision 1.37 / (download) - annotate - [select for diffs], Sun Jan 27 01:50:54 2002 UTC (22 years, 2 months ago) by reinoud
Branch: MAIN
Changes since 1.36: +8 -8 lines
Diff to previous 1.36 (colored) to selected 1.4 (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.36 / (download) - annotate - [select for diffs], Tue Oct 16 18:50:12 2001 UTC (22 years, 5 months ago) by sjg
Branch: MAIN
Changes since 1.35: +7 -3 lines
Diff to previous 1.35 (colored) to selected 1.4 (colored)

Don't ignore errors during .END processing.

PR: 14267
Reviewed: christos

Revision 1.35 / (download) - annotate - [select for diffs], Tue Jun 12 23:36:17 2001 UTC (22 years, 9 months ago) by sjg
Branch: MAIN
Changes since 1.34: +5 -5 lines
Diff to previous 1.34 (colored) to selected 1.4 (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.34 / (download) - annotate - [select for diffs], Fri Jun 1 20:33:37 2001 UTC (22 years, 10 months ago) by sjg
Branch: MAIN
Changes since 1.33: +9 -6 lines
Diff to previous 1.33 (colored) to selected 1.4 (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.33 / (download) - annotate - [select for diffs], Tue May 29 17:37:51 2001 UTC (22 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.32: +7 -9 lines
Diff to previous 1.32 (colored) to selected 1.4 (colored)

better error messages on exec* failures. From Simon Burge.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Apr 6 11:13:46 2001 UTC (22 years, 11 months ago) by wiz
Branch: MAIN
Changes since 1.31: +4 -4 lines
Diff to previous 1.31 (colored) to selected 1.4 (colored)

Negative exit code cleanup: Replace exit(-x) with exit(x).
As seen on tech-userlevel.

Revision 1.31 / (download) - annotate - [select for diffs], Mon Jan 1 15:47:37 2001 UTC (23 years, 3 months ago) by sommerfeld
Branch: MAIN
Changes since 1.30: +5 -5 lines
Diff to previous 1.30 (colored) to selected 1.4 (colored)

Delete forceSerial; just use compatMake for that.
Add -N flag to *really* not execute any commands (useful when using
the -d flags to debug usr/src/Makefile)
Document -N
Update documentation of -n to mention that it still executes commands
for targets marked .MAKE so that the -N/-n distinction is clear.

Revision 1.30 / (download) - annotate - [select for diffs], Thu Apr 20 11:23:25 2000 UTC (23 years, 11 months ago) by sjg
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, minoura-xpg4dl-base, minoura-xpg4dl
Changes since 1.29: +4 -3 lines
Diff to previous 1.29 (colored) to selected 1.4 (colored)

Changes to make MAKEOBJDIRPREFIX useful.

Firstly, we ignore getenv("PWD") if MAKEOBJDIRPREFIX is set so that we always
get the same value for .CURDIR regardless of how make was invoked.

Second, when executing a command we check if it is ${.MAKE} or ${.MAKE:T}
without a preceeding chdir, if so we insert a chdir(${.CURDIR}) so that
the Makefile will be found by the child make.  Note that this behaviour is
dissabled if MAKEOBJDIRPREFIX is not set or if NOCHECKMAKECHDIR is set.
See the comments in main.c for more detail.

With these two changes, one can successfully build usr/src using MAKEOBJDIRPREFIX
allowing the src to be mounted from a CD-ROM.

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jan 21 17:08:35 2000 UTC (24 years, 2 months ago) by mycroft
Branch: MAIN
Changes since 1.28: +3 -4 lines
Diff to previous 1.28 (colored) to selected 1.4 (colored)

Nuke `extern int errno;' in code we compile with -Wstrict-prototypes.  We get
the correct definition from errno.h.

Revision 1.28 / (download) - annotate - [select for diffs], Thu Sep 16 00:49:48 1999 UTC (24 years, 6 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.27: +7 -5 lines
Diff to previous 1.27 (colored) to selected 1.4 (colored)

Fix a bug in the previous.  In the `compat' case, we don't actually use the
list of target nodes returned by Make_ExpandUse().  We have to search the
cohorts explicitly while iterating through the tree.  So, tweak CompatMake()
to do this.

Revision 1.27 / (download) - annotate - [select for diffs], Wed Mar 24 13:19:26 1999 UTC (25 years ago) by sommerfe
Branch: MAIN
CVS Tags: netbsd-1-4-base, netbsd-1-4-RELEASE, netbsd-1-4-PATCH001
Branch point for: netbsd-1-4
Changes since 1.26: +4 -4 lines
Diff to previous 1.26 (colored) to selected 1.4 (colored)

report a sensible error if wait() fails.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Nov 11 19:37:06 1998 UTC (25 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.25: +12 -70 lines
Diff to previous 1.25 (colored) to selected 1.4 (colored)

This patch fixes the problem introduced in the previous commit where
parents would be get remade, even if children were not really updated
by the commands executed for them. It also makes all the children have
the real modification time set if possible, so it should fix some other
timing weirdnesses...

- collapse childMade and make fields into flags and convert them to bits
  CHILDMADE and REMAKE
- introduce FORCE flag that gets set in all the parents of a child that
  has no sources and does not exist.
- set oodate if the FORCE flag is set, and not if CHILDMADE
- centralize the RECHECK into Make_Recheck() and use this in make.c and compat.c
- use Make_TimeStamp for all child -> parent timestamp propagations

Revision 1.25 / (download) - annotate - [select for diffs], Sun Nov 1 03:07:33 1998 UTC (25 years, 5 months ago) by itohy
Branch: MAIN
Changes since 1.24: +7 -5 lines
Diff to previous 1.24 (colored) to selected 1.4 (colored)

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

Revision 1.24 / (download) - annotate - [select for diffs], Thu Mar 26 19:20:36 1998 UTC (26 years ago) by christos
Branch: MAIN
Changes since 1.23: +9 -9 lines
Diff to previous 1.23 (colored) to selected 1.4 (colored)

PR/5210: Hauke Fath: make core dumps with .SHELL
Unfortunately this revealed a deeper problem with the brk_string code.
To fix it:
	- remove sharing of the buffer between brk_string invocations
	- change the semantics of brk_string so that the argument array
	  starts with 0, and return the buffer where the strings are
	  stored

Revision 1.23 / (download) - annotate - [select for diffs], Wed Dec 31 06:06:12 1997 UTC (26 years, 3 months ago) by thorpej
Branch: MAIN
Changes since 1.22: +4 -4 lines
Diff to previous 1.22 (colored) to selected 1.4 (colored)

Change an exit() to _exit(), so that it's safe for vfork().

Revision 1.22 / (download) - annotate - [select for diffs], Sun Sep 28 03:31:01 1997 UTC (26 years, 6 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.21: +6 -2 lines
Diff to previous 1.21 (colored) to selected 1.4 (colored)

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

Revision 1.21 / (download) - annotate - [select for diffs], Tue Jul 1 21:17:11 1997 UTC (26 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.20: +3 -2 lines
Diff to previous 1.20 (colored) to selected 1.4 (colored)

Add WARNS=1
RCSID police

Revision 1.20 / (download) - annotate - [select for diffs], Wed May 7 07:31:37 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.4 (colored)

Ignore `-t' when the .MAKE attribute is set.

Revision 1.19 / (download) - annotate - [select for diffs], Tue May 6 23:51:29 1997 UTC (26 years, 10 months ago) by mycroft
Branch: MAIN
Changes since 1.18: +7 -6 lines
Diff to previous 1.18 (colored) to selected 1.4 (colored)

Make sure `-n' is actually disabled for targets with the .MAKE attribute.

Revision 1.18 / (download) - annotate - [select for diffs], Fri Mar 28 22:31:22 1997 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) to selected 1.4 (colored)

Make sure that the children of nodes that are marked .MADE, are marked
UPTODATE and their timestamps are consistent.

Revision 1.17 / (download) - annotate - [select for diffs], Sun Mar 23 01:25:28 1997 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.16: +5 -3 lines
Diff to previous 1.16 (colored) to selected 1.4 (colored)

Locate all the children of a node marked as MADE.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 10 21:19:49 1997 UTC (27 years ago) by christos
Branch: MAIN
Changes since 1.15: +5 -2 lines
Diff to previous 1.15 (colored) to selected 1.4 (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.15 / (download) - annotate - [select for diffs], Thu Feb 20 16:51:47 1997 UTC (27 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.14: +10 -5 lines
Diff to previous 1.14 (colored) to selected 1.4 (colored)

Reported by cgd: fix .USE directive problems:
    1. ${.*} variables did not get expanded in dependencies.
    2. expanded ${.*} variables in .USE dependencies can cause tree
       restructuring; handle it.
    3. in compat mode, expand .USE before evaluating the list of targets,
       instead of doing .USE expansions on demand, because they can cause
       tree restructuring.

Revision 1.14 / (download) - annotate - [select for diffs], Wed Nov 6 17:59:01 1996 UTC (27 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.13: +20 -16 lines
Diff to previous 1.13 (colored) to selected 1.4 (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.13 / (download) - annotate - [select for diffs], Wed Nov 22 17:40:00 1995 UTC (28 years, 4 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.12: +7 -7 lines
Diff to previous 1.12 (colored) to selected 1.4 (colored)

Updates for POSIX/SVR4 compiling:

arch.c:		 Don't require ranlib stuff. Not everybody has it.
dir.c:		 SunOS-4 != Solaris; change #ifdef sun to #if sun && !__svr4__
job.c, compat.c: Don't use 'union wait', use int and the W*() macros.
main.c: 	 Check for uname() == -1; some unames return > 0...
util.c, job.c:	 Add signal() with BSD semantics for svr4, don't use bsd
		 sigmask and friends.

Revision 1.12 / (download) - annotate - [select for diffs], Thu Nov 2 23:54:43 1995 UTC (28 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.11: +3 -5 lines
Diff to previous 1.11 (colored) to selected 1.4 (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.11 / (download) - annotate - [select for diffs], Wed Sep 27 18:44:38 1995 UTC (28 years, 6 months ago) by jtc
Branch: MAIN
CVS Tags: netbsd-1-1-base, netbsd-1-1-RELEASE, netbsd-1-1-PATCH001, netbsd-1-1
Changes since 1.10: +5 -5 lines
Diff to previous 1.10 (colored) to selected 1.4 (colored)

Update lseek() constants:
	L_SET	-> SEEK_SET
And add off_t cast to offset argument.

Revision 1.10 / (download) - annotate - [select for diffs], Wed Jun 14 15:18:55 1995 UTC (28 years, 9 months ago) by christos
Branch: MAIN
Changes since 1.9: +7 -2 lines
Diff to previous 1.9 (colored) to selected 1.4 (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.9 / (download) - annotate - [select for diffs], Fri Nov 25 19:16:45 1994 UTC (29 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.8: +2 -2 lines
Diff to previous 1.8 (colored) to selected 1.4 (colored)

Don't remove targets when the -n flag is given and make is interrupted.
(From Keith Bostic)

Revision 1.8 / (download) - annotate - [select for diffs], Thu Jun 16 18:50:04 1994 UTC (29 years, 9 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.7: +2 -2 lines
Diff to previous 1.7 (colored) to selected 1.4 (colored)

Christos' fix for quoting variable extraction properly.

Revision 1.7 / (download) - annotate - [select for diffs], Mon Jun 6 22:45:21 1994 UTC (29 years, 9 months ago) by jtc
Branch: MAIN
Changes since 1.6: +30 -18 lines
Diff to previous 1.6 (colored) to selected 1.4 (colored)

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

Revision 1.6 / (download) - annotate - [select for diffs], Mon Mar 7 22:22:01 1994 UTC (30 years ago) by cgd
Branch: MAIN
Changes since 1.5: +9 -1 lines
Diff to previous 1.5 (colored) to selected 1.4 (colored)

kill some warnings, from Christos.

Revision 1.5 / (download) - annotate - [select for diffs], Sat Mar 5 00:34:37 1994 UTC (30 years, 1 month ago) by cgd
Branch: MAIN
Changes since 1.4: +25 -20 lines
Diff to previous 1.4 (colored)

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

Revision 1.4 / (download) - annotate - [selected], Thu Jan 13 21:01:44 1994 UTC (30 years, 2 months ago) by jtc
Branch: MAIN
Changes since 1.3: +2 -1 lines
Diff to previous 1.3 (colored)

Include appropriate header files to bring prototypes into scope.

Revision 1.3 / (download) - annotate - [select for diffs], Sun Aug 1 18:11:53 1993 UTC (30 years, 8 months ago) by mycroft
Branch: MAIN
Changes since 1.2: +2 -8 lines
Diff to previous 1.2 (colored) to selected 1.4 (colored)

Add RCS identifiers.

Revision 1.2 / (download) - annotate - [select for diffs], Sun Mar 21 18:04:42 1993 UTC (31 years ago) by cgd
Branch: MAIN
CVS Tags: patchkit-0-2-2, netbsd-alpha-1, netbsd-0-9-base, netbsd-0-9-RELEASE, netbsd-0-9-BETA, netbsd-0-9-ALPHA2, netbsd-0-9-ALPHA, netbsd-0-9, netbsd-0-8
Changes since 1.1: +15 -2 lines
Diff to previous 1.1 (colored) to selected 1.4 (colored)

after 0.2.2 "stable" patches applied

Revision 1.1 / (download) - annotate - [select for diffs], Sun Mar 21 09:45:37 1993 UTC (31 years ago) by cgd
Branch: MAIN
Diff to selected 1.4 (colored)

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>