本文介绍了在makefile中转义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
M_ARCH:= $(shell g ++ - dumpmachine | awk'{split($ 1,a, - ); print a [1]}')
你知道为什么吗我想它与逃避有关,但是什么和在哪里?
解决方案
这是美元符号,在makefile中你会有键入 $$
以获取单个美元符号:
M_ARCH: = $(shell g ++ -dumpmachine | awk'{split($$ 1,a, - ); print a [1]}')
I'm trying to do this in a makefile and it fails horribly:
M_ARCH := $(shell g++ -dumpmachine | awk '{split($1,a,"-");print a[1]}')
do you know why? I guess it has to do with escaping, but what and where?
解决方案
It's the dollar sign, in makefiles you'll have to type $$
to get a single dollar sign:
M_ARCH := $(shell g++ -dumpmachine | awk '{split($$1,a,"-");print a[1]}')
这篇关于在makefile中转义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!