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>
|
so the packages will have different names.</para>
|
||||||
|
|
||||||
<para>This will be best demonstrated by an example. This is part
|
<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
|
<programlisting>PORTNAME= pkfonts${RESOLUTION}
|
||||||
DISTVERSION= 17
|
PORTVERSION= 1.0
|
||||||
PKGNAMEPREFIX= ja-
|
DISTFILES= pk${RESOLUTION}.tar.gz
|
||||||
PKGNAMESUFFIX= ${RESOLUTION}
|
|
||||||
|
|
||||||
# default
|
PLIST= ${PKGDIR}/pkg-plist.${RESOLUTION}
|
||||||
RESOLUTION?= 300
|
|
||||||
|
.if !defined(RESOLUTION)
|
||||||
|
RESOLUTION= 300
|
||||||
|
.else
|
||||||
.if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
|
.if ${RESOLUTION} != 118 && ${RESOLUTION} != 240 && \
|
||||||
${RESOLUTION} != 300 && ${RESOLUTION} != 400
|
${RESOLUTION} != 300 && ${RESOLUTION} != 360 && \
|
||||||
pre-everything::
|
${RESOLUTION} != 400 && ${RESOLUTION} != 600
|
||||||
|
.BEGIN:
|
||||||
@${ECHO_MSG} "Error: invalid value for RESOLUTION: \"${RESOLUTION}\""
|
@${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}
|
@${FALSE}
|
||||||
|
.endif
|
||||||
.endif</programlisting>
|
.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
|
the regular patches, package files, etc. Running
|
||||||
<command>make</command> there, it will take the default value
|
<command>make</command> there, it will take the default value
|
||||||
for the resolution (300) and build the port normally.</para>
|
for the resolution (300) and build the port normally.</para>
|
||||||
|
|
||||||
<para>As for other resolutions, this is the
|
<para>As for other resolutions, this is the
|
||||||
<emphasis>entire</emphasis>
|
<emphasis>entire</emphasis>
|
||||||
<filename>xdvi118/Makefile</filename>:</para>
|
<filename>print/pkfonts360/Makefile</filename>:</para>
|
||||||
|
|
||||||
<programlisting>RESOLUTION= 118
|
<programlisting>RESOLUTION= 360
|
||||||
MASTERDIR= ${.CURDIR}/../xdvi300
|
MASTERDIR= ${.CURDIR}/../pkfonts300
|
||||||
|
|
||||||
.include "${MASTERDIR}/Makefile"</programlisting>
|
.include "${MASTERDIR}/Makefile"</programlisting>
|
||||||
|
|
||||||
<para>(<filename>xdvi240/Makefile</filename> and
|
<para>(<filename>print/pkfonts118/Makefile</filename>,
|
||||||
<filename>xdvi400/Makefile</filename> are similar).
|
<filename>print/pkfonts600/Makefile</filename>, and all the
|
||||||
|
other are similar).
|
||||||
<varname>MASTERDIR</varname> definition tells
|
<varname>MASTERDIR</varname> definition tells
|
||||||
<filename>bsd.port.mk</filename> that the regular set of
|
<filename>bsd.port.mk</filename> that the regular set of
|
||||||
subdirectories like <varname>FILESDIR</varname> and
|
subdirectories like <varname>FILESDIR</varname> and
|
||||||
<varname>SCRIPTDIR</varname> are to be found under
|
<varname>SCRIPTDIR</varname> are to be found under
|
||||||
<filename>xdvi300</filename>. The
|
<filename>pkfonts300</filename>. The
|
||||||
<literal>RESOLUTION=118</literal> line will override the
|
<literal>RESOLUTION=360</literal> line will override the
|
||||||
<literal>RESOLUTION=300</literal> line in
|
<literal>RESOLUTION=300</literal> line in
|
||||||
<filename>xdvi300/Makefile</filename> and the port will be built
|
<filename>pkfonts300/Makefile</filename> and the port will be
|
||||||
with resolution set to 118.</para>
|
built with resolution set to 360.</para>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
|
||||||
<sect1 xml:id="makefile-manpages">
|
<sect1 xml:id="makefile-manpages">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue