【发布时间】:2012-06-29 21:11:33
【问题描述】:
我正在为我的应用程序开发 Portfile,但在 destroot 阶段遇到了问题。根据MacPorts guide,destroot阶段执行如下命令:
make install DESTDIR=${destroot}
我想我可能误解了它应该如何在 Makefile 中工作。我的应用很简单,安装规则只需要复制几个目录到DESTDIR,所以指定如下:
install:
cp -R bin $(DESTDIR)/bin
cp -R lib $(DESTDIR)/lib
cp -R cfg $(DESTDIR)/cfg
但是,当我尝试对我的应用程序进行 MacPort 安装时,我收到以下警告:
---> Staging test into destroot
Warning: violation by /bin
Warning: violation by /lib
Warning: violation by /cfg
Warning: test violates the layout of the ports-filesystems!
我该如何解决这个问题?我是否误解了 DESTDIR 变量在安装规则中的使用方式或完全遗漏了什么?
【问题讨论】:
标签: makefile installation macports