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).
This commit is contained in:
parent
75fd795210
commit
5d37a0c54d
@ -3,7 +3,7 @@
|
|||||||
# - remember .base if adding yet another *_PACKAGES
|
# - remember .base if adding yet another *_PACKAGES
|
||||||
|
|
||||||
use/bootloader: use/install2 sub/main
|
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
|
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...
|
# also removed in a cleanup hook but to spare a few cycles...
|
||||||
HSH_EXCLUDE_DOCS = 1
|
HSH_EXCLUDE_DOCS = 1
|
||||||
|
|
||||||
|
# pass downstream
|
||||||
|
GLOBAL_BASE_BOOTLOADER := $(BASE_BOOTLOADER)
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
@echo "** install2: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
|
@echo "** install2: IMAGE_PACKAGES: $(IMAGE_PACKAGES)"
|
||||||
@echo "** install2: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"
|
@echo "** install2: IMAGE_PACKAGES_REGEXP: $(IMAGE_PACKAGES_REGEXP)"
|
||||||
|
@ -15,6 +15,7 @@ endef
|
|||||||
# add() just appends an additive rule...
|
# add() just appends an additive rule...
|
||||||
add = $(and $(1),$(2),$(add_body))
|
add = $(and $(1),$(2),$(add_body))
|
||||||
define add_body
|
define add_body
|
||||||
|
$(if $(filter GLOBAL_% INFO_%,$(1)),$(warning add,$(1) might be a problem)) \
|
||||||
{ $(log_body); \
|
{ $(log_body); \
|
||||||
printf '%s += %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
|
printf '%s += %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
|
||||||
endef
|
endef
|
||||||
|
Loading…
Reference in New Issue
Block a user