if a port sets FAKE=Yes, this means it can be `pre'-installed elsewhere,
with DESTDIR set to WRKINST (=work/fake-${ARCH} by default).
the infrastructure takes care of pre-install/do-install/post-install targets,
assuming those install stuff under PREFIX.
To help ports to cope with DESTDIR, you can set FAKE_FLAGS and FAKE_TARGET
(used for the fake installation).
Ports with FAKE=Yes are the way to go: they can be packaged directly without
a real installation, and the installation proceeds from the package, thus
forcing porters to check the package.
- don't record mtree in packages by default,
- don't run mtree on /usr/local or /usr/X11R6 by default,
- only use MTREE_FILE for plist.
- choose mtree based on PREFIX, since this is what matters.
# DISTONLY: May distribute the distfile only.
# NOMODIFY: May not distribute ports that are modified in any way,
# i.e, the package may not have any patches applied to it.
# Precompiled packages are fine as long as they do not
# change the original port.
Add new variables (WRKDIST, WRKSRC, HOMEPAGE), remove old stuff such as
PATCH_SITES.
Be very explicit in explaining about stuff that hardly ever works.
May be different from where source lives.
And from where build happens.
NO_WRKSUBDIR=Yes is equivalent to WRKDIST=${WRKDIR}, and not
particularly smaller, deprecated it.
Remove CLEANDISTORIG, use patch -b instead.
Note that DISTORIG ends in .orig to let rm *.orig still work...
More submakes die.
Remove NO_WRKDIR `feature'
Fix `make clean' to do the right thing even if WRKOBJDIR is not defined
at that point.
It's doubtful package-noinstall is useful, but I left it in for now, with
slightly altered semantics.
- put .if defined(XXX) && !defined(YYY) on the same line: less indentation,
more readability.
- set found to true/false directly (builtin).
ALWAYS check that a dependency directory does exist and is a directory.
Catch up typos more quickly, since they will be evident *even if the
dependency is already satisfied*.
Make this only a warning, not a hard error, as we still want to cater
to users with a partially checked out tree...
This is done in a tricky way, so as not to disturb the usual sequence
of targets. Namely, you still have
fetch, extract, patch, configure, build, install, package,
but patch does invoke a subtarget distpatch when needed,
and you can
fetch, extract, distpatch, patch, configure, build, install, package
for the same results.
Mostly useful for porters: provide an intermediate point to work on
patches, and make it easy to override distpatch/OpenBSD patches separately.
This trims down the number of sub-makes the port system runs quite a bit,
and makes some other fun stuff possible.
THIS KILLS THE pre-*/post-* SCRIPT STUFF
The functionality is unneeded, as it can be done with normal
pre-*/post-* targets, but it must be kept in mind when porting
Free/NetBSD ports.
some ftp servers give weird dates, like Dec 14 1909...
and then make gets confused, as make 2.6 is broken with respect to negative
dates.
So we touch the file whenever make gets confused and it already exists.
This avoids fetching & re-fetching files with negative dates, while keeping
timestamps for correct files...
So, we indent each test/loop level two spaces to let the structure
of bsd.port.mk be more visible.
Large indentations show that something blatantly unobvious/obfuscated is
going on.
Design decision made after consulting with brad@.
We agree it's much clearer that way.
Plays some make trickery to get all details correct.
Numerous benefits:
- make automatically handles badly fetched files,
- possible extension to special-case *each* file fetch,
- can be easily parallelized.
Similar rules for fetch-list soon coming.
Also simplify CDROM handling while we're at it, no need for 10 knobs
when one suffices.
`main' targets (checksum, fetch, extract...) are always defined.
This removes the possibility of erroneously overriding them.
Dependency fix:
- move the NO_xxx test to the _xxx_COOKIE target, so that each cookie
is built at exactly one point in the Makefile.
- separate phony targets from the real thing:
`top' dummy targets (e.g., build) depend on the corresponding cookie,
cookies depend on each others and each cookie does trigger the real targett
(unless NO_xxx) before creating the cookie.
This does repair parallel makes, which were completely broken.
Might induce problems into odd-balls ports, but I couldn't get anyone to
comment on this patch after a week on ports@ and tech@.
Maybe, if something breaks, I'll finally get some comments...
The problem with .USE macros is that they should be constant...
If they do depend on the target being made, they will invariably use
.if make(TARGET) tests. But this is a bad idea, as then `TARGET' can't
be used as a true dependency, since it's not being made then...
So instead, one would have to remember to fork another make TARGET to
ensure the .USE macro is executed correctly... This is slow, and
error-prone.
make has been passing around its flags in MAKEFLAGS since
at least 1996... so passing them explicitly around means we
duplicate them.
This avoids the make -k -k -k -k -k -k -k -k -k syndrome
that turans@ has noticed
already swamp us with information.
- perform the same optimization for README.html, namely don't invoke
depends-list and package-depends if they're known not to be needed.
target, shortcuts can't be taken.
This involves moving those default target around so that they appear AFTER
describe.
Note that these tests mean ANYTHING adding to *_DEPENDS *MUST* come before
the targets that test these for bsd.port.mk to work...
The `pname hack' already catered to some of that (only computing the
package name if dependencies exist)
This removes the hack and simply optimize dependency computation out of
existence if it's not needed.
Improves make index time by >15%.