[ On Tuesday, January 16, 2001 at 12:19:50 (-0500), Derek R. Price wrote: ]
> Subject: Another problem with BSD Make
>
> It seems some BSD makes don't look through VPATH for targets either
> (i.e. when they're not found in $(builddir) make assumes they are
> missing and rebuilds).
That's a feature!
If it's not a source it shouldn't be in $(srcdir), or anywhere else in
any directory pointed to by VPATH.
It's only in the GNU world where maintainers are expected to assist
installers by providing build targets that "just might be usable" by the
installer and which might possibly save the installer a micro-second of
time in the long-run. (Heavy sarcasm intended!)
If you really want to do this using any standard Unix make, including
BSD pmake, you must treat everything in $(srcdir) as if it is source and
provide a rule to "make" it -- that rule can be as simple as copying the
file to $(builddir) if that's what you really want to do.
> Mostly this isn't a problem, but there are a few cases where it is. For
> example, info targets are rebuilt every time and I can't create a
> *_TEXINFOS dependency that works from outside $(srcdir) for both a build
> and a make dist without extra configure work.
In fact the make rules should be made smart enough to either re-build
the target properly from its real source if the tools necessary to do
the building are available, or else fall back to coping the pre-built
version if, and *only* if, necessary.
This should in fact be done for *all* variants of make -- if the build
system has the tools necessary to re-build a pre-built target then it
should *always* re-build as this facilitates local customisation
properly (in the case of documentation), and is proper software hygiene.
Special rules for maintainers are bogus. All builders are maintainers
whether they change the content of the actual source or not. If
maintainers are "special" in that only they are expected to have a full
suite of build tools then yes it's OK to provide pre-built target
variants for those items which might require rare or special tools.
However these pre-built variants must always be ignored if the build
system detects that the necessary tools are locally available.
--
Greg A. Woods
+1 416 218-0098 VE3TCP <[EMAIL PROTECTED]> <robohack!woods>
Planix, Inc. <[EMAIL PROTECTED]>; Secrets of the Weird <[EMAIL PROTECTED]>