Date: Thu, 24 Nov 2011 13:18:59 +0000 (UTC) From: Dag-Erling Smorgrav <des@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r227933 - in head: . lib/libpam/modules Message-ID: <201111241318.pAODIxUh097397@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: des Date: Thu Nov 24 13:18:58 2011 New Revision: 227933 URL: http://svn.freebsd.org/changeset/base/227933 Log: Revert r227841 and part of r227798. We still build libpam in two passes, but we use STATIC_CFLAGS instead of our own private .c.o rule. MFC after: 3 weeks Modified: head/Makefile.inc1 head/lib/libpam/modules/Makefile.inc Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 24 13:13:50 2011 (r227932) +++ head/Makefile.inc1 Thu Nov 24 13:18:58 2011 (r227933) @@ -1230,7 +1230,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1 ${_lib_libgssapi} ${_lib_libipx} \ lib/libkiconv lib/libkvm lib/liblzma lib/libmd \ lib/ncurses/ncurses lib/ncurses/ncursesw \ - lib/libopie ${_lib_libthr} \ + lib/libopie lib/libpam ${_lib_libthr} \ lib/libradius lib/libsbuf lib/libtacplus \ ${_cddl_lib_libumem} \ lib/libutil ${_lib_libypclnt} lib/libz lib/msun \ @@ -1323,7 +1323,7 @@ ${_lib}__PL: .PHONY .endif .endfor -.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} (obj,depend,all,install)"; \ @@ -1335,6 +1335,17 @@ ${_lib}__L: .PHONY .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 (obj,depend,all,install)"; \ + cd ${.CURDIR}/lib/libpam; \ + ${MAKE} DIRPRFX=lib/libpam/ obj; \ + ${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 + _prereq_libs: ${_prereq_libs:S/$/__PL/} _startup_libs: ${_startup_libs:S/$/__L/} _prebuild_libs: ${_prebuild_libs:S/$/__L/} Modified: head/lib/libpam/modules/Makefile.inc ============================================================================== --- head/lib/libpam/modules/Makefile.inc Thu Nov 24 13:13:50 2011 (r227932) +++ head/lib/libpam/modules/Makefile.inc Thu Nov 24 13:18:58 2011 (r227933) @@ -5,8 +5,17 @@ PAMDIR= ${.CURDIR}/../../../../contrib/ NO_INSTALLLIB= NO_PROFILE= -CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam +CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam +# This is nasty. +# For the static case, libpam.a depends on the modules. +# For the dynamic case, the modules depend on libpam.so.N +.if defined(_NO_LIBPAM_SO_YET) +NO_PIC= +.else SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} +DPADD+= ${LIBPAM} +LDADD+= -lpam +.endif .include "../Makefile.inc"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111241318.pAODIxUh097397>