我读过这个问题:Makefile: $subst in dependency list,但我仍然无法让我的shell脚本正常工作。在多行makefile bash脚本中使用'subst'?
我有一个生成文件与内容的行:
#@[email protected]|test_create|Syntax: commoncmdsyntax test_create test_name=<test-name>
甲目标运行一个多bash脚本,其中,所述commoncmdsyntax
必须由含有单词和空格的字符串来代替。
在脚本中,我使用cut来指定变量desc
字符串Syntax: commoncmdsyntax test_create test_name=<test-name>
。
问题是$(subst commoncmdsyntax,new text,$$desc)
不能代替commoncmdsyntax
由new text
。
我试图用一个单词替换它,如XX
,但它也不起作用。
请编辑您的问题以显示'make -v'的输出。祝你好运。 – shellter 2014-09-18 17:56:44
'make -v'报告我正在使用'GNU Make 3.81' – canellas 2014-09-18 18:17:28
辅助扩展在make 3.81中可用。 – 2014-09-18 18:28:04