diff options
Diffstat (limited to 'src/intel/Makefile.genxml.am')
-rw-r--r-- | src/intel/Makefile.genxml.am | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/intel/Makefile.genxml.am b/src/intel/Makefile.genxml.am index f80e2fd3bb8..8d7d4026638 100644 --- a/src/intel/Makefile.genxml.am +++ b/src/intel/Makefile.genxml.am @@ -21,7 +21,7 @@ BUILT_SOURCES += $(GENXML_GENERATED_FILES) -SUFFIXES = _pack.h .xml +SUFFIXES = _pack.h _xml.h .xml $(GENXML_GENERATED_FILES): genxml/gen_pack_header.py @@ -29,6 +29,16 @@ $(GENXML_GENERATED_FILES): genxml/gen_pack_header.py $(MKDIR_GEN) $(PYTHON_GEN) $(srcdir)/genxml/gen_pack_header.py $< > $@ +# xxd generates variable names based on the path of the input file. We +# prefer to generate our own name here, so it doesn't vary from +# in/out-of-tree builds. +%_xml.h: %.xml Makefile + $(MKDIR_GEN) + $(AM_V_GEN) echo -n "static const uint8_t " > $@; \ + sed -e 's,_xml.h,,' <<< "`basename $@`_xml[] = {" >> $@; \ + cat $< | $(XXD) -i >> $@; \ + echo "};" >> $@ + EXTRA_DIST += \ genxml/gen4.xml \ genxml/gen45.xml \ |