Makefile: add build script for asn1 parsers
[oweals/u-boot.git] / scripts / Makefile.build
index f7a041296d3d9972d3a9a933c1dd0267f4b3aa9c..6d59ea91fac364065664cd700874e90694b75250 100644 (file)
@@ -328,10 +328,10 @@ $(obj)/%.lds: $(src)/%.lds.S FORCE
 # ASN.1 grammar
 # ---------------------------------------------------------------------------
 quiet_cmd_asn1_compiler = ASN.1   $@
-      cmd_asn1_compiler = $(objtree)/scripts/asn1_compiler $< \
+      cmd_asn1_compiler = $(objtree)/tools/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)/tools/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