How to get a shell environment variable in a makefile?

后端 未结 3 654
悲哀的现实
悲哀的现实 2020-12-12 21:40

In shell when I enter

echo $demoPath

it prints

/usr/local/demo

How can I get the value of this variable <

3条回答
  •  遥遥无期
    2020-12-12 22:16

    all:
        echo ${PATH}
    

    Or change PATH just for one command:

    all:
        PATH=/my/path:${PATH} cmd
    

提交回复
热议问题