Skip to content

Commit 959edef

Browse files
committed
Makefile: add clean target and preserve partitions.xml
To improve build hygiene and to ensure partitions.xml is retained, - Add 'clean' target to remove generated XML and binary files. - Declare '.SECONDARY' to prevent Make from automatically deleting intermediate build artifacts like partitions.xml. Signed-off-by: Viswanath Kraleti <viswanath.kraleti@oss.qualcomm.com>
1 parent e71fe81 commit 959edef

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PLATFORMS := $(foreach platform,$(wildcard platforms/*),$(platform)/gpt)
33
BINS := gen_partition.py msp.py ptool.py
44
PREFIX ?= /usr/local
55

6-
.PHONY: all check lint integration
6+
.PHONY: all check clean lint integration
77

88
all: $(PLATFORMS)
99

@@ -26,3 +26,9 @@ check: lint integration
2626
install: $(BINS)
2727
install -d $(DESTDIR)$(PREFIX)/bin
2828
install -m 755 $^ $(DESTDIR)$(PREFIX)/bin
29+
30+
clean:
31+
@rm -f platforms/*/*.xml platforms/*/*.bin
32+
33+
# preserve intermediate (partitions.xml etc.) targets
34+
.SECONDARY:

0 commit comments

Comments
 (0)