avoid breaking on targets with special chars

This commit is contained in:
Lance Vick 2023-10-13 05:04:57 -07:00
parent 10767638ca
commit 00ce00c246
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 4 additions and 3 deletions

View File

@ -96,7 +96,7 @@ define toolchain-profile-untracked
endef
define toolchain-profile-start
printf "%s,$(call epochms),\n" "$@" >> $(TOOLCHAIN_PROFILE_FILE);
printf "%s,$(call epochms),\n" "$@" >> "$(TOOLCHAIN_PROFILE_FILE)"
endef
define toolchain-profile-stop
@ -104,9 +104,10 @@ define toolchain-profile-stop
&& cp $(TOOLCHAIN_PROFILE_FILE) $$tmpfile \
&& awk \
-v ms="$(call epochms)" \
'/^$(@),/ {$$0=$$0ms} 1' \
-v target="$(@)" \
'$$1 ~ "^" target {$$0=$$0ms} 1' \
$$tmpfile \
> $(TOOLCHAIN_PROFILE_FILE)
> "$(TOOLCHAIN_PROFILE_FILE)"
endef
export