freebsd-nq/share
Ruslan Ermilov 8f463ff4c5 Moved the `distribute' target from bsd.obj.mk to bsd.subdir.mk,
to make it call `install' in the bsd.subdir.mk-driven makefiles
too.  (share/examples/Makefile,v 1.29 changed the bsd.prog.mk
to bsd.subdir.mk and many stuff was lost during "make release".
I then merged this change in rev. 1.28.2.2 to work around the
namespace pollution (FILES) in this makefile.)

There was an added complexity here.  Both the `distribute' and
`install' targets are recursive (they propagate to SUBDIRs).
So `distribute' first calls `install' in the ${.CURDIR}, then
calls `distribute' in each SUBDIR, etc.  The problem is that
`install' (being also recursive) causes the stuff from SUBDIR
to be installed twice, first time thru `install' in ${.CURDIR}
triggered by `distribute', second time by `distribute' run in
the SUBDIR.  This problem is not new, but it became apparent
only after I moved the `distribute' target from bsd.obj.mk to
bsd.subdir.mk.  My first attempt testing the fix failed due to
this, because the whole world was distributed twice, causing
all the imaginable mess (kerberos5 stuff was installed into both
"base" and "krb5" dists, there was /sbin/init.bak, etc.)
I say the problem is not new because bsd.prog.mk and bsd.lib.mk
makefiles with SUBDIR (even without this fix) had this problem
for years.  Try e.g. running ``make distribute DISTDIR=/foo''
from usr.bin/bzip2 or from lib/libcom_err (without the fix) and
watch the output.

So the solution was to make `install' behave non-recursive when
executed by `distribute'.  My first attempt in passing SUBDIR=
to the `install' in the `distribute' body failed because of the
way how src/Makefile and src/Makefile.inc1 communicate with each
other.  SUBDIR='s assignment precedence on the "make install
SUBDIR=" command line is lowered after src/Makefile wrapper calls
"make ... -f ${.CURDIR}/Makefile.inc1 install" because SUBDIR=
is moved into environment, and Makefile.inc1's assignments now
take higher precedence.  This may be fixed someday when we merge
Makefile with Makefile.inc1.  For now, this is implemented as a
NO_SUBDIR knob.

Spotted by:	Dmitry Pryanishnikov <dmitry@atlantis.dp.ua>
Prodded by:	des
MFC after:	3 days
2002-07-12 15:09:35 +00:00
..
colldef Back out ASCII compatibility and let people face the problems themself 2002-04-08 09:40:52 +00:00
dict Fix the makefile to match the repo-copy from tech to freebsd. 2002-04-01 13:58:14 +00:00
doc Make it official. The old BIND Operator's Guide has no information 2002-07-07 08:29:00 +00:00
examples Update the SUBDIR hacks to work with the current bsd.subdir.mk. 2002-07-11 13:38:05 +00:00
info INFODIR is defined in bsd.own.mk but sys.mk no longer includes 2002-04-18 06:55:32 +00:00
isdn FILES support for bsd.prog.mk. See bsd.README for details. 2001-12-17 13:59:35 +00:00
man Connect device.hints.5 to the build. 2002-07-12 14:16:46 +00:00
me Install manpage for old -me macro package. 2002-03-20 16:26:35 +00:00
misc Regen: 2002-07-09 11:50:14 +00:00
mk Moved the `distribute' target from bsd.obj.mk to bsd.subdir.mk, 2002-07-12 15:09:35 +00:00
mklocale Recognize 0xbe as an uppercase character. 2002-06-03 21:30:28 +00:00
monetdef Unbreak ja_JP.SJIS locale by adding following associations: 2002-04-05 15:39:16 +00:00
msgdef Unbreak ja_JP.SJIS locale by adding following associations: 2002-04-05 15:39:16 +00:00
numericdef Unbreak ja_JP.SJIS locale by adding following associations: 2002-04-05 15:39:16 +00:00
sendmail
skel Synchronize path with dot.cshrc by adding /usr/local/sbin. 2002-07-07 00:00:54 +00:00
syscons Add the Euro symbol mapping to the UK keyboard keymap. 2002-04-08 19:16:01 +00:00
tabset FILES support for bsd.prog.mk. See bsd.README for details. 2001-12-17 13:59:35 +00:00
termcap Add termcap entries to be able to switch to line drawing character 2002-04-26 11:17:46 +00:00
timedef Add pt_BR.ISO8859-1 (Brazilian Portuguese) locale 2002-04-05 15:03:13 +00:00
zoneinfo East Timor's alpha-2 code changed. 2002-05-30 17:53:57 +00:00
Makefile Don't build doc on ia64. No groff in sight. 2002-05-22 01:04:42 +00:00
Makefile.inc