Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Apr 2012 23:14:41 +0200
From:      Mel Flynn <rflynn@acsalaska.net>
To:        "Philip M. Gollucci" <pgollucci@gmail.com>
Cc:        Michael Scheidell <scheidell@freebsd.org>, freebsd-ports@freebsd.org
Subject:   Re: FAQ on PORTREVISION bump?
Message-ID:  <4F7E0B41.4030201@acsalaska.net>
In-Reply-To: <4F7DFEBC.1090305@p6m7g8.com>
References:  <4F732C89.3040804@FreeBSD.org>	<CADLo838kts0QhA1Rvf=S-GCZK2quyfmUdJHUqn6J2-31F9aWXQ@mail.gmail.com>	<4F733432.4020902@FreeBSD.org>	<63ca1b333a310ecc2b1d1f0e1e1542a1.squirrel@mail.experts-exchange.com>	<4F7338C3.8020003@p6m7g8.com> <4F733C3A.7020004@missouri.edu>	<4F734524.2000400@p6m7g8.com> <4F735340.1020103@FreeBSD.org>	<4F7379FD.9040802@p6m7g8.com>	<20120329200243.GA76833@server.vk2pj.dyndns.org>	<20120330131625.GA30070@atarininja.org>	<4F75F3ED.9000508@p6m7g8.com> <4F75FA31.2030806@p6m7g8.com> <4F760FB3.6020708@FreeBSD.org> <4F761921.7030505@p6m7g8.com> <4F7DFAC9.1080806@FreeBSD.org> <4F7DFEBC.1090305@p6m7g8.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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