Skip to content

Commit cc55107

Browse files
committed
Makefile: generate contents.xml for supported platforms
For platforms with a contents.xml.in avilable, generate contents.xml from it using gen_contents.py Signed-off-by: Viswanath Kraleti <[email protected]>
1 parent 9485088 commit cc55107

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,31 @@
11
TOPDIR := $(PWD)
22
PLATFORMS := $(foreach platform,$(wildcard platforms/*),$(platform)/gpt)
33
PARTITIONS_XML := $(foreach platform,$(wildcard platforms/*),$(platform)/partitions.xml)
4-
BINS := gen_partition.py msp.py ptool.py
4+
CONTENTS_XML := $(patsubst %.xml.in,%.xml,$(wildcard platforms/*/contents.xml.in))
5+
BINS := gen_contents.py gen_partition.py msp.py ptool.py
56
PREFIX ?= /usr/local
67

78
.PHONY: all check clean lint integration
89

9-
all: $(PLATFORMS) $(PARTITIONS_XML)
10+
all: $(PLATFORMS) $(PARTITIONS_XML) $(CONTENTS_XML)
1011

1112
%/gpt: %/partitions.xml
1213
cd $(shell dirname $^) && $(TOPDIR)/ptool.py -x partitions.xml
1314

1415
%/partitions.xml: %/partitions.conf
1516
$(TOPDIR)/gen_partition.py -i $^ -o $@
1617

18+
%/contents.xml: %/partitions.xml %/contents.xml.in
19+
$(TOPDIR)/gen_contents.py -p $< -t $@.in -o $@
20+
1721
lint:
1822
# W605: invalid escape sequence
1923
pycodestyle --select=W605 *.py
2024

25+
# gen_contents.py is nearly perfect except E501: line too long.
26+
# Ensure there are no regressions.
27+
pycodestyle --ignore=E501 gen_contents.py
28+
2129
integration: all
2230
# make sure generated output has created expected files
2331
tests/integration/check-missing-files platforms/*/*.xml

0 commit comments

Comments
 (0)