Exporting environment variables to Makefile shell

后端 未结 5 1488
梦毁少年i
梦毁少年i 2021-01-04 18:01

I want to do immediate expansion of a shell command within a Makefile, but I want the shell command to have access to the environment variables within the Makefile. If I us

5条回答
  •  甜味超标
    2021-01-04 18:25

    Here you go:

    export FOO=bar

    Here's a page with a lot more info: http://www.cmcrossroads.com/article/basics-getting-environment-variables-gnu-make?page=0%2C1

提交回复
热议问题