我正在尝试创建一个Makefile,通过
如果我在我的 Makefile 中放入下面这样的内容:
tic
编译位于目录中的terminfo文件。tic
还会自动将它创建的termcap文件复制到系统或用户特定的目标文件夹中。对于普通用户,如果terminfo文件是例如screen-256color-bce-s.terminfo
,它将被编译并复制到~/.terminfo/s/screen-256color-bce-s
。因此,它看起来像这样:terminfo/screen-256color-bce-s.terminfo => /home/user/.terminfo/s/screen-256color-bce-s
terminfo/screen-256color-s.terminfo => /home/user/.terminfo/s/screen-256color-s
如果我在我的 Makefile 中放入下面这样的内容:
TISRC = $(wildcard terminfo/*.terminfo)
TIDST = $(foreach x, $(TISRC), $(HOME)/.terminfo/$(shell basename $x|cut -c 1)/$(shell basename $x .terminfo))
$(HOME)/.terminfo/s/%: terminfo/%.terminfo
@echo "$< => $@"
@tic $<
install: $(TIDST)
它可以工作。然而,我想要让它更通用,使用目标中的通配符,即:
$(HOME)/.terminfo/**/%: terminfo/%.terminfo
@echo "$< => $@"
@tic $<
我希望能够将terminfo文件添加到我的本地存储库。然而,上述方法并不奏效。如何在模式规则中指定通配符目录?