<emphasis remap=..>...</emphasis> -> <maketarget>...</maketarget>
This commit is contained in:
parent
e1b4ca8f64
commit
94c41b401a
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=3323
4 changed files with 83 additions and 120 deletions
|
@ -317,3 +317,5 @@ for example,
|
|||
|
||||
26. <emphasis remap=..>...</emphasis> -> <makevar>...</makevar>
|
||||
|
||||
27. <emphasis remap=..>...</emphasis> -> <maketarget>...</maketarget>
|
||||
|
||||
|
|
|
@ -26341,18 +26341,15 @@
|
|||
</para>
|
||||
|
||||
<para>The above are the default actions. In addition, you can
|
||||
define targets <emphasis
|
||||
remap=tt>pre-<something></emphasis> or <emphasis
|
||||
remap=tt>post-<something></emphasis>, or put scripts
|
||||
define targets <maketarget>pre-<something></maketarget> or <maketarget>post-<something></maketarget>, or put scripts
|
||||
with those names, in the <filename>scripts</filename>
|
||||
subdirectory, and they will be run before or after the default
|
||||
actions are done.</para>
|
||||
|
||||
<para>For example, if you have a <emphasis
|
||||
remap=tt>post-extract</emphasis> target defined in your
|
||||
<para>For example, if you have a <maketarget>post-extract</maketarget> target defined in your
|
||||
Makefile, and a file <filename>pre-build</filename> in the
|
||||
<filename remap="tt">scripts</filename> subdirectory, the
|
||||
<emphasis remap=tt>post-extract</emphasis> target will be
|
||||
<maketarget>post-extract</maketarget> target will be
|
||||
called after the regular extraction actions, and the
|
||||
<filename>pre-build</filename> script will be executed before
|
||||
the default build rules are done. It is recommended that you
|
||||
|
@ -26361,23 +26358,19 @@
|
|||
out what kind of non-default action the port requires.</para>
|
||||
|
||||
<para>The default actions are done by the
|
||||
<filename>bsd.port.mk</filename> targets <emphasis
|
||||
remap=tt>do-<something></emphasis>. For example, the
|
||||
commands to extract a port are in the target <emphasis
|
||||
remap=tt>do-extract</emphasis>. If you are not happy with
|
||||
<filename>bsd.port.mk</filename> targets <maketarget>do-<something></maketarget>. For example, the
|
||||
commands to extract a port are in the target <maketarget>do-extract</maketarget>. If you are not happy with
|
||||
the default target, you can fix it by redefining the
|
||||
<emphasis remap=tt>do-<something></emphasis> target in
|
||||
<maketarget>do-<something></maketarget> target in
|
||||
your Makefile.</para>
|
||||
|
||||
<note>
|
||||
<para>The `main' targets (e.g., <emphasis
|
||||
remap=tt>extract</emphasis>, <emphasis
|
||||
remap=tt>configure</emphasis>, etc.) do nothing more than
|
||||
<para>The `main' targets (e.g., <maketarget>extract</maketarget>, <maketarget>configure</maketarget>, etc.) do nothing more than
|
||||
make sure all the stages up to that one is completed and
|
||||
call the real targets or scripts, and they are not intended
|
||||
to be changed. If you want to fix the extraction, fix
|
||||
<emphasis remap=tt>do-extract</emphasis>, but never ever
|
||||
touch <emphasis remap=tt>extract</emphasis>!</para>
|
||||
<maketarget>do-extract</maketarget>, but never ever
|
||||
touch <maketarget>extract</maketarget>!</para>
|
||||
</note>
|
||||
|
||||
<para>Now that you understand what goes on when the user types
|
||||
|
@ -26520,7 +26513,7 @@
|
|||
gzip.)</para>
|
||||
|
||||
<para>In the worst case, you can simply create your own
|
||||
<emphasis remap=tt>do-extract</emphasis> target to override
|
||||
<maketarget>do-extract</maketarget> target to override
|
||||
the default, though this should be rarely, if ever,
|
||||
necessary.</para>
|
||||
|
||||
|
@ -26645,7 +26638,7 @@
|
|||
the case, add the name and the location of the patch tarball
|
||||
to <makevar>${DISTFILES}</makevar> and
|
||||
<makevar>${MASTER_SITES}</makevar>. Then, from
|
||||
the <emphasis remap=tt>pre-patch</emphasis> target, apply the
|
||||
the <maketarget>pre-patch</maketarget> target, apply the
|
||||
patch either by running the patch command from there, or
|
||||
copying the patch file into the <makevar>${PATCHDIR}</makevar> directory and calling it
|
||||
<filename>patch-<xx></filename>.</para>
|
||||
|
@ -26657,7 +26650,7 @@
|
|||
If you do the latter, take extra care not to overwrite
|
||||
something that already exists in that directory. Also do
|
||||
not forget to add a command to remove the copied patch in
|
||||
the <emphasis remap=tt>pre-clean</emphasis> target.</para>
|
||||
the <maketarget>pre-clean</maketarget> target.</para>
|
||||
</note>
|
||||
|
||||
</sect4>
|
||||
|
@ -26708,8 +26701,7 @@
|
|||
example above.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>extract</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>extract</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26753,8 +26745,7 @@
|
|||
use the full pathname.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>install</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>install</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26780,7 +26771,7 @@
|
|||
<note>
|
||||
<para>`build' here means everything from extracting to
|
||||
compilation. The dependency is checked from within the
|
||||
<emphasis remap=tt>extract</emphasis> target.</para>
|
||||
<maketarget>extract</maketarget> target.</para>
|
||||
</note>
|
||||
</sect5>
|
||||
|
||||
|
@ -26799,8 +26790,7 @@
|
|||
<filename>net/ncftp2</filename> subdirectory of your ports
|
||||
tree to build and install it if it is not found.</para>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>fetch</emphasis> target.</para>
|
||||
<para>The dependency is checked from within the <maketarget>fetch</maketarget> target.</para>
|
||||
|
||||
</sect5>
|
||||
|
||||
|
@ -26838,9 +26828,9 @@
|
|||
<literal>XMKMF=xmkmf</literal>.</para>
|
||||
|
||||
<para>If your port's source <filename>Makefile</filename> has
|
||||
something else than <emphasis remap=tt>all</emphasis> as the
|
||||
something else than <maketarget>all</maketarget> as the
|
||||
main build target, set <makevar>${ALL_TARGET}</makevar> accordingly. Same
|
||||
goes for <emphasis remap=tt>install</emphasis> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
goes for <maketarget>install</maketarget> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
|
||||
</sect4>
|
||||
|
||||
|
@ -27043,9 +27033,8 @@
|
|||
|
||||
<para>The second hunk was necessary because the default
|
||||
target in the <filename>man</filename> subdir is called
|
||||
<emphasis remap=tt>info</emphasis>, while the main
|
||||
<filename>Makefile</filename> wants to call <emphasis
|
||||
remap=tt>all</emphasis>. I also deleted the installation
|
||||
<maketarget>info</maketarget>, while the main
|
||||
<filename>Makefile</filename> wants to call <maketarget>all</maketarget>. I also deleted the installation
|
||||
of the <filename>info</filename> info file
|
||||
because we already have one with the same name in
|
||||
<filename>/usr/share/info</filename> (that patch is not
|
||||
|
@ -27098,10 +27087,10 @@
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add a <emphasis remap=tt>post-install</emphasis>
|
||||
<para>Add a <maketarget>post-install</maketarget>
|
||||
target to the <filename>Makefile</filename> to create a
|
||||
<filename>dir</filename> file if it is not there. Also,
|
||||
call <emphasis remap=tt>install-info</emphasis> with the
|
||||
call <maketarget>install-info</maketarget> with the
|
||||
installed info files.
|
||||
|
||||
<informalexample>
|
||||
|
@ -27279,7 +27268,7 @@
|
|||
auxiliary files that are not scripts or patches, put them in
|
||||
the <makevar>${FILESDIR}</makevar> subdirectory
|
||||
(<filename>files</filename> by default) and use the
|
||||
<emphasis remap=tt>post-extract</emphasis> target to copy them
|
||||
<maketarget>post-extract</maketarget> target to copy them
|
||||
to the <filename>work</filename> subdirectory.</para>
|
||||
|
||||
</sect4>
|
||||
|
@ -27305,7 +27294,7 @@
|
|||
|
||||
<para>Do compress manpages and strip binaries. If the original
|
||||
source already strips the binary, fine; otherwise, you can add
|
||||
a <emphasis remap=tt>post-install</emphasis> rule to do it
|
||||
a <maketarget>post-install</maketarget> rule to do it
|
||||
yourself. Here is an example:
|
||||
<informalexample>
|
||||
<screen> post-install: strip ${PREFIX}/bin/xdl</screen>
|
||||
|
@ -27431,8 +27420,7 @@
|
|||
standard man and info pages that you think is useful for the
|
||||
user, install it under
|
||||
<filename>${PREFIX}/share/doc</filename>. This can be
|
||||
done, like the previous item, in the <emphasis
|
||||
remap=tt>post-install</emphasis> target.</para>
|
||||
done, like the previous item, in the <maketarget>post-install</maketarget> target.</para>
|
||||
|
||||
<para>Create a new directory for your port. The directory name
|
||||
should reflect what the port is. This usually means <makevar>${PKGNAME}</makevar> minus the version part.
|
||||
|
@ -27528,7 +27516,7 @@
|
|||
particular, diffs between two backup files, Makefiles when the
|
||||
port uses Imake or GNU configure, etc., are unnecessary and
|
||||
should be deleted. Also, if you had to delete a file, then you
|
||||
can do it in the <emphasis remap=tt>post-extract</emphasis>
|
||||
can do it in the <maketarget>post-extract</maketarget>
|
||||
target rather than as part of the patch. Once you are happy
|
||||
with the resuling diff, please split it up into one source
|
||||
file per patch file.</para>
|
||||
|
@ -27600,8 +27588,7 @@
|
|||
<sect4>
|
||||
<title>ldconfig</title>
|
||||
|
||||
<para>If your port installs a shared library, add a <emphasis
|
||||
remap=tt>post-install</emphasis> target to your Makefile
|
||||
<para>If your port installs a shared library, add a <maketarget>post-install</maketarget> target to your Makefile
|
||||
that runs <command>/sbin/ldconfig -m</command> on
|
||||
the directory where the new library is installed (usually
|
||||
<filename>${PREFIX}/lib</filename>) to register it into
|
||||
|
|
|
@ -26341,18 +26341,15 @@
|
|||
</para>
|
||||
|
||||
<para>The above are the default actions. In addition, you can
|
||||
define targets <emphasis
|
||||
remap=tt>pre-<something></emphasis> or <emphasis
|
||||
remap=tt>post-<something></emphasis>, or put scripts
|
||||
define targets <maketarget>pre-<something></maketarget> or <maketarget>post-<something></maketarget>, or put scripts
|
||||
with those names, in the <filename>scripts</filename>
|
||||
subdirectory, and they will be run before or after the default
|
||||
actions are done.</para>
|
||||
|
||||
<para>For example, if you have a <emphasis
|
||||
remap=tt>post-extract</emphasis> target defined in your
|
||||
<para>For example, if you have a <maketarget>post-extract</maketarget> target defined in your
|
||||
Makefile, and a file <filename>pre-build</filename> in the
|
||||
<filename remap="tt">scripts</filename> subdirectory, the
|
||||
<emphasis remap=tt>post-extract</emphasis> target will be
|
||||
<maketarget>post-extract</maketarget> target will be
|
||||
called after the regular extraction actions, and the
|
||||
<filename>pre-build</filename> script will be executed before
|
||||
the default build rules are done. It is recommended that you
|
||||
|
@ -26361,23 +26358,19 @@
|
|||
out what kind of non-default action the port requires.</para>
|
||||
|
||||
<para>The default actions are done by the
|
||||
<filename>bsd.port.mk</filename> targets <emphasis
|
||||
remap=tt>do-<something></emphasis>. For example, the
|
||||
commands to extract a port are in the target <emphasis
|
||||
remap=tt>do-extract</emphasis>. If you are not happy with
|
||||
<filename>bsd.port.mk</filename> targets <maketarget>do-<something></maketarget>. For example, the
|
||||
commands to extract a port are in the target <maketarget>do-extract</maketarget>. If you are not happy with
|
||||
the default target, you can fix it by redefining the
|
||||
<emphasis remap=tt>do-<something></emphasis> target in
|
||||
<maketarget>do-<something></maketarget> target in
|
||||
your Makefile.</para>
|
||||
|
||||
<note>
|
||||
<para>The `main' targets (e.g., <emphasis
|
||||
remap=tt>extract</emphasis>, <emphasis
|
||||
remap=tt>configure</emphasis>, etc.) do nothing more than
|
||||
<para>The `main' targets (e.g., <maketarget>extract</maketarget>, <maketarget>configure</maketarget>, etc.) do nothing more than
|
||||
make sure all the stages up to that one is completed and
|
||||
call the real targets or scripts, and they are not intended
|
||||
to be changed. If you want to fix the extraction, fix
|
||||
<emphasis remap=tt>do-extract</emphasis>, but never ever
|
||||
touch <emphasis remap=tt>extract</emphasis>!</para>
|
||||
<maketarget>do-extract</maketarget>, but never ever
|
||||
touch <maketarget>extract</maketarget>!</para>
|
||||
</note>
|
||||
|
||||
<para>Now that you understand what goes on when the user types
|
||||
|
@ -26520,7 +26513,7 @@
|
|||
gzip.)</para>
|
||||
|
||||
<para>In the worst case, you can simply create your own
|
||||
<emphasis remap=tt>do-extract</emphasis> target to override
|
||||
<maketarget>do-extract</maketarget> target to override
|
||||
the default, though this should be rarely, if ever,
|
||||
necessary.</para>
|
||||
|
||||
|
@ -26645,7 +26638,7 @@
|
|||
the case, add the name and the location of the patch tarball
|
||||
to <makevar>${DISTFILES}</makevar> and
|
||||
<makevar>${MASTER_SITES}</makevar>. Then, from
|
||||
the <emphasis remap=tt>pre-patch</emphasis> target, apply the
|
||||
the <maketarget>pre-patch</maketarget> target, apply the
|
||||
patch either by running the patch command from there, or
|
||||
copying the patch file into the <makevar>${PATCHDIR}</makevar> directory and calling it
|
||||
<filename>patch-<xx></filename>.</para>
|
||||
|
@ -26657,7 +26650,7 @@
|
|||
If you do the latter, take extra care not to overwrite
|
||||
something that already exists in that directory. Also do
|
||||
not forget to add a command to remove the copied patch in
|
||||
the <emphasis remap=tt>pre-clean</emphasis> target.</para>
|
||||
the <maketarget>pre-clean</maketarget> target.</para>
|
||||
</note>
|
||||
|
||||
</sect4>
|
||||
|
@ -26708,8 +26701,7 @@
|
|||
example above.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>extract</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>extract</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26753,8 +26745,7 @@
|
|||
use the full pathname.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>install</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>install</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26780,7 +26771,7 @@
|
|||
<note>
|
||||
<para>`build' here means everything from extracting to
|
||||
compilation. The dependency is checked from within the
|
||||
<emphasis remap=tt>extract</emphasis> target.</para>
|
||||
<maketarget>extract</maketarget> target.</para>
|
||||
</note>
|
||||
</sect5>
|
||||
|
||||
|
@ -26799,8 +26790,7 @@
|
|||
<filename>net/ncftp2</filename> subdirectory of your ports
|
||||
tree to build and install it if it is not found.</para>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>fetch</emphasis> target.</para>
|
||||
<para>The dependency is checked from within the <maketarget>fetch</maketarget> target.</para>
|
||||
|
||||
</sect5>
|
||||
|
||||
|
@ -26838,9 +26828,9 @@
|
|||
<literal>XMKMF=xmkmf</literal>.</para>
|
||||
|
||||
<para>If your port's source <filename>Makefile</filename> has
|
||||
something else than <emphasis remap=tt>all</emphasis> as the
|
||||
something else than <maketarget>all</maketarget> as the
|
||||
main build target, set <makevar>${ALL_TARGET}</makevar> accordingly. Same
|
||||
goes for <emphasis remap=tt>install</emphasis> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
goes for <maketarget>install</maketarget> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
|
||||
</sect4>
|
||||
|
||||
|
@ -27043,9 +27033,8 @@
|
|||
|
||||
<para>The second hunk was necessary because the default
|
||||
target in the <filename>man</filename> subdir is called
|
||||
<emphasis remap=tt>info</emphasis>, while the main
|
||||
<filename>Makefile</filename> wants to call <emphasis
|
||||
remap=tt>all</emphasis>. I also deleted the installation
|
||||
<maketarget>info</maketarget>, while the main
|
||||
<filename>Makefile</filename> wants to call <maketarget>all</maketarget>. I also deleted the installation
|
||||
of the <filename>info</filename> info file
|
||||
because we already have one with the same name in
|
||||
<filename>/usr/share/info</filename> (that patch is not
|
||||
|
@ -27098,10 +27087,10 @@
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add a <emphasis remap=tt>post-install</emphasis>
|
||||
<para>Add a <maketarget>post-install</maketarget>
|
||||
target to the <filename>Makefile</filename> to create a
|
||||
<filename>dir</filename> file if it is not there. Also,
|
||||
call <emphasis remap=tt>install-info</emphasis> with the
|
||||
call <maketarget>install-info</maketarget> with the
|
||||
installed info files.
|
||||
|
||||
<informalexample>
|
||||
|
@ -27279,7 +27268,7 @@
|
|||
auxiliary files that are not scripts or patches, put them in
|
||||
the <makevar>${FILESDIR}</makevar> subdirectory
|
||||
(<filename>files</filename> by default) and use the
|
||||
<emphasis remap=tt>post-extract</emphasis> target to copy them
|
||||
<maketarget>post-extract</maketarget> target to copy them
|
||||
to the <filename>work</filename> subdirectory.</para>
|
||||
|
||||
</sect4>
|
||||
|
@ -27305,7 +27294,7 @@
|
|||
|
||||
<para>Do compress manpages and strip binaries. If the original
|
||||
source already strips the binary, fine; otherwise, you can add
|
||||
a <emphasis remap=tt>post-install</emphasis> rule to do it
|
||||
a <maketarget>post-install</maketarget> rule to do it
|
||||
yourself. Here is an example:
|
||||
<informalexample>
|
||||
<screen> post-install: strip ${PREFIX}/bin/xdl</screen>
|
||||
|
@ -27431,8 +27420,7 @@
|
|||
standard man and info pages that you think is useful for the
|
||||
user, install it under
|
||||
<filename>${PREFIX}/share/doc</filename>. This can be
|
||||
done, like the previous item, in the <emphasis
|
||||
remap=tt>post-install</emphasis> target.</para>
|
||||
done, like the previous item, in the <maketarget>post-install</maketarget> target.</para>
|
||||
|
||||
<para>Create a new directory for your port. The directory name
|
||||
should reflect what the port is. This usually means <makevar>${PKGNAME}</makevar> minus the version part.
|
||||
|
@ -27528,7 +27516,7 @@
|
|||
particular, diffs between two backup files, Makefiles when the
|
||||
port uses Imake or GNU configure, etc., are unnecessary and
|
||||
should be deleted. Also, if you had to delete a file, then you
|
||||
can do it in the <emphasis remap=tt>post-extract</emphasis>
|
||||
can do it in the <maketarget>post-extract</maketarget>
|
||||
target rather than as part of the patch. Once you are happy
|
||||
with the resuling diff, please split it up into one source
|
||||
file per patch file.</para>
|
||||
|
@ -27600,8 +27588,7 @@
|
|||
<sect4>
|
||||
<title>ldconfig</title>
|
||||
|
||||
<para>If your port installs a shared library, add a <emphasis
|
||||
remap=tt>post-install</emphasis> target to your Makefile
|
||||
<para>If your port installs a shared library, add a <maketarget>post-install</maketarget> target to your Makefile
|
||||
that runs <command>/sbin/ldconfig -m</command> on
|
||||
the directory where the new library is installed (usually
|
||||
<filename>${PREFIX}/lib</filename>) to register it into
|
||||
|
|
|
@ -26341,18 +26341,15 @@
|
|||
</para>
|
||||
|
||||
<para>The above are the default actions. In addition, you can
|
||||
define targets <emphasis
|
||||
remap=tt>pre-<something></emphasis> or <emphasis
|
||||
remap=tt>post-<something></emphasis>, or put scripts
|
||||
define targets <maketarget>pre-<something></maketarget> or <maketarget>post-<something></maketarget>, or put scripts
|
||||
with those names, in the <filename>scripts</filename>
|
||||
subdirectory, and they will be run before or after the default
|
||||
actions are done.</para>
|
||||
|
||||
<para>For example, if you have a <emphasis
|
||||
remap=tt>post-extract</emphasis> target defined in your
|
||||
<para>For example, if you have a <maketarget>post-extract</maketarget> target defined in your
|
||||
Makefile, and a file <filename>pre-build</filename> in the
|
||||
<filename remap="tt">scripts</filename> subdirectory, the
|
||||
<emphasis remap=tt>post-extract</emphasis> target will be
|
||||
<maketarget>post-extract</maketarget> target will be
|
||||
called after the regular extraction actions, and the
|
||||
<filename>pre-build</filename> script will be executed before
|
||||
the default build rules are done. It is recommended that you
|
||||
|
@ -26361,23 +26358,19 @@
|
|||
out what kind of non-default action the port requires.</para>
|
||||
|
||||
<para>The default actions are done by the
|
||||
<filename>bsd.port.mk</filename> targets <emphasis
|
||||
remap=tt>do-<something></emphasis>. For example, the
|
||||
commands to extract a port are in the target <emphasis
|
||||
remap=tt>do-extract</emphasis>. If you are not happy with
|
||||
<filename>bsd.port.mk</filename> targets <maketarget>do-<something></maketarget>. For example, the
|
||||
commands to extract a port are in the target <maketarget>do-extract</maketarget>. If you are not happy with
|
||||
the default target, you can fix it by redefining the
|
||||
<emphasis remap=tt>do-<something></emphasis> target in
|
||||
<maketarget>do-<something></maketarget> target in
|
||||
your Makefile.</para>
|
||||
|
||||
<note>
|
||||
<para>The `main' targets (e.g., <emphasis
|
||||
remap=tt>extract</emphasis>, <emphasis
|
||||
remap=tt>configure</emphasis>, etc.) do nothing more than
|
||||
<para>The `main' targets (e.g., <maketarget>extract</maketarget>, <maketarget>configure</maketarget>, etc.) do nothing more than
|
||||
make sure all the stages up to that one is completed and
|
||||
call the real targets or scripts, and they are not intended
|
||||
to be changed. If you want to fix the extraction, fix
|
||||
<emphasis remap=tt>do-extract</emphasis>, but never ever
|
||||
touch <emphasis remap=tt>extract</emphasis>!</para>
|
||||
<maketarget>do-extract</maketarget>, but never ever
|
||||
touch <maketarget>extract</maketarget>!</para>
|
||||
</note>
|
||||
|
||||
<para>Now that you understand what goes on when the user types
|
||||
|
@ -26520,7 +26513,7 @@
|
|||
gzip.)</para>
|
||||
|
||||
<para>In the worst case, you can simply create your own
|
||||
<emphasis remap=tt>do-extract</emphasis> target to override
|
||||
<maketarget>do-extract</maketarget> target to override
|
||||
the default, though this should be rarely, if ever,
|
||||
necessary.</para>
|
||||
|
||||
|
@ -26645,7 +26638,7 @@
|
|||
the case, add the name and the location of the patch tarball
|
||||
to <makevar>${DISTFILES}</makevar> and
|
||||
<makevar>${MASTER_SITES}</makevar>. Then, from
|
||||
the <emphasis remap=tt>pre-patch</emphasis> target, apply the
|
||||
the <maketarget>pre-patch</maketarget> target, apply the
|
||||
patch either by running the patch command from there, or
|
||||
copying the patch file into the <makevar>${PATCHDIR}</makevar> directory and calling it
|
||||
<filename>patch-<xx></filename>.</para>
|
||||
|
@ -26657,7 +26650,7 @@
|
|||
If you do the latter, take extra care not to overwrite
|
||||
something that already exists in that directory. Also do
|
||||
not forget to add a command to remove the copied patch in
|
||||
the <emphasis remap=tt>pre-clean</emphasis> target.</para>
|
||||
the <maketarget>pre-clean</maketarget> target.</para>
|
||||
</note>
|
||||
|
||||
</sect4>
|
||||
|
@ -26708,8 +26701,7 @@
|
|||
example above.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>extract</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>extract</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26753,8 +26745,7 @@
|
|||
use the full pathname.</para>
|
||||
</note>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>install</emphasis> target. Also, the name of the
|
||||
<para>The dependency is checked from within the <maketarget>install</maketarget> target. Also, the name of the
|
||||
dependency is put in to the package so that
|
||||
<symbol>pkg_add</symbol> will automatically install it if it
|
||||
is not on the user's system.</para>
|
||||
|
@ -26780,7 +26771,7 @@
|
|||
<note>
|
||||
<para>`build' here means everything from extracting to
|
||||
compilation. The dependency is checked from within the
|
||||
<emphasis remap=tt>extract</emphasis> target.</para>
|
||||
<maketarget>extract</maketarget> target.</para>
|
||||
</note>
|
||||
</sect5>
|
||||
|
||||
|
@ -26799,8 +26790,7 @@
|
|||
<filename>net/ncftp2</filename> subdirectory of your ports
|
||||
tree to build and install it if it is not found.</para>
|
||||
|
||||
<para>The dependency is checked from within the <emphasis
|
||||
remap=tt>fetch</emphasis> target.</para>
|
||||
<para>The dependency is checked from within the <maketarget>fetch</maketarget> target.</para>
|
||||
|
||||
</sect5>
|
||||
|
||||
|
@ -26838,9 +26828,9 @@
|
|||
<literal>XMKMF=xmkmf</literal>.</para>
|
||||
|
||||
<para>If your port's source <filename>Makefile</filename> has
|
||||
something else than <emphasis remap=tt>all</emphasis> as the
|
||||
something else than <maketarget>all</maketarget> as the
|
||||
main build target, set <makevar>${ALL_TARGET}</makevar> accordingly. Same
|
||||
goes for <emphasis remap=tt>install</emphasis> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
goes for <maketarget>install</maketarget> and <makevar>${INSTALL_TARGET}</makevar>.</para>
|
||||
|
||||
</sect4>
|
||||
|
||||
|
@ -27043,9 +27033,8 @@
|
|||
|
||||
<para>The second hunk was necessary because the default
|
||||
target in the <filename>man</filename> subdir is called
|
||||
<emphasis remap=tt>info</emphasis>, while the main
|
||||
<filename>Makefile</filename> wants to call <emphasis
|
||||
remap=tt>all</emphasis>. I also deleted the installation
|
||||
<maketarget>info</maketarget>, while the main
|
||||
<filename>Makefile</filename> wants to call <maketarget>all</maketarget>. I also deleted the installation
|
||||
of the <filename>info</filename> info file
|
||||
because we already have one with the same name in
|
||||
<filename>/usr/share/info</filename> (that patch is not
|
||||
|
@ -27098,10 +27087,10 @@
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>Add a <emphasis remap=tt>post-install</emphasis>
|
||||
<para>Add a <maketarget>post-install</maketarget>
|
||||
target to the <filename>Makefile</filename> to create a
|
||||
<filename>dir</filename> file if it is not there. Also,
|
||||
call <emphasis remap=tt>install-info</emphasis> with the
|
||||
call <maketarget>install-info</maketarget> with the
|
||||
installed info files.
|
||||
|
||||
<informalexample>
|
||||
|
@ -27279,7 +27268,7 @@
|
|||
auxiliary files that are not scripts or patches, put them in
|
||||
the <makevar>${FILESDIR}</makevar> subdirectory
|
||||
(<filename>files</filename> by default) and use the
|
||||
<emphasis remap=tt>post-extract</emphasis> target to copy them
|
||||
<maketarget>post-extract</maketarget> target to copy them
|
||||
to the <filename>work</filename> subdirectory.</para>
|
||||
|
||||
</sect4>
|
||||
|
@ -27305,7 +27294,7 @@
|
|||
|
||||
<para>Do compress manpages and strip binaries. If the original
|
||||
source already strips the binary, fine; otherwise, you can add
|
||||
a <emphasis remap=tt>post-install</emphasis> rule to do it
|
||||
a <maketarget>post-install</maketarget> rule to do it
|
||||
yourself. Here is an example:
|
||||
<informalexample>
|
||||
<screen> post-install: strip ${PREFIX}/bin/xdl</screen>
|
||||
|
@ -27431,8 +27420,7 @@
|
|||
standard man and info pages that you think is useful for the
|
||||
user, install it under
|
||||
<filename>${PREFIX}/share/doc</filename>. This can be
|
||||
done, like the previous item, in the <emphasis
|
||||
remap=tt>post-install</emphasis> target.</para>
|
||||
done, like the previous item, in the <maketarget>post-install</maketarget> target.</para>
|
||||
|
||||
<para>Create a new directory for your port. The directory name
|
||||
should reflect what the port is. This usually means <makevar>${PKGNAME}</makevar> minus the version part.
|
||||
|
@ -27528,7 +27516,7 @@
|
|||
particular, diffs between two backup files, Makefiles when the
|
||||
port uses Imake or GNU configure, etc., are unnecessary and
|
||||
should be deleted. Also, if you had to delete a file, then you
|
||||
can do it in the <emphasis remap=tt>post-extract</emphasis>
|
||||
can do it in the <maketarget>post-extract</maketarget>
|
||||
target rather than as part of the patch. Once you are happy
|
||||
with the resuling diff, please split it up into one source
|
||||
file per patch file.</para>
|
||||
|
@ -27600,8 +27588,7 @@
|
|||
<sect4>
|
||||
<title>ldconfig</title>
|
||||
|
||||
<para>If your port installs a shared library, add a <emphasis
|
||||
remap=tt>post-install</emphasis> target to your Makefile
|
||||
<para>If your port installs a shared library, add a <maketarget>post-install</maketarget> target to your Makefile
|
||||
that runs <command>/sbin/ldconfig -m</command> on
|
||||
the directory where the new library is installed (usually
|
||||
<filename>${PREFIX}/lib</filename>) to register it into
|
||||
|
|
Loading…
Reference in a new issue