Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mkimage-profiles
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
mkimage-profiles
Commits
e36792ac
Commit
e36792ac
authored
Jun 26, 2012
by
Michael Shigorin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lib/functions.mk: initial xport()
A few too many downstream makefiles employed the pattern of "export GLOBAL_VAR := $(VAR)"; macroize that.
parent
fcf41f22
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
3 deletions
+11
-3
config.mk
features.in/build-vm/config.mk
+1
-0
config.mk
features.in/cleanup/config.mk
+1
-0
config.mk
features.in/install2/config.mk
+1
-0
stage2cfg.mk
features.in/install2/install2/stage2cfg.mk
+0
-3
functions.mk
lib/functions.mk
+8
-0
No files found.
features.in/build-vm/config.mk
View file @
e36792ac
# hooked from ../../lib/sugar.mk
use/build-vm:
@$(call add_feature)
@$(call xport,ROOTPW)
features.in/cleanup/config.mk
View file @
e36792ac
use/cleanup:
@$(call add_feature)
@$(call xport,CLEANUP_PACKAGES)
use/cleanup/installer: use/cleanup
@$(call add,CLEANUP_PACKAGES,'installer-*')
...
...
features.in/install2/config.mk
View file @
e36792ac
...
...
@@ -5,6 +5,7 @@ use/install2: use/stage2 sub/stage2/install2 use/metadata use/cleanup/installer
@$(call add,INSTALL2_PACKAGES,branding-$$(BRANDING)-alterator)
@$(call add,BASE_PACKAGES,branding-$$(BRANDING)-release)
@$(call add,BASE_LISTS,$(call tags,basesystem))
@$(call xport,BASE_BOOTLOADER)
use/install2/net: use/install2
@$(call add,INSTALL2_PACKAGES,curl)
...
...
features.in/install2/install2/stage2cfg.mk
View file @
e36792ac
...
...
@@ -8,9 +8,6 @@ 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)"
...
...
lib/functions.mk
View file @
e36792ac
...
...
@@ -36,6 +36,14 @@ define try_body
printf '%s ?= %s\n' '$(1)' '$(2)' >> "$(CONFIG)"; }
endef
# xport() requests a variable to be exported to the scripts
xport = $(and $(1),$(xport_body))
define xport_body
{ $(log_body); \
v='$(1:GLOBAL_%=%)'; \
printf 'export GLOBAL_%s = $$(%s)\n' "$$v" "$$v" >> "$(CONFIG)"; }
endef
# if the rule being executed isn't logged yet, log it
define log_body
{ [ -s "$(CONFIG)" ] && \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment