The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/directive-include-guard.mk

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

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Aug 7 05:48:45 2024 UTC (3 months, 3 weeks ago) by rillig
Branches: MAIN
CVS tags: HEAD
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +5 -3 lines
make: in erroneous conditions, report the non-expanded text

In a condition, when a function call expression is missing its closing
parenthesis, there's no point in having the expanded argument text in
the error message.

When parsing a bare word in a condition, the trailing space was included
in that word, which was inconsistent, as the leading space was not
included either.  Removing the trailing space from the word reduces the
cases where a multiple-inclusion guard steps in, but only in an edge
case that is irrelevant in practice.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Wed Aug 7 05:37:11 2024 UTC (3 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +15 -7 lines
tests/make: demonstrate unintended parsing of words in conditions

A word is not supposed to include its trailing space, as it doesn't
contain its leading space either.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sun Dec 17 14:07:22 2023 UTC (11 months, 2 weeks ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +15 -1 lines
tests/make: extend tests for include guards and empty expressions

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sun Dec 17 09:17:16 2023 UTC (11 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +52 -2 lines
tests/make: add tests for spacing in multiple-inclusion guards

Revision 1.14: download - view: text, markup, annotated - select for diffs
Sun Dec 17 08:53:55 2023 UTC (11 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +47 -47 lines
make: clean up names of local variables

No binary change.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Oct 19 18:24:33 2023 UTC (13 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +27 -7 lines
tests/make: clean up, explain and reorganize several tests

Revision 1.12: download - view: text, markup, annotated - select for diffs
Fri Aug 11 04:56:31 2023 UTC (15 months, 3 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +38 -36 lines
make: clean up multiple-inclusion guards

No functional change.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Wed Jun 21 21:21:52 2023 UTC (17 months, 2 weeks ago) by sjg
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +3 -44 lines
Cleanup guard tests

The .PARSEFILE:tA tests add no value, the correct form
is ${.PARSEDIR:tA}/${.PARSEFILE} but even there :tA rarely matters.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Wed Jun 21 14:33:36 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +90 -29 lines
make: skip a file protected by a multiple-inclusion guard more often

In practice, the common situation is that a file is first included,
defines its multiple-inclusion guard and is then skipped instead of
being included again.

The other way round is that the multiple-inclusion guard is defined when
the file is included first.  In that case, the file is now regarded as
guarded as well.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Wed Jun 21 12:16:31 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +328 -169 lines
tests/make: clean up and extend tests for multiple-inclusion guards

Multiple-inclusion guards can be defined either as variables or as
targets.  Rename the variable tests so they include the word 'variable'.

Add tests to cover special characters in guard names (both variable and
target), just in case ParseVarnameGuard gets removed someday.

Document the pitfalls associated with choosing a naming scheme for
guards that leads to name clashes, such as with .PARSEFILE without
.PARSEDIR.

Revision 1.8: download - view: text, markup, annotated - select for diffs
Wed Jun 21 04:20:21 2023 UTC (17 months, 2 weeks ago) by sjg
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +34 -3 lines
Allow guard targets to use variables.

I commonly use __${.PARSEDIR:tA}__ where a unique guard
is needed, __${.PARSEDIR}__ is also useful in many cases.

Combination of patch from rillig and mine

Revision 1.7: download - view: text, markup, annotated - select for diffs
Tue Jun 20 09:25:34 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +78 -18 lines
make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Jun 19 20:07:35 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +57 -7 lines
make: add tests for full code coverage of multiple-inclusion guards

Revision 1.5: download - view: text, markup, annotated - select for diffs
Mon Jun 19 12:53:57 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +30 -32 lines
make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Jun 18 20:43:52 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +36 -2 lines
tests/make: clean up test for multiple-inclusion guards

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Jun 18 19:30:31 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +3 -3 lines
tests/make: align variable name in test for multiple-inclusion guards

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Jun 18 19:16:51 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +63 -3 lines
tests/make: extend test for multiple-inclusion guards

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Jun 16 09:25:13 2023 UTC (17 months, 2 weeks ago) by rillig
Branches: MAIN
tests/make: add test for multiple-inclusion guards

Diff request

This form allows you to request diffs 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.

Log view options

CVSweb <webmaster@jp.NetBSD.org>