New /bin/sh based script to manage ports

Jeremy Messenger mezz7 at cox.net
Sat Jan 7 10:15:30 PST 2006


On Sat, 07 Jan 2006 11:51:58 -0600, Jeremy Messenger <mezz7 at cox.net> wrote:

> On Sat, 07 Jan 2006 03:50:41 -0600, KOMATSU Shinichiro  
> <koma2 at lovepeers.org> 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
>
> Here:
>
> # make -V PORTSDIR
> [...empty...]
> # pwd
> /root
>
> 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 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
>
> Ah, that's a nice trick. Works great! Now I can add this in  
> auto-plist[1].

Nah, auto-plist doesn't need this because it will always run in port  
directory....I am sleepy head as I just woke up. ;-) Anyway, I am keeping  
it in my trick&tip file.

Cheers,
Mezz

> # echo '.include <bsd.port.mk>' | make -f - -V PORTSDIR
> /usr/ports
>
> [1]  
> http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/portstools/auto-plist/
>
> Cheers,
> Mezz
>
>> I will add this into portupgrade in later release
>> (after solving the MOVED problem...).


-- 
mezz7 at cox.net  -  mezz at FreeBSD.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/  -  gnome at FreeBSD.org


More information about the freebsd-ports mailing list