<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/make-git.git/tests/scripts/features/se_implicit, branch master</title>
<subtitle>git.savannah.gnu.org: git/make.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/'/>
<entry>
<title>Fix tests for MacOS and Windows</title>
<updated>2022-08-31T01:05:34+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2022-08-30T17:41:37+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=15a7e3830fd7b84238e4909522ce3cd6fec7b702'/>
<id>15a7e3830fd7b84238e4909522ce3cd6fec7b702</id>
<content type='text'>
* maintMakefile: Remove the template headers as prerequisites.
* tests/scripts/features/jobserver: Only test fifo if enabled.
* tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default
directories exist so .INCLUDE_DIRS is empty by default.
* tests/scripts/features/se_explicit: Fail via exit.  cp will show
different error messages on different systems.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* maintMakefile: Remove the template headers as prerequisites.
* tests/scripts/features/jobserver: Only test fifo if enabled.
* tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default
directories exist so .INCLUDE_DIRS is empty by default.
* tests/scripts/features/se_explicit: Fail via exit.  cp will show
different error messages on different systems.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 62706] Only second-expand targets that might be built</title>
<updated>2022-07-30T22:40:28+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2022-07-24T22:16:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=07eea3aa496184bb763b7306e9de6a40a94605c9'/>
<id>07eea3aa496184bb763b7306e9de6a40a94605c9</id>
<content type='text'>
Second-expand only the prerequisites of the targets being built.
Defer second-expanding the prerequisites of targets until we need
to decide if they should be built.

* NEWS: Mention the change in behavior.
* doc/make.texi (Secondary Expansion): Document the new behavior.
* src/filedef.h (struct file): Add flag snapped.
(expand_deps): Declare a function to second expand the
prerequisites of a target.
* src/file.c (rehash_file): Merge flag snapped.
(expand_deps): Remove qualifier static. Check flag snapped.
(snap_deps): Remove the loop which performed second expansion for all
targets.
* src/remake.c (update_file_1): Second expand the prerequisites of
the considered target.
* tests/scripts/features/se_explicit: Add tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Second-expand only the prerequisites of the targets being built.
Defer second-expanding the prerequisites of targets until we need
to decide if they should be built.

* NEWS: Mention the change in behavior.
* doc/make.texi (Secondary Expansion): Document the new behavior.
* src/filedef.h (struct file): Add flag snapped.
(expand_deps): Declare a function to second expand the
prerequisites of a target.
* src/file.c (rehash_file): Merge flag snapped.
(expand_deps): Remove qualifier static. Check flag snapped.
(snap_deps): Remove the loop which performed second expansion for all
targets.
* src/remake.c (update_file_1): Second expand the prerequisites of
the considered target.
* tests/scripts/features/se_explicit: Add tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 62175] Rework secondary expansion tests</title>
<updated>2022-04-24T18:56:26+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2022-04-24T18:56:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=4e1be4a60c33bdfd99ef764af4bf1af359c8940a'/>
<id>4e1be4a60c33bdfd99ef764af4bf1af359c8940a</id>
<content type='text'>
The hash function we use can yield different results on big- and
little-endian systems which makes test output different.  Choose
names to avoid this.

* tests/scripts/features/patternrules: Choose portable target names.
* tests/scripts/features/se_explicit: Ditto.
* tests/scripts/features/se_implicit: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The hash function we use can yield different results on big- and
little-endian systems which makes test output different.  Choose
names to avoid this.

* tests/scripts/features/patternrules: Choose portable target names.
* tests/scripts/features/se_explicit: Ditto.
* tests/scripts/features/se_implicit: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 62324] Simplify set_file_variables by passing in the stem</title>
<updated>2022-04-24T14:39:32+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2022-04-24T00:34:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=8c2aa889bbe7fbd59d2655d6dc5a26cf86dfecf7'/>
<id>8c2aa889bbe7fbd59d2655d6dc5a26cf86dfecf7</id>
<content type='text'>
Previously we always used the file-&gt;stem value as our stem in
set_file_variables(); when that wasn't correct we had to temporarily
set that value while the function was called, then reset it afterward.
This led to issues (for example when we assumed the stem was a cached
string but it wasn't).

Avoid this by passing in the stem as an argument so that different
values can be provided.

Add tests to verify this.

* src/commands.c (set_file_variables): Take second parameter stem to
relieve the callers of set_file_variables() from setting/restoring
file-&gt;stem.
* src/commands.h (set_file_variables): Ditto.
(execute_file_commands): Pass file-&gt;stem to set_file_variables().
* src/file.c (expand_deps): Pass d-&gt;stem to set_file_variables() and
remove set and restore of file-&gt;stem.
* src/implicit.c (pattern_search): Pass stem to set_file_variables()
and remove set and restore of file-&gt;stem.
* tests/scripts/features/se_explicit: Add new tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
* tests/scripts/variables/automatic: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously we always used the file-&gt;stem value as our stem in
set_file_variables(); when that wasn't correct we had to temporarily
set that value while the function was called, then reset it afterward.
This led to issues (for example when we assumed the stem was a cached
string but it wasn't).

Avoid this by passing in the stem as an argument so that different
values can be provided.

Add tests to verify this.

* src/commands.c (set_file_variables): Take second parameter stem to
relieve the callers of set_file_variables() from setting/restoring
file-&gt;stem.
* src/commands.h (set_file_variables): Ditto.
(execute_file_commands): Pass file-&gt;stem to set_file_variables().
* src/file.c (expand_deps): Pass d-&gt;stem to set_file_variables() and
remove set and restore of file-&gt;stem.
* src/implicit.c (pattern_search): Pass stem to set_file_variables()
and remove set and restore of file-&gt;stem.
* tests/scripts/features/se_explicit: Add new tests.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
* tests/scripts/variables/automatic: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 48643] Add more tests of intermediates and unrelated targets</title>
<updated>2022-02-06T23:46:32+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2022-01-21T23:37:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=f3e345c86959d5e6b1f1fe1830f5623b96369df8'/>
<id>f3e345c86959d5e6b1f1fe1830f5623b96369df8</id>
<content type='text'>
If a prereq of a pattern is explicitly mentioned as a prereq of an
unrelated rule, it should not be considered an intermediate file.

* tests/scripts/features/double_colon: Add tests mentioning unrelated
explicit targets.
* tests/scripts/features/grouped_targets: Ditto.
* tests/scripts/features/implicit_search: Ditto.
* tests/scripts/features/patternrules: Ditto.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/statipattrules: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a prereq of a pattern is explicitly mentioned as a prereq of an
unrelated rule, it should not be considered an intermediate file.

* tests/scripts/features/double_colon: Add tests mentioning unrelated
explicit targets.
* tests/scripts/features/grouped_targets: Ditto.
* tests/scripts/features/implicit_search: Ditto.
* tests/scripts/features/patternrules: Ditto.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/statipattrules: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 60659] Set $$&lt; properly in second expansion</title>
<updated>2021-05-30T19:53:41+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2021-05-29T23:03:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=b580949ae0981cc2ecd466ad1dacb42f2f4a9f7d'/>
<id>b580949ae0981cc2ecd466ad1dacb42f2f4a9f7d</id>
<content type='text'>
Set the $$&lt; automatic variable as best we can during secondary
expansion of prerequisites.

* src/commands.c (set_file_variables): Don't break without setting
'less' if secondary expansion is enabled.
* tests/scripts/features/se_explicit: Test secondary expansion results.
* tests/scripts/features/se_implicit: Test secondary expansion results.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Set the $$&lt; automatic variable as best we can during secondary
expansion of prerequisites.

* src/commands.c (set_file_variables): Don't break without setting
'less' if secondary expansion is enabled.
* tests/scripts/features/se_explicit: Test secondary expansion results.
* tests/scripts/features/se_implicit: Test secondary expansion results.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 60188] Explicit prereqs cannot be intermediate files</title>
<updated>2021-03-15T06:10:49+00:00</updated>
<author>
<name>Dmitry Goncharov</name>
<email>dgoncharov@users.sf.net</email>
</author>
<published>2021-03-15T06:10:49+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=510e5ce801d957338be764a794f1463b662a7edc'/>
<id>510e5ce801d957338be764a794f1463b662a7edc</id>
<content type='text'>
If a prereq of a pattern is an explicit target, it should not be
considered an intermediate file.

(Minor tweaks by Paul Smith &lt;psmith@gnu.org&gt;)

* src/dep.h (struct nameseq): Add is_explicit flag.
* src/implicit.c (struct patdeps): Ditto.
(pattern_search): Set the is_explicit flag appropriately for each
prerequisite, based on whether it contained a pattern or not.
Update the help output to note implicit vs. explicit prereqs.
* tests/scripts/features/double_colon: Add tests.
* tests/scripts/features/grouped_targets: Ditto.
* tests/scripts/features/patternrules: Ditto.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/statipattrules: Ditto.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a prereq of a pattern is an explicit target, it should not be
considered an intermediate file.

(Minor tweaks by Paul Smith &lt;psmith@gnu.org&gt;)

* src/dep.h (struct nameseq): Add is_explicit flag.
* src/implicit.c (struct patdeps): Ditto.
(pattern_search): Set the is_explicit flag appropriately for each
prerequisite, based on whether it contained a pattern or not.
Update the help output to note implicit vs. explicit prereqs.
* tests/scripts/features/double_colon: Add tests.
* tests/scripts/features/grouped_targets: Ditto.
* tests/scripts/features/patternrules: Ditto.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/statipattrules: Ditto.
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 54161] Fix second expansion of $* for paths</title>
<updated>2019-12-18T14:05:17+00:00</updated>
<author>
<name>Jouke Witteveen</name>
<email>j.witteveen@gmail.com</email>
</author>
<published>2019-10-26T10:24:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=86f2f8bcb5b4a03da8eb37e9a99c22d8fec4bfb2'/>
<id>86f2f8bcb5b4a03da8eb37e9a99c22d8fec4bfb2</id>
<content type='text'>
If the stem matches a path containing a directory not just a
filename, make sure the second expansion of $* in the
prerequisites matches $* in the recipe.  This requires using
$(*F) when replacing % in the first expansion to preserve the
simple filename.

* src/implicit.c (pattern_search): If lastslash is set prepend
the directory onto the stem.  Then use $(*F) when expanding %.
* tests/scripts/features/se_implicit: Add a test case
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the stem matches a path containing a directory not just a
filename, make sure the second expansion of $* in the
prerequisites matches $* in the recipe.  This requires using
$(*F) when replacing % in the first expansion to preserve the
simple filename.

* src/implicit.c (pattern_search): If lastslash is set prepend
the directory onto the stem.  Then use $(*F) when expanding %.
* tests/scripts/features/se_implicit: Add a test case
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 28456] Don't override $&lt; when no default rule has been defined</title>
<updated>2019-07-13T15:47:26+00:00</updated>
<author>
<name>Mike Haboustak</name>
<email>haboustak@gmail.com</email>
</author>
<published>2019-07-12T01:08:38+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=ee167c650e53bde545f67152092b4669c76186ef'/>
<id>ee167c650e53bde545f67152092b4669c76186ef</id>
<content type='text'>
The check for matching a file's command to the default rule's command
does not account for null. If no .DEFAULT is defined a rule with no
recipe has it's $&lt; variable set to the value of $@. This breaks second
expansion, particularly when used with pattern rules.

* src/commands.c [set_file_variables]: Check that cmds is set
* tests/scripts/features/se_explicit: Test case
* tests/scripts/features/se_implicit: Test case

Copyright-paperwork-exempt: yes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The check for matching a file's command to the default rule's command
does not account for null. If no .DEFAULT is defined a rule with no
recipe has it's $&lt; variable set to the value of $@. This breaks second
expansion, particularly when used with pattern rules.

* src/commands.c [set_file_variables]: Check that cmds is set
* tests/scripts/features/se_explicit: Test case
* tests/scripts/features/se_implicit: Test case

Copyright-paperwork-exempt: yes
</pre>
</div>
</content>
</entry>
<entry>
<title>[SV 31155] Parse order-only tokens in second expansion results.</title>
<updated>2013-09-22T21:10:35+00:00</updated>
<author>
<name>Paul Smith</name>
<email>psmith@gnu.org</email>
</author>
<published>2013-09-22T20:59:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/make-git.git/commit/?id=fd30db129060770ac0851035e1ca00c371cbee62'/>
<id>fd30db129060770ac0851035e1ca00c371cbee62</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
