Message info
 
To:Philip M. Gollucci From:Mel Flynn Subject:Re: FAQ on PORTREVISION bump? Date:Thu, 05 Apr 2012 23:14:41 +0200
 

On 4/5/2012 22:21, Philip M. Gollucci wrote:
> On 04/05/12 20:04, Michael Scheidell wrote:
>> on this one, I did. And was told by crees that I didn't need to wrap
>> PORTDOCS= around an ifdef.
>>
>> So, 2 programmers, 2 opinions. Thank God I didn't ask in ports@.
> Of the 2 of them one is right. At least as it is currently documented.
>
>

[snip bpm docs]

> in the case of NOPORTDOCS, no documentation files should be installed,
> so this variable should not be set. So you _must_ ifdef it.

Shouldn't confuse two cases:
1) A case where upstream software takes care of installing the
documentation. In this case you can set PORTDOCS without any need to
wrap it, because bpm already takes care of this:
.if !target(add-plist-docs)
add-plist-docs:
.if defined(PORTDOCS) && !defined(NOPORTDOCS)
# do the magic
.else
@${DO_NADA}
.endif

In this case you need to pass "--disable-docs" or something to that
effect to it's CONFIGURE_ARGS or whatever the upstream build system
requires for it. Simply wrapping NOPORTDOCS around PORTDOCS will not do
this for you. It's also possible you need to do reverse: if NOPORTDOCS
is not defined, pass --enable-docs.

2) The case where you "abuse" PORTDOCS to install the documentation
yourself in (pre|post|do)-install. In this case you shall not install
the documentation if NOPORTDOCS is set and thus either you wrap PORTDOCS
in NOPORTDOCS so that it's an empty variable and your loop in the
install target doesn't run, or you wrap the PORTDOCS related part in the
install target with NOPORTDOCS.
Wrapping the install target is IMHO the preferred option, since you will
also have to disable ${MKDIR} ${DOCSDIR} if you use that.

--
Mel
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscribe@freebsd.org"