[U-Boot] [PATCH v1 05/11] Makefile: add build script for asn1 parsers

AKASHI Takahiro takahiro.akashi at linaro.org
Thu Oct 17 06:40:37 UTC 2019


On Sat, Oct 12, 2019 at 02:36:48PM +0200, Heinrich Schuchardt wrote:
> On 10/11/19 9:41 AM, AKASHI Takahiro wrote:
> >This rule will be used to build x509 and pkcs7 parsers.
> >
> >Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
> 
> The ASN1 compiler is generating both *.asn.h and *.asn.c files.
> 
> Then I would expect that these files are deleted by `make mrproper'.
> 
> Please, adjust the clean: target in /Makefile accordingly.

Good catch, thank you.

-Takahiro Akashi

> Best regards
> 
> Heinrich
> 
> >---
> >  scripts/Makefile.build | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> >diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> >index f7a041296d3d..9357d310e50b 100644
> >--- a/scripts/Makefile.build
> >+++ b/scripts/Makefile.build
> >@@ -331,7 +331,7 @@ quiet_cmd_asn1_compiler = ASN.1   $@
> >        cmd_asn1_compiler = $(objtree)/scripts/asn1_compiler $< \
> >  				$(subst .h,.c,$@) $(subst .c,.h,$@)
> >
> >-$(obj)/%-asn1.c $(obj)/%-asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
> >+$(obj)/%.asn1.c $(obj)/%.asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler
> >  	$(call cmd,asn1_compiler)
> >
> >  # Build the compiled-in targets
> >@@ -419,9 +419,11 @@ targets += $(multi-used-y) $(multi-used-m)
> >  intermediate_targets = $(foreach sfx, $(2), \
> >  				$(patsubst %$(strip $(1)),%$(sfx), \
> >  					$(filter %$(strip $(1)), $(targets))))
> >+# %.asn1.o <- %.asn1.[ch] <- %.asn1
> >  # %.lex.o <- %.lex.c <- %.l
> >  # %.tab.o <- %.tab.[ch] <- %.y
> >-targets += $(call intermediate_targets, .lex.o, .lex.c) \
> >+targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
> >+	   $(call intermediate_targets, .lex.o, .lex.c) \
> >  	   $(call intermediate_targets, .tab.o, .tab.c .tab.h)
> >
> >  # Descending
> >
> 


More information about the U-Boot mailing list