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