windows - Accessing environment variables from within a recipe in GNU make in windwos -
i trying set environment variable in windows , access same within recipe windows make. general code goes this:
$(foreach i, $(shortcut_targets), $(eval $(call build_artifact,$(i),$(param1),$(param2)))) define build_artifact rule: prerequisites @echo building : $(1) $(if $(filter $(1),string), ,setx last $(1) ) $(if $(filter $(1),string),\ @echo path-%last%,\ @echo path-$(1) endef
when run this, setx command executed successfully, giving output "success: specified value saved." output of echo path-%last% opposed output environment variable replaced in. have tried cmd , powershell , i've gotten same output in both cases. have tried replacing setx set , export, neither approaches produced positive result.
Comments
Post a Comment