- 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%.
make it a supported variable
(so that I can clean up the few uses of underscore variables I've done...
which were wrong; underscore variables are plain unsupported interface
which may change)
- provide error location for failing recursive dependency computation.
- remove hard-coded limit on topdir, always try to use make package-name
and fall back on directory name otherwise.
Since that cookie is only used for automatically creating plists,
and since mtree information does not belong in the plist (duplicates...),
this was a definite bug.
- add MASTER_SITE_AFTERSTEP and MASTER_SITE_WINDOWMAKER for the master
and mirror sites of two popular window manager suites
- add MASTER_SITE_TCLTK which is Tcl/Tk master sites
depends-list and package-depends now give out output suitable for tsort,
so they are INCOMPATIBLE with the previous version.
PACKAGE_NAME_AS_LINK disappears, functionality is replaced by
FULL_PACKAGE_NAME, which makes more sense anyway.
*This does fix the package dependencies problem*
Still missing: mechanism to output a decent error message in case tsort
finds out a cycle.
files that are not always needed for all builds, but that must be fetched
for maintainance purposes (makesum, mirror...)
Not to use for intl/usa programs, probably...
when they're invoked with an absolute path.
This was introduced by the WRKBUILD/WRKSRC split.
So:
- replace default CONFIGURE with a full path, so that you can override it.
- remove leading ${WRKSRC} from the configure invocation.
- add . to the configure path.
cookies, so that cookie names are no longer hard-coded.
* new SEPARATE_BUILD feature: for ports that can build outside their source
tree, use build-${ARCH} to build, and move configure/build/install cookie
down inside build-${ARCH}.
Those few people who use NFS to mount ports tree around different
architectures may find this helps.
they are not necessary as the proper names are generated when
the package is installed; including them only adds work as they
must be verified and changed when the port changes; thanks to
fgsch@ for bringing this up