Skip to content

Commit 0e69b51

Browse files
lumagndechesne
authored andcommitted
make: simplify Makefile
Simplify Makefile in order to describe targets properly. Don't invoke subprocesses, don't use unnecessary .PHONY, etc. Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent 19ba646 commit 0e69b51

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Makefile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
TOPDIR := $(PWD)
2-
PLATFORMS := $(wildcard platforms/*)
2+
PLATFORMS := $(foreach platform,$(wildcard platforms/*),$(platform)/gpt)
33

4-
.PHONY: $(PLATFORMS) all
4+
.PHONY: all
55

6-
$(PLATFORMS):
7-
$(MAKE) -C $@ -f $(PWD)/Makefile all
6+
all: $(PLATFORMS)
87

9-
all:
10-
$(TOPDIR)/gen_partition.py -i partitions.conf -o partitions.xml
11-
$(TOPDIR)/ptool.py -x partitions.xml
8+
%/gpt: %/partitions.xml
9+
cd $(shell dirname $^) && $(TOPDIR)/ptool.py -x partitions.xml
10+
11+
%/partitions.xml: %/partitions.conf
12+
$(TOPDIR)/gen_partition.py -i $^ -o $@
1213

1314
check:
1415
# W605: invalid escape sequence

0 commit comments

Comments
 (0)