The Makefile
should do things simply
and reasonably. If you can make it a couple of lines shorter
or more readable, then do so. Examples include using a make
.if
construct instead of a shell
if
construct, not redefining
do-extract
if you can redefine
EXTRACT*
instead, and using
GNU_CONFIGURE
instead of
CONFIGURE_ARGS
+= --prefix=${PREFIX}
.
If you find yourself having to write a lot of new code to
try to do something, please go back and review
bsd.port.mk
to see if it contains an
existing implementation of what you are trying to do. While
hard to read, there are a great many seemingly-hard problems
for which bsd.port.mk
already provides a
shorthand solution.
All FreeBSD documents are available for download at http://ftp.FreeBSD.org/pub/FreeBSD/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.