summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-04-24 12:17:27 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2012-04-25 11:28:35 +0200
commit1c8195944a253d3eab0fd2d022cc64dd62c04390 (patch)
tree5d83ad7bc1f06d553c595c279816eb54d9a23dc8 /solenv
parentad1e87507fb0df59c91b17f43002eb8eb44feecc (diff)
add showmodules target to gbuild
Diffstat (limited to 'solenv')
-rw-r--r--solenv/gbuild/Module.mk8
-rw-r--r--solenv/gbuild/gbuild.help.txt1
2 files changed, 8 insertions, 1 deletions
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 4d559162c688..e75444f88d6e 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -89,7 +89,7 @@ $(call gb_Module_get_target,%) :
mkdir -p $(dir $@) && \
touch $@)
-.PHONY : build all clean unitcheck slowcheck subsequentcheck dev-install
+.PHONY : build all clean unitcheck slowcheck subsequentcheck dev-install showmodules
.DEFAULT_GOAL := all
ifeq ($(strip $(gb_PARTIALBUILD)),)
@@ -174,6 +174,10 @@ dev-install :
ln -s $(DEVINSTALLDIR)/opt/ $(SRCDIR)/install
$(info $(gb_Module_DEVINSTALLHINT))
+showmodules :
+ $(info $(strip $(gb_Module_ALLMODULES)))
+ @true
+
define gb_Module_Module
gb_Module_ALLMODULES += $(1)
gb_Module_MODULELOCATIONS += $(1):$(dir $(realpath $(lastword $(MAKEFILE_LIST))))
@@ -206,6 +210,7 @@ endif
endef
+ifneq (showmodules,$(MAKECMDGOALS))
define gb_Module_add_target
$(call gb_Module__read_targetfile,$(1),$(2),target)
@@ -237,6 +242,7 @@ $(call gb_Module_get_subsequentcheck_target,$(1)) : $$(gb_Module_CURRENTTARGET)
$(call gb_Module_get_clean_target,$(1)) : $$(gb_Module_CURRENTCLEANTARGET)
endef
+endif
define gb_Module_add_moduledir
include $(patsubst $(1):%,%,$(filter $(1):%,$(gb_Module_MODULELOCATIONS)))/$(2)/Module_$(2).mk
diff --git a/solenv/gbuild/gbuild.help.txt b/solenv/gbuild/gbuild.help.txt
index 6506022934e7..8ec1539f8214 100644
--- a/solenv/gbuild/gbuild.help.txt
+++ b/solenv/gbuild/gbuild.help.txt
@@ -35,6 +35,7 @@ AVAILABLE TARGETS
check run unit tests and if in toplevel subsequentcheck
clean remove all generated files
showdeliverables show the targets delivered to OUTDIR and their source
+ showmodules show the modules that would be loaded
debugrun starts the dev-install instance and allows tests to be run
against it
<module> build the named module