Newbie: problem using SUB_LIST in Makefile - SOLVED

Rainer Schwarze rsc at admadic.de
Fri Nov 23 06:30:10 PST 2007


Dmitry Marakasov wrote:
> * Rainer Schwarze (rsc at admadic.de) wrote:
>> 1) What could be the reason that even XWRAPPER is not handled when the
>> replacement is performed?
> On my system similar stuff works without problems. First check all
[...]

I found the problem: The Makefile which I am working on uses SUB_LIST
either not at all or incorrectly. There is a target pre-configure which
contains an operation for manual replacement of the variables in
pkg-install.in :

pre-configure:
[...]
@${SED} -e 's,%%SPOOLDIR%%,${SPOOLDIR},g; s,%%QS_USER%%,${QS_USER},g; \
s,%%QS_ID%%,${QS_ID},g' ${FILESDIR}/pkg-install.in > ${PKGINSTALL}

So I know how to proceed...

>> 2) Is my approach of adding entries to SUB_LIST based on
>> WITH_.../WITHOUT_... correct? (Or is that impossible after including
>> bsd.port.pre.mk? As far as I understand, the WITH_.../WITHOUT_... are
>> available only after bsd.port.[*.]mk is included...?)
> Pretty correct. Actually, in generic case it _should_ be done after
> pre.mk, becausee options are often used (btw, you should think of
> using OPTIONS too):
> 
> ...
> OPTIONS=	CWRAPPER	"Use C wrapper" on

You have the powers of a seer :-)
This is what I was appending to OPTIONS:
CWRAPPER "use C wrapper (no suid perl script needed)" on

> .include <bsd.port.pre.mk>
>  
> .if !defined(WITHOUT_CWRAPPER)

Just a newbie question: Is there a reason to use !defined(WITHOUT_...)
instead of defined(WITH_...) ?

Thanks and best wishes, Rainer
-- 


More information about the freebsd-ports mailing list