Adopted ternary LFS3_IFYES_* macros

This is hopefully a better alternative to LFS3_IFDEF_YES_* macros.

If we need special behavior for LFS3_IFDEF_YES_*, we almost always need
special behavior for LFS3_IFDEF_NO_* and LFS3_IFDEF_MAYBE_* as well.

So merging all three states into a single macro saves typing and
hopefully encourages correct handling of all cases.

No code changes.
This commit is contained in:
Christopher Haster
2025-12-29 15:16:31 -06:00
parent 7e00039fb4
commit 061d9531ab
8 changed files with 240 additions and 215 deletions
+1 -5
View File
@@ -11,11 +11,7 @@ after = ['test_mtree', 'test_gbmap', 'test_dirs', 'test_files']
# Test both with and without the gbmap if available
defines.GBMAP = [false, true]
if = '''
LFS3_IFDEF_YES_GBMAP(
GBMAP,
LFS3_IFDEF_GBMAP(true, !GBMAP))
'''
if = 'LFS3_IFYES_GBMAP(GBMAP, true, !GBMAP)'
defines.FORMAT_BLOCK_COUNT = '(GBMAP) ? 3 : 2'