我正在尝试从6
中名为~/Downloads/GGG/some_file.6.txt
的文件中提取makefile
。我离得很近,并且设法得到.6
,但是我似乎无法摆脱点.
而只得到6
。这是我的makefile:
FILE = ~/Downloads/GGG/some_file.6.txt
another_file.txt: ${FILE}
@echo $<
@echo $(suffix $(basename $<))
@cp $< $@
这是结果:
$ make
/home/oren/Downloads/GGG/some_file.6.txt
.6
我如何摆脱点?
答案 0 :(得分:1)
您可以尝试:
@echo $(patsubst .%,%,$(suffix $(basename $<)))