summaryrefslogtreecommitdiff
path: root/steps.mk
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-27 18:42:26 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-10-27 18:42:26 (GMT)
commitb47644382215f43f96b3957b127e92caa9d33f80 (patch)
tree66ba460bc4125e1570febe965fd4facff050dc8f /steps.mk
parent84fe3f42e282437971eecd158f93e76554b7bb22 (diff)
Enhance the make fragments:
- comment the different parts - re-order the code so that it is homogeneous amogst fragments - eye-candy in some existing comments /trunk/tools/tools.mk | 17 15 2 0 +++++++++++++++-- /trunk/steps.mk | 38 26 12 0 ++++++++++++++++++++++++++------------ /trunk/samples/samples.mk | 41 28 13 0 ++++++++++++++++++++++++++++------------- /trunk/config/config.mk | 2 1 1 0 +- 4 files changed, 70 insertions(+), 28 deletions(-)
Diffstat (limited to 'steps.mk')
-rw-r--r--steps.mk38
1 files changed, 26 insertions, 12 deletions
diff --git a/steps.mk b/steps.mk
index bcd440f..acb6cef 100644
--- a/steps.mk
+++ b/steps.mk
@@ -1,6 +1,17 @@
# Makefile for each steps
# Copyright 2006 Yann E. MORIN <yann.morin.1998@anciens.enib.fr>
+# ----------------------------------------------------------
+# This is the steps help entry
+
+help-build::
+ @echo ' list-steps - List all build steps'
+
+# ----------------------------------------------------------
+# The steps list
+
+# Please keep the last line with a '\' and keep the folowing empy line:
+# it helps when diffing and merging.
CT_STEPS := libc_check_config \
kernel_headers \
gmp \
@@ -19,20 +30,11 @@ CT_STEPS := libc_check_config \
tools \
debug \
+# Make the list available to sub-processes (scripts/crosstool.sh needs it)
export CT_STEPS
-$(CT_STEPS):
- $(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$@ STOP=$@ build
-
-$(patsubst %,+%,$(CT_STEPS)):
- $(SILENT)$(MAKE) -rf $(CT_NG) STOP=$(patsubst +%,%,$@) build
-
-$(patsubst %,%+,$(CT_STEPS)):
- $(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$(patsubst %+,%,$@) build
-
-help-build::
- @echo ' list-steps - List all build steps'
-
+# Print the steps list
+PHONY += list-steps
list-steps:
@echo 'Available build steps, in order:'
@for step in $(CT_STEPS); do \
@@ -41,3 +43,15 @@ list-steps:
@echo 'Use "<step>" as action to execute only that step.'
@echo 'Use "+<step>" as action to execute up to that step.'
@echo 'Use "<step>+" as action to execute from that step onward.'
+
+# ----------------------------------------------------------
+# This part deals with executing steps
+
+$(CT_STEPS):
+ $(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$@ STOP=$@ build
+
+$(patsubst %,+%,$(CT_STEPS)):
+ $(SILENT)$(MAKE) -rf $(CT_NG) STOP=$(patsubst +%,%,$@) build
+
+$(patsubst %,%+,$(CT_STEPS)):
+ $(SILENT)$(MAKE) -rf $(CT_NG) RESTART=$(patsubst %+,%,$@) build