mirror of
https://github.com/linuxboot/heads.git
synced 2024-12-19 21:17:55 +00:00
Walkaround envvars passed through make(1) when generating etc/config
"export" statements included or declared in a Makefile proves literally (with no escape) passed to the shell, which may result in shell envvars containing literal double quote if SHELL is set as bash, and they further becomes statements containing `\"` when printed with command export. This behavior could be observed by the makefile inlined at the end. This commit adds a regexp to sed to remove those `\"`. export QUOTE="QUOTE" SHELL := /bin/bash .SHELLFLAGS := -o pipefail -c export-quote: export|grep QUOTE
This commit is contained in:
parent
149635ef95
commit
4e758b8bfb
3
Makefile
3
Makefile
@ -426,7 +426,8 @@ $(build)/$(BOARD)/tools.cpio: \
|
|||||||
mkdir -p "$(initrd_dir)/etc" ; \
|
mkdir -p "$(initrd_dir)/etc" ; \
|
||||||
export \
|
export \
|
||||||
| grep ' CONFIG_' \
|
| grep ' CONFIG_' \
|
||||||
| sed 's/^declare -x /export /' \
|
| sed -e 's/^declare -x /export /' \
|
||||||
|
-e 's/\\\"//g' \
|
||||||
> "$(initrd_dir)/etc/config" \
|
> "$(initrd_dir)/etc/config" \
|
||||||
)
|
)
|
||||||
$(call do-cpio,$@,$(initrd_dir))
|
$(call do-cpio,$@,$(initrd_dir))
|
||||||
|
Loading…
Reference in New Issue
Block a user