How to print out a variable in makefile

后端 未结 15 1071
臣服心动
臣服心动 2020-12-07 06:51

In my makefile, I have a variable \'NDK_PROJECT_PATH\', my question is how can I print it out when it compiles?

I read Make file echo displaying "$PATH" st

15条回答
  •  庸人自扰
    2020-12-07 07:39

    All versions of make require that command lines be indented with a TAB (not space) as the first character in the line. If you showed us the entire rule instead of just the two lines in question we could give a clearer answer, but it should be something like:

    myTarget: myDependencies
            @echo hi
    

    where the first character in the second line must be TAB.

提交回复
热议问题