Newbie: problem using SUB_LIST in Makefile

Dmitry Marakasov amdmi3 at amdmi3.ru
Thu Nov 22 17:28:03 PST 2007


* 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
variable names in both SUB_LIST and *.in (i.e. WRAPER or something
like that, seems to be copypaste problem of 2 vars). If it doesn't
help try to simplify the makefile until the case is fixed (i.e.
leave only XWRAPPER in SUB_LIST, set all substitude vars manually
to something simple like test e.t.c. Watch for spaces or quotes in
variables (though those are unlikely).

> 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

.include <bsd.port.pre.mk>
 
.if !defined(WITHOUT_CWRAPPER)
SUB_LIST+=      CWRAPPER=yes
.else
SUB_LIST+=      CWRAPPER=no
.endif
...

-- 
Dmitry A. Marakasov    | jabber: amdmi3 at jabber.ru
amdmi3 at amdmi3.ru       | http://www.amdmi3.ru


More information about the freebsd-ports mailing list