Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Feb 2011 11:11:54 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Michael Scheidell <michael.scheidell@secnap.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: how to bootstrap libtool?
Message-ID:  <7CA2236E-503C-4456-9516-DD7806FDDF9E@mac.com>
In-Reply-To: <4D52DE76.2050208@secnap.com>
References:  <4D52D798.5020204@secnap.com> <C7CE8A43-E22F-4F03-8C29-E08F8A2A40BB@mac.com> <4D52DE76.2050208@secnap.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 9, 2011, at 10:35 AM, Michael Scheidell wrote:
> On 2/9/11 1:32 PM, Chuck Swiger wrote:
>> You should list libnet11 as both BUILD_DEPENDS and RUN_DEPENDS, likely...
> 
> I do.
> 
> didn't help (specifically referring to the new 2.9.0.3 security/snort port)
> 
> I THINK this cludge helped: but I am not happy with it.  not sure I understand portlint complaints about !=, or if there is/was a better way.


Running portlint shows both the issue and an URL for the recommended approach:

# cd /usr/ports/security/snort ; portlint
/usr/local/bin/libnet11-config: not found
"Makefile", line 63: warning: "/usr/local/bin/libnet11-config --cflags" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 64: warning: "/usr/local/bin/libnet11-config --libs" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 63: warning: "/usr/local/bin/libnet11-config --cflags" returned non-zero status
/usr/local/bin/libnet11-config: not found
"Makefile", line 64: warning: "/usr/local/bin/libnet11-config --libs" returned non-zero status
WARN: Makefile: [63]: use of != in assignments is almost never a good thing to do.  Try to avoid using them.  See http://lists.freebsd.org/pipermail/freebsd-ports/2008-July/049777.html for some helpful hints on what to do instead.
WARN: Makefile: possible use of absolute pathname "/var/log/snort".
0 fatal errors and 2 warnings found.

The problem with != is that is is evaluated in a subshell regardless of whether the results are needed, and it happens while the Makefile is first being read, before it tries to figure out which targets need to be processed.  This is why setting libnet in BUILD_DEPENDS isn't being processed until after these commands are run (or fail to run, as above).

GNU Make refers to the distinction as "immediate" vs. "deferred", and you want to use the latter where possible.

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7CA2236E-503C-4456-9516-DD7806FDDF9E>