On Mon, Apr 08, 2002 at 02:49:04PM +0200, Dag-Erling Smorgrav wrote:
> Ruslan Ermilov <[EMAIL PROTECTED]> writes:
> > You're right.  I forgot to relink pam_ssh.so library, and the diff was
> > against the wrong revision.  I will still commit the "const poisoning"
> > patch to libutil, as the impact turned out to be really low.
> 
> Thanks, const poisoning is a Good Thing [tm].
> 
> BTW, could you try to figure out a way we can split up the libpam
> build so the modules can depend on libpam.so?  What I'd like is:
> 
>  1) build static modules
>  2) build static and dynamic libpam
>  3) build dynamic modules (with dependency on libpam.so)
> 
> or
> 
>  1) build dynamic libpam
>  2) build modules (with dependency on libpam.so)
>  3) build static libpam
> 
> or something similar.
> 
Uh oh, here is the version that seems to work.  Once I'm confident it
passes the "make release" test (it has already passed the preliminary
"make buildworld" test), I intend to commit it.

Note that I'm not passing the _NO_LIBPAM_SO_YET to the "depend" stage
intentionally; otherwise, it results in incomplete .depend files.


Cheers,
-- 
Ruslan Ermilov          Sysadmin and DBA,
[EMAIL PROTECTED]           Sunbay Software AG,
[EMAIL PROTECTED]          FreeBSD committer,
+380.652.512.251        Simferopol, Ukraine

http://www.FreeBSD.org  The Power To Serve
http://www.oracle.com   Enabling The Information Age
Index: Makefile.inc1
===================================================================
RCS file: /home/ncvs/src/Makefile.inc1,v
retrieving revision 1.311
diff -u -r1.311 Makefile.inc1
--- Makefile.inc1       13 Nov 2002 13:49:29 -0000      1.311
+++ Makefile.inc1       14 Nov 2002 14:39:46 -0000
@@ -729,7 +729,8 @@
 .endif
 
 _prebuild_libs+= lib/libcom_err lib/libcrypt lib/libkvm lib/libmd \
-               lib/libncurses lib/libopie lib/libradius lib/librpcsvc \
+               lib/libncurses lib/libopie lib/libpam lib/libradius \
+               lib/librpcsvc \
                lib/libsbuf lib/libtacplus lib/libutil lib/libypclnt \
                lib/libz lib/msun
 
@@ -755,7 +756,7 @@
 _generic_libs+=        usr.sbin/pcvt/keycap
 .endif
 
-.for _lib in ${_startup_libs} ${_prebuild_libs} ${_generic_libs}
+.for _lib in ${_startup_libs} ${_prebuild_libs:Nlib/libpam} ${_generic_libs}
 ${_lib}__L: .PHONY
 .if exists(${.CURDIR}/${_lib})
        ${ECHODIR} "===> ${_lib}"; \
@@ -765,6 +766,16 @@
                ${MAKE} DIRPRFX=${_lib}/ install
 .endif
 .endfor
+
+# libpam is special: we need to build static PAM modules before
+# static PAM library, and dynamic PAM library before dynamic PAM
+# modules.
+lib/libpam__L: .PHONY
+       ${ECHODIR} "===> lib/libpam"; \
+               cd ${.CURDIR}/lib/libpam; \
+               ${MAKE} DIRPRFX=lib/libpam/ depend; \
+               ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET all; \
+               ${MAKE} DIRPRFX=lib/libpam/ -D_NO_LIBPAM_SO_YET install
 
 _startup_libs: ${_startup_libs:S/$/__L/}
 _prebuild_libs: ${_prebuild_libs:S/$/__L/}
Index: lib/libpam/modules/Makefile.inc
===================================================================
RCS file: /home/ncvs/src/lib/libpam/modules/Makefile.inc,v
retrieving revision 1.13
diff -u -r1.13 Makefile.inc
--- lib/libpam/modules/Makefile.inc     13 May 2002 10:53:24 -0000      1.13
+++ lib/libpam/modules/Makefile.inc     14 Nov 2002 14:39:46 -0000
@@ -4,7 +4,6 @@
 
 NOINSTALLLIB=  yes
 NOPROFILE=     yes
-SHLIB_NAME?=   ${LIB}.so.${SHLIB_MAJOR}
 
 CFLAGS+=       -I${PAMDIR}/include
 CFLAGS+=       -I${.CURDIR}/../../libpam
@@ -14,8 +13,12 @@
 # This is nasty.
 # For the static case, libpam.a depends on the modules.
 # For the dynamic case, the modules depend on libpam.so.N
-# Punt for the time being until I can figure out how to do it.
-#DPADD+=               ${LIBPAM}
-#LDADD+=               -lpam
+.if defined(_NO_LIBPAM_SO_YET)
+NOPIC=         YES
+.else
+SHLIB_NAME?=   ${LIB}.so.${SHLIB_MAJOR}
+DPADD+=                ${LIBPAM}
+LDADD+=                -lpam
+.endif
 
 .include       "../Makefile.inc"

Attachment: msg46674/pgp00000.pgp
Description: PGP signature

Reply via email to