New /bin/sh based script to manage ports

Jeremy Messenger mezz7 at
Sat Jan 7 09:51:04 PST 2006

On Sat, 07 Jan 2006 03:50:41 -0600, KOMATSU Shinichiro  
<koma2 at> wrote:

> 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


# make -V PORTSDIR
# pwd

It doesn't work here. I am not sure why I would get empty unless I have  
Makefile or go in one of port directory.

> PORTSDIR is set in, which is not included
> if you do not explicitly include it by ".include <>".
> 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 <>' | make -f - -V PORTSDIR

Ah, that's a nice trick. Works great! Now I can add this in auto-plist[1].

# echo '.include <>' | make -f - -V PORTSDIR



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

mezz7 at  -  mezz at
FreeBSD GNOME Team  -  gnome at

More information about the freebsd-ports mailing list