Commit 5d37a0c5 authored by Michael Shigorin's avatar Michael Shigorin

avoid setting GLOBAL_* altogether

Applying set() and only set() to a GLOBAL_* is safe but still a potentially confusing example; so let's just do it right (and warn unsuspecting folks too).
parent 75fd7952
......@@ -3,7 +3,7 @@
# - remember .base if adding yet another *_PACKAGES
use/bootloader: use/install2 sub/main
@$(call add,BASE_PACKAGES,alterator-$$(GLOBAL_BASE_BOOTLOADER))
@$(call add,BASE_PACKAGES,alterator-$$(BASE_BOOTLOADER))
use/bootloader/grub use/bootloader/lilo: use/bootloader/%: use/bootloader
@$(call set,GLOBAL_BASE_BOOTLOADER,$*)
@$(call set,BASE_BOOTLOADER,$*)
......@@ -8,6 +8,9 @@ MKI_PACK_RESULTS = squash:altinst
# also removed in a cleanup hook but to spare a few cycles...
HSH_EXCLUDE_DOCS = 1
# pass downstream
GLOBAL_BASE_BOOTLOADER := $(BASE_BOOTLOADER)
debug:
@echo "** install2: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
@echo "** install2: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"
......
......@@ -15,6 +15,7 @@ endef
# add() just appends an additive rule...
add = $(and $(1),$(2),$(add_body))
define add_body
$(if $(filter GLOBAL_% INFO_%,$(1)),$(warning add,$(1) might be a problem)) \
{ $(log_body); \
printf '%s += %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
endef
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment