History log of /netbsd-current/usr.bin/make/unit-tests/directive-include-guard.exp
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.16 07-Aug-2024 rillig

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.


# 1.15 07-Aug-2024 rillig

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 tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.14 17-Dec-2023 rillig

tests/make: extend tests for include guards and empty expressions


# 1.13 17-Dec-2023 rillig

tests/make: add tests for spacing in multiple-inclusion guards


# 1.12 19-Oct-2023 rillig

tests/make: clean up, explain and reorganize several tests


# 1.11 11-Aug-2023 rillig

make: clean up multiple-inclusion guards

No functional change.


# 1.10 21-Jun-2023 sjg

Cleanup guard tests

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


# 1.9 21-Jun-2023 rillig

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.


# 1.8 21-Jun-2023 rillig

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.


# 1.7 21-Jun-2023 sjg

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


# 1.6 20-Jun-2023 rillig

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 1.5 19-Jun-2023 rillig

make: add tests for full code coverage of multiple-inclusion guards


# 1.4 19-Jun-2023 rillig

make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@


# 1.3 18-Jun-2023 rillig

tests/make: clean up test for multiple-inclusion guards


# 1.2 18-Jun-2023 rillig

tests/make: extend test for multiple-inclusion guards


# 1.1 16-Jun-2023 rillig

tests/make: add test for multiple-inclusion guards


# 1.14 17-Dec-2023 rillig

tests/make: extend tests for include guards and empty expressions


# 1.13 17-Dec-2023 rillig

tests/make: add tests for spacing in multiple-inclusion guards


# 1.12 19-Oct-2023 rillig

tests/make: clean up, explain and reorganize several tests


# 1.11 11-Aug-2023 rillig

make: clean up multiple-inclusion guards

No functional change.


# 1.10 21-Jun-2023 sjg

Cleanup guard tests

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


# 1.9 21-Jun-2023 rillig

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.


# 1.8 21-Jun-2023 rillig

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.


# 1.7 21-Jun-2023 sjg

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


# 1.6 20-Jun-2023 rillig

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 1.5 19-Jun-2023 rillig

make: add tests for full code coverage of multiple-inclusion guards


# 1.4 19-Jun-2023 rillig

make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@


# 1.3 18-Jun-2023 rillig

tests/make: clean up test for multiple-inclusion guards


# 1.2 18-Jun-2023 rillig

tests/make: extend test for multiple-inclusion guards


# 1.1 16-Jun-2023 rillig

tests/make: add test for multiple-inclusion guards


# 1.12 19-Oct-2023 rillig

tests/make: clean up, explain and reorganize several tests


# 1.11 11-Aug-2023 rillig

make: clean up multiple-inclusion guards

No functional change.


# 1.10 21-Jun-2023 sjg

Cleanup guard tests

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


# 1.9 21-Jun-2023 rillig

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.


# 1.8 21-Jun-2023 rillig

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.


# 1.7 21-Jun-2023 sjg

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


# 1.6 20-Jun-2023 rillig

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 1.5 19-Jun-2023 rillig

make: add tests for full code coverage of multiple-inclusion guards


# 1.4 19-Jun-2023 rillig

make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@


# 1.3 18-Jun-2023 rillig

tests/make: clean up test for multiple-inclusion guards


# 1.2 18-Jun-2023 rillig

tests/make: extend test for multiple-inclusion guards


# 1.1 16-Jun-2023 rillig

tests/make: add test for multiple-inclusion guards


# 1.11 11-Aug-2023 rillig

make: clean up multiple-inclusion guards

No functional change.


# 1.10 21-Jun-2023 sjg

Cleanup guard tests

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


# 1.9 21-Jun-2023 rillig

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.


# 1.8 21-Jun-2023 rillig

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.


# 1.7 21-Jun-2023 sjg

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


# 1.6 20-Jun-2023 rillig

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 1.5 19-Jun-2023 rillig

make: add tests for full code coverage of multiple-inclusion guards


# 1.4 19-Jun-2023 rillig

make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@


# 1.3 18-Jun-2023 rillig

tests/make: clean up test for multiple-inclusion guards


# 1.2 18-Jun-2023 rillig

tests/make: extend test for multiple-inclusion guards


# 1.1 16-Jun-2023 rillig

tests/make: add test for multiple-inclusion guards


# 1.10 21-Jun-2023 sjg

Cleanup guard tests

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


# 1.9 21-Jun-2023 rillig

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.


# 1.8 21-Jun-2023 rillig

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.


# 1.7 21-Jun-2023 sjg

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


# 1.6 20-Jun-2023 rillig

make: allow targets to be used as multiple-inclusion guards

This style is used by FreeBSD, among others.


# 1.5 19-Jun-2023 rillig

make: add tests for full code coverage of multiple-inclusion guards


# 1.4 19-Jun-2023 rillig

make: if a makefile is protected by a guard, only include it once

"looks reasonable" sjg@


# 1.3 18-Jun-2023 rillig

tests/make: clean up test for multiple-inclusion guards


# 1.2 18-Jun-2023 rillig

tests/make: extend test for multiple-inclusion guards


# 1.1 16-Jun-2023 rillig

tests/make: add test for multiple-inclusion guards