Subject: Re: DESTDIR build does not use newly built libraries in libasn1?
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
From: Olaf Seibert <rhialto@polderland.nl>
List: current-users
Date: 07/31/2000 00:55:40
On Thu 27 Jul 2000 at 10:26:17 +0200, Olaf Seibert wrote:
> So even though I invoked make as $DESTDIR/usr/bin/make -m
> $DESTDIR/usr/share/mk , somewhere along the way the normal (old)
> /usr/bin/make gets invoked and the -m option also gets lost.
> 
> I guess I should find out how that happens and file a pr when I do.

The culprit is this (part of the output of ps alxww; look at the bottom
entries):

    0 17975  4489  27  10  0   840 1416 wait   I+   p6    0:00.09 /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/sup/root/src/share/mk build 
    0 17997 17975  29  10  0   864 1480 wait   I+   p6    0:00.06 /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk includes 
    0 18660 17997  29  10  0  1064  376 wait   I+   p6    0:00.00 /bin/sh -ec targ=includes;dir=lib;\t\t case "$dir" in /*)\t\t\t\t\t\t echo "$targ ===> $dir";\t\t\t\t cd "$dir";\t\t\t\t\t\t /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk "_THISDIR_=$dir/" $targ;\t\t ;;\t\t\t\t\t\t\t *)\t\t\t\t\t\t\t\t echo "$targ ===> $dir";\t\t\t cd "/vol1/rhialto/sup/root/src/$dir";\t\t\t\t\t /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk "_THISDIR_=$dir/" $targ;\t ;;\t\t\t\t\t\t\t esac 
    0 18661 18660  29  10  0  1432 2056 wait   I+   p6    0:00.13 /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk _THISDIR_ includes 
    0 18781 18661  29  10  0  1056  368 wait   I+   p6    0:00.00 /bin/sh -ec targ=includes;dir=libcrypto;\t\t case "$dir" in /*)\t\t\t\t\t\t echo "$targ ===> $dir";\t\t\t\t cd "$dir";\t\t\t\t\t\t /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk "_THISDIR_=$dir/" $targ;\t\t ;;\t\t\t\t\t\t\t *)\t\t\t\t\t\t\t\t echo "$targ ===> lib/$dir";\t\t\t cd "/vol1/rhialto/sup/root/src/lib/$dir";\t\t\t\t\t /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk "_THISDIR_=lib/$dir/" $targ;\t ;;\t\t\t\t\t\t\t esac 
    0 18782 18781  25   2  0  1336 1848 netio  I+   p6    0:00.12 /vol1/rhialto/destdir.alpha/usr/bin/make -m /vol1/rhialto/destdir.alpha/usr/share/mk _THISDIR_ includes 
    0 18783 18782  25  10  0  1040  352 wait   I+   p6    0:00.01 sh -c cd /vol1/rhialto/sup/root/src/lib/libcrypto/../libdes && make print-shlib-major 
    0 18784 18783  20  10  0  1032  344 wait   I+   p6    0:00.01 /bin/sh /usr/bin/make print-shlib-major 

This happens during a make build, after the following output:
...
includes ===> lib/liby
includes ===> lib/libz
includes ===> lib/libcrypto

Looking in src/lib/libcrypto/Makefile I find indeed 

DES_SHLIB_MAJOR != cd ${.CURDIR}/../libdes && make print-shlib-major
DES_SHLIB_MINOR != cd ${.CURDIR}/../libdes && make print-shlib-minor

change make into ${MAKE} ${MAKEFLAGS}

Similar things happen in
    src/lib/libcom_err/compile_et/Makefile:
and src/lib/libasn1/asn1_compile/Makefile:

LIBROKEN!=      cd ${.CURDIR}/../../libroken && ${MAKE} print-objdir

(add ${MAKEFLAGS} to preserve -m option)

    src/lib/libasn1/Makefile:
and src/lib/libkrb5/Makefile:
and src/lib/libhdb/Makefile:

COMPILEET!=     cd ${.CURDIR}/../libcom_err/compile_et && make print-objdir

ASN1COMPILE!=   cd ${.CURDIR}/asn1_compile && ${MAKE} print-objdir

Similar instances (using just make or ${MAKE} instead of ${MAKE}
${MAKEFLAGS}) occur in the Makefiles in libgssapi, libkadm, libkadm5,
libkadm5clnt, libkadm5srv, libkrb5.

I'll turn this into a pr.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert - rhialto@polder   -- Ah only did well at school
\X/ land.nl      -- tae git intae an O level class tae git away fae Begbie.
Hi! I am a .signature virus. Copy me into your .signature to help me spead.