Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 2006 11:51:58 -0600
From:      "Jeremy Messenger" <mezz7@cox.net>
To:        "KOMATSU Shinichiro" <koma2@lovepeers.org>
Cc:        Doug Barton <dougb@freebsd.org>, freebsd ports <freebsd-ports@freebsd.org>
Subject:   Re: New /bin/sh based script to manage ports
Message-ID:  <op.s20rwwrk9aq2h7@mezz.mezzweb.com>
In-Reply-To: <43BF8EF1.3000005@lovepeers.org>
References:  <43BCF31F.8050900@FreeBSD.org> <op.s2w24xlg9aq2h7@mezz.mezzweb.com> <43BF7F8D.6080809@FreeBSD.org> <20060107092614.GH79296@pcwin002.win.tue.nl> <43BF8EF1.3000005@lovepeers.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 07 Jan 2006 03:50:41 -0600, KOMATSU Shinichiro  
<koma2@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@tangaloor] </tmp> ls Makefile
>> ls: Makefile: No such file or directory
>> [stijn@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].

# 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@cox.net  -  mezz@FreeBSD.org
FreeBSD GNOME Team
http://www.FreeBSD.org/gnome/  -  gnome@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.s20rwwrk9aq2h7>