@@ -829,7 +829,18 @@ endif
.PHONY: $(BASE_DIR)/build/.services.in
$(BASE_DIR)/build/.services.in:
- @touch $(@)
+ @{ \
+ printf 'menu "Services to enable"\n\n'; \
+ $(foreach pkg,$(sort $(PACKAGES_WITH_SERVICES)),\
+ printf 'if BR2_PACKAGE_$(call UPPERCASE,$(pkg))\n\n'; \
+ printf 'comment "$(pkg) services"\n\n'; \
+ $(foreach srv,$($(call UPPERCASE,$(pkg))_SERVICES), \
+ printf 'config BR2_PACKAGE_$(call UPPERCASE,$(pkg))_SRV_$(call UPPERCASE,$(srv))\n'; \
+ printf '\tbool "$(srv)"\n\n'; \
+ )\
+ printf 'endif\n\n';) \
+ printf 'endmenu\n'; \
+ } >$(@)
# printvars prints all the variables currently defined in our Makefiles
printvars:
@@ -478,6 +478,11 @@ $(2)_POST_INSTALL_IMAGES_HOOKS ?=
$(2)_PRE_LEGAL_INFO_HOOKS ?=
$(2)_POST_LEGAL_INFO_HOOKS ?=
+# Services to enable/disable
+ifneq ($$($(2)_SERVICES),)
+PACKAGES_WITH_SERVICES += $(1)
+endif
+
# human-friendly targets and target sequencing
$(1): $(1)-install
For each declared service, generate an entry in the services sub-menu. This is a no-op for now: nothing is made of the enabled/disabled services; also, no package defines services yes. Both will come in later patches. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> --- Makefile | 13 ++++++++++++- package/pkg-generic.mk | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-)