在端口目录外的 FreeBSD 端口上调用 make
Call make on a FreeBSD port outside the port's directory
可以在端口目录之外的 FreeBSD 端口上调用 make
吗? IE。不使用 cd
命令。
为了上下文化,虽然可以完成以下操作:cd /usr/ports/www/apache24 && sudo make config-recursive install distclean
,但最好使用类似这样的伪代码:sudo make config-recursive install distclean -p /usr/ports/www/apache24
谢谢
这就是 make
的 -C
option 的用途。
-C directory
Change to directory before reading the makefiles or doing any-
thing else. If multiple -C options are specified, each is inter-
preted relative to the previous one: -C / -C etc is equivalent to
-C /etc.
所以你想用这个:
make -C /usr/ports/www/apache24 config-recursive install distclean
可以在端口目录之外的 FreeBSD 端口上调用 make
吗? IE。不使用 cd
命令。
为了上下文化,虽然可以完成以下操作:cd /usr/ports/www/apache24 && sudo make config-recursive install distclean
,但最好使用类似这样的伪代码:sudo make config-recursive install distclean -p /usr/ports/www/apache24
谢谢
这就是 make
的 -C
option 的用途。
-C directory Change to directory before reading the makefiles or doing any- thing else. If multiple -C options are specified, each is inter- preted relative to the previous one: -C / -C etc is equivalent to -C /etc.
所以你想用这个:
make -C /usr/ports/www/apache24 config-recursive install distclean