| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Export the function xappendword() from make. Use it in drop and
watch.
Saves 8-80 bytes, an unusually large disparity.
|
|
|
|
|
|
| |
Use alloc_ext_space() instead of a hand-coded equivalent.
Saves 16-32 bytes.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Assignment of shell output to a macro ('!=') was originally a
non-POSIX extension. It later became a POSIX 202X feature.
However, the implementation failed to include the additional
POSIX requirement that leading whitespace is removed from the
shell output.
Neither GNU make nor bmake strip leading whitespace. Implement
this behaviour as a non-POSIX extension.
|
|
|
|
|
|
|
|
|
| |
Commit f261d2d27 (make: make + sh configuration) added 'pdpmake'
as an alias for 'make'.
It should have been possible to include 'pdpmake' in a build without
also including 'make'. Adjust the build configuration so this works
as intended.
|
|
|
|
|
|
| |
Add a command line option to allow pragmas to be set. This is an
alternative to the use of the .PRAGMA special target. The same
pragmas are supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the special target .PRAGMA. This allows certain features
of the POSIX standard to be disabled when POSIX mode is being
enforced. This is done by setting prerequisites of .PRAGMA,
as follows:
- macro names containing '-' are permitted with the 'macro_name'
prerequisite;
- target names containing '-' or '/' are permitted with the
'target_name' prerequisite;
- the '#' character isn't treated as the start of a comment in a
command line with the 'command_comment' prerequisite;
- an empty suffix is permitted in a macro expansion of the form
$(VAR:=.c) with the 'empty_suffix' prerequisite.
Additionally the 'posix_202x' prerequisite enforces the future
POSIX standard instead of the current one. In this case the
'macro_name' and 'target_name' pragmas aren't required as the
future standard will allow the additional characters.
.PRAGMA without any prerequisites restores the default behaviour.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The POSIX standard defines suffix substitution in macro expansion
as taking the form:
$(string1 [: subst1 =[ subst2 ]])
Since 'subst1' isn't bracketed a value must be supplied. Enforce
this in POSIX mode.
As a non-POSIX extension an empty 'subst1' is permitted with 'subst2'
being added to all words unconditionally. If both 'subst1' and
'subst2' are empty the words are returned unchanged.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Error messages only displayed the location of an error while the
makefile was being parsed.
Store the location (makefile name and line number) of each command
line. This allows location information to be displayed in errors
encountered while targets are being built.
Take this Makefile, for example:
target:
@echo $(hello
Previously this would display:
make: unterminated variable '$(hello'
Now it shows:
make: (Makefile:2): unterminated variable '$(hello'
|
| |
|
|
|
|
|
| |
The test for valid macro names in POSIX mode was incorrect: it
shouldn't have allowed '-'.
|
|
|
|
|
|
| |
Add a configuration that just includes make and a shell.
Add 'pdpmake' as an alias for 'make'.
|
|
|
|
|
|
|
| |
A typo in the previous commit caused dyndep() to process inference
rules incorrectly. This didn't affect the results of the test suite
when extensions were allowed but it caused the test 'Inference rule
with explicit rule for prerequisite' to fail in POSIX mode.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Austin Group defect report 875 clarifies some aspects of inference
rules. The crux of the issue is related to chained inference rules
so it doesn't affect POSIX mode. The test makefile looks like this:
.SUFFIXES: .a .b .c
.a.c:
@echo .a.c
.b.c:
@echo .b.c
test.c: test.b
test.a:
test.b:
The correct output is deemed to be '.a.c'. Additional complications
are:
- whether or not the prerequisite files are present;
- the use of the suffixes '.a' and '.c' may result in the builtin
inference rule '.c.a' being considered.
In favourable circumstances pdpmake managed to give the correct
result, in unfavourable it reported circular dependencies or
segfaulted.
Changes to fix these issues are:
- When prerequisites are being recursively built the standard says:
'Upon recursion, each prerequisite shall become a target itself.'
Follow this requirement.
- At the end of make() the target being built should have its time
(as represented by n_tim in struct name) updated when any action
has been taken.
- When dyndep() is looking for prerequisites it should:
* skip candidates that are in the process of being built;
* consider whether an explicit candidate is a target, not whether
it has any commands associated with it.
pdpmake now behaves similarly to GNU make when presented with
makefiles like the above. bmake gives the incorrect output '.b.c'.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The POSIX specification says:
There are three kinds of comments: blank lines, empty lines, and
a <number-sign> ('#') and all following characters up to the first
unescaped <newline> character.
Most implementations don't treat '#' in a macro expansion or a command
line as the start of a comment. POSIX doesn't mention either of these
exceptions.
Permit the exceptions as a non-POSIX extension.
|
|
|
|
|
|
|
| |
Austin Group defect report 1549 has been accepted. It requires
that an escaped newline inside a macro expansion in a command is
replaced by a space. Other escaped newlines in commands are
left in place, as before.
|
| |
|
|
|
|
|
| |
The code to handle the modifiers for 'directory part' and 'filename
part' has been updated to support the $+ internal macro.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Austin Group defect report 1437 has been accepted. It describes
the special targets .NOTPARALLEL and .WAIT which are used to
influence the behaviour of parallel builds.
Since parallel builds aren't implemented in here they actually don't
't have much effect.
- For completeness they're flagged as special targets.
- .WAIT should be allowed as a prerequisite.
|
|
|
|
|
|
|
|
| |
Austin Group defect report 337 has been accepted, thus making
macro assignment from the output of a shell command (!=) a
POSIX 202X feature.
This was previously implemented as a non-POSIX extension.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Austin Group defect reports 514 and 1520 have both been accepted.
Together these introduce the internal macros $+ and $^:
- $+ lists all prerequisites, with duplicates retained;
- $^ lists all prerequisites, with duplicates removed.
$^ had already been implemented as a non-POSIX extension, it now
becomes a POSIX 202X extension. $+ has been added as a POSIX
202X extension.
Neither of the above defect reports mentions how $? should handle
duplicate prerequisites. In POSIX mode duplicates are retained.
Removal of duplicates is implemented as a non-POSIX extension to
match existing practice in other versions of make.
|
|
|
|
|
|
| |
Fix a bug in process_command() where an escaped newline followed
by a character other than tab resulted in premature termination
of the command.
|
|
This is an experimental implementation of make for busybox-w32,
based on my public domain POSIX make:
https://frippery.org/make/
(GitHub issue #44)
|