Fix the MASTERDIR/slave example with an actually existing port.
PR: 212937 Reported by: zzdudcjfzz hotmail com Sponsored by: Absolight, The FreeBSD Foundation
This commit is contained in:
parent
ef439cb97e
commit
9c11ffbc86
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50636
1 changed files with 26 additions and 21 deletions
|
@ -5467,48 +5467,53 @@ BAR_LIB_DEPENDS= libbar.so:foo/bar</programlisting>
|
|||
so the packages will have different names.</para>
|
||||
|
||||
<para>This will be best demonstrated by an example. This is part
|
||||
of <filename>japanese/xdvi300/Makefile</filename>;</para>
|
||||
of <filename>print/pkfonts300/Makefile</filename>;</para>
|
||||
|
||||
<programlisting>PORTNAME= xdvi
|
||||
DISTVERSION= 17
|
||||
PKGNAMEPREFIX= ja-
|
||||
PKGNAMESUFFIX= ${RESOLUTION}
|
||||
<programlisting>PORTNAME= pkfonts${RESOLUTION}
|
||||
PORTVERSION= 1.0
|
||||
DISTFILES= pk${RESOLUTION}.tar.gz
|
||||
|
||||
# default
|
||||
RESOLUTION?= 300
|
||||
PLIST= ${PKGDIR}/pkg-plist.${RESOLUTION}
|
||||
|
||||
.if !defined(RESOLUTION)
|
||||
RESOLUTION= 300
|
||||
.else
|
||||
.if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
|
||||
${RESOLUTION} != 300 && ${RESOLUTION} != 400
|
||||
pre-everything::
|
||||
${RESOLUTION} != 300 && ${RESOLUTION} != 360 && \
|
||||
${RESOLUTION} != 400 && ${RESOLUTION} != 600
|
||||
.BEGIN:
|
||||
@${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
|
||||
@${ECHO_MSG} "Possible values are: 118, 240, 300 (default) and 400."
|
||||
@${ECHO_MSG} "Possible values are: 118, 240, 300, 360, 400 and 600."
|
||||
@${FALSE}
|
||||
.endif
|
||||
.endif</programlisting>
|
||||
|
||||
<para><package role="port">japanese/xdvi300</package> also has all
|
||||
<para><package role="port">print/pkfonts300</package> also has all
|
||||
the regular patches, package files, etc. Running
|
||||
<command>make</command> there, it will take the default value
|
||||
for the resolution (300) and build the port normally.</para>
|
||||
|
||||
<para>As for other resolutions, this is the
|
||||
<emphasis>entire</emphasis>
|
||||
<filename>xdvi118/Makefile</filename>:</para>
|
||||
<filename>print/pkfonts360/Makefile</filename>:</para>
|
||||
|
||||
<programlisting>RESOLUTION= 118
|
||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
||||
<programlisting>RESOLUTION= 360
|
||||
MASTERDIR= ${.CURDIR}/../pkfonts300
|
||||
|
||||
.include "${MASTERDIR}/Makefile"</programlisting>
|
||||
.include "${MASTERDIR}/Makefile"</programlisting>
|
||||
|
||||
<para>(<filename>xdvi240/Makefile</filename> and
|
||||
<filename>xdvi400/Makefile</filename> are similar).
|
||||
<para>(<filename>print/pkfonts118/Makefile</filename>,
|
||||
<filename>print/pkfonts600/Makefile</filename>, and all the
|
||||
other are similar).
|
||||
<varname>MASTERDIR</varname> definition tells
|
||||
<filename>bsd.port.mk</filename> that the regular set of
|
||||
subdirectories like <varname>FILESDIR</varname> and
|
||||
<varname>SCRIPTDIR</varname> are to be found under
|
||||
<filename>xdvi300</filename>. The
|
||||
<literal>RESOLUTION=118</literal> line will override the
|
||||
<filename>pkfonts300</filename>. The
|
||||
<literal>RESOLUTION=360</literal> line will override the
|
||||
<literal>RESOLUTION=300</literal> line in
|
||||
<filename>xdvi300/Makefile</filename> and the port will be built
|
||||
with resolution set to 118.</para>
|
||||
<filename>pkfonts300/Makefile</filename> and the port will be
|
||||
built with resolution set to 360.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="makefile-manpages">
|
||||
|
|
Loading…
Reference in a new issue