New /bin/sh based script to manage ports

KOMATSU Shinichiro koma2 at lovepeers.org
Sat Jan 7 01:50:59 PST 2006


Stijn Hoop wrote:
> On Sat, Jan 07, 2006 at 12:45:01AM -0800, Doug Barton wrote:
> 
>>However, the other two present a chicken and 
>>egg problem if I choose to use 'make -V' to get the values of these 
>>variables (where do I cd to?).
> 
> 
> Why do you need to cd?
> 
> [stijn at tangaloor] </tmp> ls Makefile
> ls: Makefile: No such file or directory
> [stijn at tangaloor] </tmp> make -V PORTSDIR
> /net/freebsd/ports

PORTSDIR is set in bsd.port.mk, which is not included
if you do not explicitly include it by ".include <bsd.port.mk>".
Don't you set it in /etc/make.conf or environment variable?

Recently I thought the same problem, and
the best solution I came up with till now is
running the following command:

    % echo '.include <bsd.port.mk>' | make -f - -V PORTSDIR

I will add this into portupgrade in later release
(after solving the MOVED problem...).


More information about the freebsd-ports mailing list