Subject: Bad domestic test in src/Makefile?
To: None <tech-toolchain@netbsd.org>
From: Curt Sampson <cjs@cynic.net>
List: tech-toolchain
Date: 03/30/1999 08:10:41
The following code was recently changed in src/Makefile:

 .if exists(domestic) && \
     (make(clean) || make(cleandir) || make(obj) || \
     ((make(includes) || make(install)) && \
-    !(defined(EXPORTABLE_SYSTEM) || defined(_BUILD))))
+    !defined(EXPORTABLE_SYSTEM) && defined(_DISTRIB)))
 SUBDIR+= domestic
 .endif

This test appears to be wrong to me; it seems to me that, regardless
of the setting of EXPORTABLE_SYSTEM now, if _DISTRIB is not set
domestic is never included in SUBDIR. This basically makes it
impossible to build a domestic tree with `make build.'

The comment says only:

# Descend into the domestic tree if it exists AND
#  1) the target is clean, cleandir, or obj, OR
#  2) the the target is install or includes AND
#    NOT compiling only "exportable" code AND
#    doing it as part of installing a distribution.

Does anybody know what the purpose of step 2 is (i.e., what end it
is trying to achieve)? If not, I'll attempt to `fix' it....

If someone does know how all this is supposed to work, could he
document it in the makefiles? And also document the purpose of the
_DISTRIB and _BUILD variables?

cjs
-- 
Curt Sampson  <cjs@cynic.net>   604 801 5335   De gustibus, aut bene aut nihil.
The most widely ported operating system in the world: http://www.netbsd.org