]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Makefile: Improve generated_defconfig file handling
authorSam Protsenko <semen.protsenko@linaro.org>
Fri, 8 Mar 2024 03:38:22 +0000 (21:38 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 13 Mar 2024 22:47:11 +0000 (18:47 -0400)
Commit 2027e99e61aa ("Makefile: Run defconfig files through the C
preprocessor") adds `generated_defconfig' file, but fails to clean that
up. It might be useful to have that file around after `make' is done,
but it's better to clean that up on `make clean'. Also we probably want
to hide it in `git status' list. This patch makes the described changes,
and also adds `-P' parameter to the CPP command that produces the
`generated_defconfig' to avoid generating linemarkers.

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Fixes: 2027e99e61aa ("Makefile: Run defconfig files through the C preprocessor")
Acked-by: Andrew Davis <afd@ti.com>
.gitignore
Makefile
scripts/kconfig/Makefile

index 330148119264eea7a7c9ea6bc595a957fc70f270..d9a64d742fd722480a92eccf45c866b6c430c5d5 100644 (file)
@@ -63,6 +63,7 @@ fit-dtb.blob*
 /spl/
 /tpl/
 /defconfig
+/generated_defconfig
 
 #
 # Generated include files
index 28a2a1d98c41f746582f32f2783342f733182431..91afee668e3134c8237020fad25bef879e9504d7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2233,6 +2233,7 @@ clean: $(clean-dirs)
                -o -name modules.builtin -o -name '.tmp_*.o.*' \
                -o -name 'dsdt_generated.aml' -o -name 'dsdt_generated.asl.tmp' \
                -o -name 'dsdt_generated.c' \
+               -o -name 'generated_defconfig' \
                -o -name '*.efi' -o -name '*.gcno' -o -name '*.so' \) \
                -type f -print | xargs rm -f
 
index 5ce5845e8247eb64b5efe1cf188cc40157d61237..079add4d5dab508c634a79f71e5a80db3a9255f9 100644 (file)
@@ -93,7 +93,7 @@ endif
 endif
 
 %_defconfig: $(obj)/conf
-       $(Q)$(CPP) -nostdinc -I $(srctree) -undef -x assembler-with-cpp $(srctree)/arch/$(SRCARCH)/configs/$@ -o generated_defconfig
+       $(Q)$(CPP) -nostdinc -P -I $(srctree) -undef -x assembler-with-cpp $(srctree)/arch/$(SRCARCH)/configs/$@ -o generated_defconfig
        $(Q)$< $(silent) --defconfig=generated_defconfig $(Kconfig)
 
 # Added for U-Boot (backward compatibility)