build, install) are now all skeletons and do nothing but
(1) Call pre-* target (if exists)
(2) Call scripts/pre-* script (if exists)
(3) Call do-* target
(4) Call post-* target (if exists)
(5) Call scripts/post-* script (if exists)
The do-* targets do all the work. The pre-* and post-* targets/scripts
don't exist by default. The main targets check for the cookies too, so
porters shouldn't have to worry about them at all.
NOTE: THE MAIN TARGETS IN THE PORTS MAKEFILES SHOULD GO AWAY. We need
to fix this before wcarchive comes back up. Change the names to do-*,
rip out the cookies, rip out the calls to pre-* etc. and most of them
should work.
Also, reorganize the whole thing so that similar targets are together
and add more comments. Surround section header with 64 #'s (C-u C-u
C-u # in emacs :).
Hopefully this will be the last major change to bsd.port.mk. Now let
the Makefile-hacking begin.
rule.
2. Have all non-X11 prefix using packages include the BSD.local.dist mtree
file for initialization of /usr/local. I'm still not sure if this is
A Good Thing(tm) but I'll see what the users say. It's easily overridden.
3. Standardise on ${PKG_DBDIR} as pointer to /var/db/pkg or local preference.
"Building for WWW" (pops up in two different ports) "Installing for
web2c-6.1" (ditto), which aren even't reminiscent of the port's real
name.
Sorry jmz, please don't go fix the print Makefiles' own messages.
We are going to take them out after we do the great bsd.port.mk
update anyway.
the top level and have the build-package sequence of each port work
together.
For the old behavior (i.e, just go ahead and blindly pack everything up,
regardless of the contents of work/), there is a new target "repackage".
Since "build" depends on "configure", which depends on "patch", etc.,
this shouldn't disrupt any Makefile that doesn't break the dependency
chain.
The old behavior was very annoying because when I did a "make -k",
it would still try to go configure and build even if the extraction
failed.
all .tgz files go to /usr/ports/packages/.packages, and a relative
symlink is created for every item in CATEGORIES...i.e., if "CATEGORIES
= foo bar", then /usr/ports/packages/{foo,bar}/pkgname.tgz both point
to /usr/ports/packages/.packages/pkgname.tgz.
Suggested by: jkh
*Really* strip out unused local symbols from shared objects.
This was a typo on my part caused by an assumption that the profiled
libraries stripped symbols that same way as the non-profiled libraries.
Cut-n-Paste strikes again.
Obtained from: NetBSD
New variables:
PATCH_SITES: patch equivalent of MASTER_SITES, overridable with
. MASTER_SITE_OVERRIDE.
PATCHFILES: Additional files to fetch and give to patch before
. applying the ones in patches/patch-*. If name ends
. with ".gz" or ".Z", it will be piped through zcat first.
Plus PATCH_DIST_STRIP and PATCH_DIST_ARGS that serve the same functions
as PATCH_STRIP and PATCH_ARGS for patches in patches/patch-*.
In the documentation and echo messages, I used the term "distributed
patches" and "FreeBSD patches" to refer to ${PATCHFILES} and patches/patch-*.
If you can come up with better names, by all means go ahead and fix them.
"grep PATCH /usr/ports/*/*/Makefile" reveals seven ports (mule, jless,
jtcl, jtk, dgd, less, color_xterm, gee I wonder why I'm the one who
implemented this) that can benefit from this. I'm now diving headlong
into /usr/ports to fix their Makefiles.
installation script, DEINSTALL for the deinstallation script, and
REQ for the requirement script, will be added with appropriate
flags to PKG_ARGS if they exist under pkg/.
`depend' wasn't supported. This seems to have only broken `make depend'
in gnu/usr.bin/ld.
bsd.prog.mk:
Build the man pages in ${MANDEPEND} at build time.
have three variables:
EXEC_DEPENDS - A list of "prog:dir" pairs of other ports this
package depends on. "prog" is the name of an
executable. make will search your $PATH for it and go
into "dir" to do a "make all install" if it's not found.
LIB_DEPENDS - A list of "lib:dir" pairs of other ports this package
depends on. "lib" is the name of a shared library.
make will use "ldconfig -r" to search for the
library. Note that lib can be any regular expression,
and you need two backslashes in front of dots (.) to
supress its special meaning (e.g., use
"foo\\.2\\.:${PORTSDIR}/utils/foo" to match "libfoo.2.*").
DEPENDS - A list of other ports this package depends on being
made first. Use this for things that don't fall into
the above two categories.
DEPENDS behaves exactly like before, so old Makefiles will still work
the same. The two variables are lists of pairs as described above.
For instance, if your program depends on unzip and libjpeg.5.*, use
the following definitions:
EXEC_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
LIB_DEPENDS= jpeg\\.5\\.:${PORTSDIR}/graphics/jpeg
gmake:${PORTSDIR}/utils/gmake is automatically added to EXEC_DEPENDS
if USE_GMAKE is defined.
If NO_DEPENDS is defined, the list will just be printed out one by one.