diff --git a/configure.in b/configure.in index 99c4a9170d..5e2c0b8aef 100644 --- a/configure.in +++ b/configure.in @@ -37,6 +37,8 @@ src/comerr/test/Makefile \ src/config/Makefile \ src/config/Makefile.config \ src/config/Makefile.version-NOCML \ +src/config/shlib-build \ +src/config/shlib-install \ src/des/Makefile \ src/des/test/Makefile \ src/dir/Makefile \ @@ -120,5 +122,7 @@ src/vol/Makefile \ src/vol/test/Makefile \ src/volser/Makefile \ src/xstat/Makefile \ -src/helper-splint.sh \ -) +src/helper-splint.sh, + +[chmod a+x src/config/shlib-build + chmod a+x src/config/shlib-install]) diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 index dd309966cd..152496be03 100644 --- a/src/cf/osconf.m4 +++ b/src/cf/osconf.m4 @@ -747,7 +747,7 @@ case $AFS_SYSNAME in XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" LD="/usr/ccs/bin/ld" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -768,7 +768,7 @@ case $AFS_SYSNAME in LD="/usr/ccs/bin/ld" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -790,7 +790,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -812,7 +812,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -834,7 +834,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -856,7 +856,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" LWP_OPTMZ="-g" ;; @@ -878,7 +878,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" ;; sunx86_58) @@ -899,7 +899,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" ;; sunx86_59) @@ -920,7 +920,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" ;; sunx86_510) @@ -941,7 +941,7 @@ case $AFS_SYSNAME in XLIBELFA="-lelf" XLIBKVM="-lkvm" XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl" - SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text" + SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text" ;; esac diff --git a/src/config/.cvsignore b/src/config/.cvsignore index 176458763c..951c21542c 100644 --- a/src/config/.cvsignore +++ b/src/config/.cvsignore @@ -15,4 +15,6 @@ Makefile.sun4x_56 Makefile.sun4x_57 param.h.new Makefile.config +shlib-build +shlib-install stamp-h1 diff --git a/src/config/shlib-build.in b/src/config/shlib-build.in new file mode 100644 index 0000000000..6e466999d8 --- /dev/null +++ b/src/config/shlib-build.in @@ -0,0 +1,121 @@ +#!/bin/sh +# +# Builds a shared library, incorporating the random portability work that we +# have to do. Gets the basic information from Autoconf and knows how to find +# the appropriate system-specific map or version file and set library SONAMEs. +# +# This is not libtool. If it appears to be in danger of evolving into +# libtool, please shoot it and start over, possibly by rewriting AFS in Ada. + +# We take the following regular arguments: -d , -f , -l +# , -M , and -m . If -f is given, it overrides -l and +# specifies the complete filename of the shared library to build. We then +# expect a -- option indicating the end of our arguments and the rest of the +# arguments are passed along verbatim to the linker. + +linker="@SHLIB_LINKER@" +suffix="@SHLIB_SUFFIX@" +sysname="@AFS_SYSNAME@" + +library= +major= +minor= +srcdir=. +done= +while [ -z "$done" ] && [ $# -gt 0 ] ; do + case "$1" in + -d) + shift + srcdir="$1" + shift + ;; + -f) + shift + filename="$1" + shift + ;; + -l) + shift + library="$1" + shift + ;; + -M) + shift + major="$1" + shift + ;; + -m) + shift + minor="$1" + shift + ;; + --) + shift + done=yes + ;; + *) + echo 'Usage: shlib-build -l -M -m -- ...' >&2 + exit 1 + ;; + esac +done +if [ -z "$library" ] ; then + echo 'Usage: shlib-install -l -M -m ' >&2 + exit 1 +fi + +# Print out what we're doing while we do it for debugging. +export= +if [ -z "$filename" ] ; then + if [ -z "$major" ] ; then + filename="$library.$suffix" + soname= + else + filename="$library.$suffix.$major.$minor" + soname="$library.$suffix.$major" + fi +fi +case $sysname in +rs_aix*) + if [ -f "$srcdir/$library.exp" ] ; then + export="-bE:$srcdir/$library.exp" + fi + echo "$linker $export -o $filename $*" + $linker $export -o "$filename" "$@" + ;; +sun*_5*) + if [ -f "$srcdir/$library.map" ] ; then + export="-Wl,-M$srcdir/$library.map" + fi + if [ -z "$soname" ] ; then + echo "$linker $export -o $filename $*" + $linker $export -o "$filename" "$@" + else + echo "$linker $export -h $soname -o $filename $*" + $linker $export -h "$soname" -o "$filename" "$@" + fi + ;; +*_linux*) + if [ -f "$srcdir/$library.map" ] ; then + export="-Wl,--version-script=$srcdir/$library.map" + fi + if [ -z "$soname" ] ; then + echo "$linker $export -o $filename $*" + $linker $export -o "$filename" "$@" + else + echo "$linker $export -Wl,-h,$soname -o $filename $*" + $linker $export -Wl,-h,"$soname" -o "$filename" "$@" + fi + ;; +hp_ux*) + if [ -f "$srcdir/$library.hp" ] ; then + export="-c $srcdir/$library.hp" + fi + echo "$linker $export -o $filename $*" + $linker $export -o "$filename" "$@" + ;; +*) + echo "$linker -o $filename $*" + $linker -o "$filename" "$@" + ;; +esac diff --git a/src/config/shlib-install.in b/src/config/shlib-install.in new file mode 100644 index 0000000000..33955d72c6 --- /dev/null +++ b/src/config/shlib-install.in @@ -0,0 +1,79 @@ +#!/bin/sh +# +# Install a shared library, doing the appropriate portable linking depending +# on the platform. We don't deal with rpath. +# +# This is not libtool. If it appears to be in danger of evolving into +# libtool, please shoot it and start over, possibly by rewriting AFS in Ada. + +# We take the following regular arguments: -d , -l , -M +# , -m . + +INSTALL="@INSTALL@" +install="@INSTALL_DATA@" +suffix="@SHLIB_SUFFIX@" +sysname="@AFS_SYSNAME@" + +library= +major= +minor= +while [ $# -gt 0 ] ; do + case "$1" in + -d) + shift + dest="$1" + shift + ;; + -l) + shift + library="$1" + shift + ;; + -M) + shift + major="$1" + shift + ;; + -m) + shift + minor="$1" + shift + ;; + *) + echo 'Usage: shlib-install -d -l -M -m ' >&2 + exit 1 + ;; + esac +done +if [ -z "$library" ] || [ -z "$dest" ] ; then + echo 'Usage: shlib-install -d -l -M -m ' >&2 + exit 1 +fi + +if [ -z "$major" ] ; then + filename="$library.$suffix" +else + filename="$library.$suffix.$major.$minor" +fi +case $sysname in +rs_aix*) + $install "$filename" "$dest/$library.$suffix.shared" + ;; +hp_ux*) + if [ -z "$major" ] ; then + $install "$filename" "$dest/$library.$suffix" + else + $install "$filename" "$dest/$library.$suffix.$major" + ln -s -f "$library.$suffix.$major" "$dest/$library.$suffix" + fi + ;; +*) + if [ -z "$major" ] ; then + $install "$filename" "$dest/$library.$suffix" + else + $install "$filename" $dest/"$filename" + ln -s -f "$filename" "$dest/$library.$suffix" + ln -s -f "$filename" "$dest/$library.$suffix.$major" + fi + ;; +esac diff --git a/src/kopenafs/.cvsignore b/src/kopenafs/.cvsignore index 88e4cc6941..48bf75a49d 100644 --- a/src/kopenafs/.cvsignore +++ b/src/kopenafs/.cvsignore @@ -1,5 +1,6 @@ AFS_component_version_number.c Makefile -libkopenafs.* +libkopenafs.a* +libkopenafs.so* test-setpag test-unlog diff --git a/src/kopenafs/Makefile.in b/src/kopenafs/Makefile.in index eb470edfa0..37be450925 100644 --- a/src/kopenafs/Makefile.in +++ b/src/kopenafs/Makefile.in @@ -20,7 +20,7 @@ INCLUDES = -I. -I${srcdir} -I../sys CFLAGS = ${COMMON_CFLAGS} ${INCLUDES} ${MT_CFLAGS} ${SHLIB_CFLAGS} SYS = ${srcdir}/../sys -SYSOBJS = glue.o pioctl.o setpag.o syscall.o +SYSOBJS = glue.o pioctl.o setpag.o LIBOBJS = kopenafs.o ${SYSOBJS} AFS_component_version_number.o LIBKOPENAFS = libkopenafs.${SHLIB_SUFFIX}.${MAJOR}.${MINOR} @@ -29,11 +29,8 @@ all: ${TOP_LIBDIR}/${LIBKOPENAFS} ${TOP_LIBDIR}/libkopenafs.a \ ${TOP_INCDIR}/kopenafs.h ${TOP_LIBDIR}/${LIBKOPENAFS}: ${LIBKOPENAFS} - ${INSTALL_DATA} ${LIBKOPENAFS} ${TOP_LIBDIR}/${LIBKOPENAFS} - -ln -f -s ${LIBKOPENAFS} \ - ${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX} - -ln -f -s ${LIBKOPENAFS} \ - ${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX}.${MAJOR} + ../config/shlib-install -d ${TOP_LIBDIR} \ + -l libkopenafs -M ${MAJOR} -m ${MINOR} ${TOP_LIBDIR}/libkopenafs.a: libkopenafs.a ${INSTALL_DATA} libkopenafs.a $@ @@ -53,47 +50,41 @@ setpag.o: ${SYS}/setpag.c ${SYS}/afssyscalls.h # This file is only actually used on SGI and AIX, but some systems can't cope # with an empty .o file being included in a link. syscall.o: ${SYS}/syscall.s - @set -x; case "$(SYS_NAME)" in \ + @set -e; set -x; case "$(SYS_NAME)" in \ sgi_*) \ ${CC} ${CFLAGS} -c ${SYS}/syscall.s; \ ;; \ - *fbsd* | *obsd* | *nbsd*) \ - ${CCOBJ} -E ${SFLAGS} syscall.s > syscall.S ; \ - ${AS} syscall.S -o syscall.o ; \ - $(RM) -f syscall.S; \ - ;; \ - rs_aix*) \ + rs_aix* | hp_ux10*) \ /lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \ as -o syscall.o syscall.ss; \ $(RM) syscall.ss; \ ;; \ *) \ - touch syscall.o; \ + touch syscall.o ; \ ;; \ esac libkopenafs.a: ${LIBOBJS} ${RM} -f $@ - ${AR} crv $@ ${LIBOBJS} + @set -e; set -x; case "$(SYS_NAME)" in \ + sgi_* | rs_aix* | hp_ux10*) \ + ${AR} crv $@ ${LIBOBJS} syscall.o ;; \ + *) \ + ${AR} crv $@ ${LIBOBJS} ;; \ + esac ${RANLIB} $@ ${LIBKOPENAFS}: ${LIBOBJS} - case ${SYS_NAME} in \ - rs_aix*) \ - ${SHLIB_LINKER} -o ${LIBKOPENAFS} ${LIBOBJS} \ - -bE:${srcdir}/kopenafs.exp ${MT_LIBS}; \ - ;; \ - sun*_5*) \ - ${SHLIB_LINKER} -h libafsrpc.${SHLIB_SUFFIX}.${MAJOR} \ - -o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \ - ;; \ - *_linux*) \ - ${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${MAJOR} \ - -Wl,--version-script=${srcdir}/mapfile \ - -o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \ + @set -e; set -x; case ${SYS_NAME} in \ + sgi_* | rs_aix* | hp_ux10*) \ + ../config/shlib-build -d $(srcdir) -l libkopenafs \ + -M ${MAJOR} -m ${MINOR} -- \ + ${LIBOBJS} syscall.o ${MT_LIBS} ; \ ;; \ *) \ - ${SHLIB_LINKER} -o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \ + ../config/shlib-build -d $(srcdir) -l libkopenafs \ + -M ${MAJOR} -m ${MINOR} -- \ + ${LIBOBJS} ${MT_LIBS} ; \ ;; \ esac @@ -110,28 +101,23 @@ install: ${LIBKOPENAFS} ${INSTALL} -d ${DESTDIR}${libdir} ${INSTALL} -d ${DESTDIR}${includedir} ${INSTALL_DATA} libkopenafs.a ${DESTDIR}${libdir}/libkopenafs.a - ${INSTALL_DATA} ${LIBKOPENAFS} ${DESTDIR}${libdir}/${LIBKOPENAFS} - -ln -f -s ${LIBKOPENAFS} \ - ${DESTDIR}${libdir}/libkopenafs.${SHLIB_SUFFIX} - -ln -f -s ${LIBKOPENAFS} \ - ${DESTDIR}${libdir}/libkopenafs.${SHLIB_SUFFIX}.${MAJOR} ${INSTALL_DATA} kopenafs.h ${DESTDIR}${includedir}/kopenafs.h + ../config/shlib-install -d ${DESTDIR}${libdir} \ + -l libkopenafs -M ${MAJOR} -m ${MINOR} dest: ${LIBKOPENAFS} ${INSTALL} -d ${DEST}/lib ${INSTALL} -d ${DEST}/include ${INSTALL_DATA} libkopenafs.a ${DEST}/lib/libkopenafs.a - ${INSTALL_DATA} ${LIBKOPENAFS} ${DEST}/lib/${LIBKOPENAFS} - -ln -f -s ${LIBKOPENAFS} \ - ${DEST}/lib/libkopenafs.${SHLIB_SUFFIX} - -ln -f -s ${LIBKOPENAFS} \ - ${DEST}/lib/libkopenafs.${SHLIB_SUFFIX}.${MAJOR} ${INSTALL_DATA} kopenafs.h ${DEST}/include/kopenafs.h + ../config/shlib-install -d ${DEST}/lib \ + -l libkopenafs -M ${MAJOR} -m ${MINOR} # # Misc targets # clean: - $(RM) -f *.o *.a ${LIBKOPENAFS} AFS_component_version_number.c + $(RM) -f *.o *.a ${LIBKOPENAFS} AFS_component_version_number.c \ + test-setpag test-unlog include ../config/Makefile.version diff --git a/src/kopenafs/kopenafs.exp b/src/kopenafs/libkopenafs.exp similarity index 100% rename from src/kopenafs/kopenafs.exp rename to src/kopenafs/libkopenafs.exp diff --git a/src/kopenafs/mapfile b/src/kopenafs/libkopenafs.map similarity index 100% rename from src/kopenafs/mapfile rename to src/kopenafs/libkopenafs.map diff --git a/src/pam/Makefile.in b/src/pam/Makefile.in index 024f3847ca..07156e88e6 100644 --- a/src/pam/Makefile.in +++ b/src/pam/Makefile.in @@ -48,46 +48,13 @@ afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o - set -x; \ - case "$(SYS_NAME)" in \ - hp_ux* | ia64_hpux*) \ - $(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \ - afs_setcred.o afs_auth.o afs_util.o \ - $(SHOBJS) $(LIBS) ;; \ - sun*_5*) \ - $(LD) $(LDFLAGS) -M ${srcdir}/mapfile -o $@ \ - afs_setcred.o afs_auth.o afs_util.o \ - $(SHOBJS) $(LIBS) ;; \ - *linux*) \ - $(CC) $(LDFLAGS) -o $@ afs_setcred.o \ - afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\ - *fbsd*| *nbsd*) \ - $(CC) $(LDFLAGS) -o $@ afs_setcred.o \ - afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\ - * ) \ - echo No link line for system $(SYS_NAME). ;; \ - esac + ../config/shlib-build -d $(srcdir) -f pam_afs.so.1 -l pam_afs -- \ + afs_setcred.o afs_auth.o afs_util.o ${SHOBJS} ${LIBS} pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o - set -x; \ - case "$(SYS_NAME)" in \ - hp_ux* | ia64_hpux*) \ - $(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \ - afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \ - $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \ - sun*_5*) \ - $(LD) $(LDFLAGS) -M ${srcdir}/mapfile -o $@ \ - afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \ - $(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \ - *linux*) \ - $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \ - afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\ - *fbsd*| *nbsd*) \ - $(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \ - afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\ - * ) \ - echo No link line for system $(SYS_NAME). ;; \ - esac + ../config/shlib-build -d $(srcdir) -f pam_afs.krb.so.1 -l pam_afs -- \ + afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \ + ${SHOBJS} ${KLIBS} test_pam: test_pam.o set -x; \ diff --git a/src/pam/mapfile.hp b/src/pam/pam_afs.hp similarity index 100% rename from src/pam/mapfile.hp rename to src/pam/pam_afs.hp diff --git a/src/pam/mapfile b/src/pam/pam_afs.map similarity index 100% rename from src/pam/mapfile rename to src/pam/pam_afs.map diff --git a/src/shlibafsauthent/.cvsignore b/src/shlibafsauthent/.cvsignore index b318ac5183..8b2d65ecf4 100644 --- a/src/shlibafsauthent/.cvsignore +++ b/src/shlibafsauthent/.cvsignore @@ -1,2 +1,4 @@ Makefile -libafsauthent.so.1.0 +libafsauthent.a.* +libafsauthent.sl* +libafsauthent.so* diff --git a/src/shlibafsauthent/Makefile.in b/src/shlibafsauthent/Makefile.in index 302cc4eeaf..dd3c28e376 100644 --- a/src/shlibafsauthent/Makefile.in +++ b/src/shlibafsauthent/Makefile.in @@ -103,31 +103,24 @@ LIBAFSAUTHENT = libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}.${LIBAFSAUTH all: ${TOP_LIBDIR}/${LIBAFSAUTHENT} ${TOP_LIBDIR}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT} - ${INSTALL_DATA} ${LIBAFSAUTHENT} ${TOP_LIBDIR}/${LIBAFSAUTHENT} - -ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} + ../config/shlib-install -d ${TOP_LIBDIR} \ + -l libafsauthent \ + -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} install: ${LIBAFSAUTHENT} - ${INSTALL_DATA} ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/${LIBAFSAUTHENT} - -ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}.${LIBFASAUTHENTMAJOR} + ../config/shlib-install -d ${DESTDIR}${libdir} \ + -l libafsauthent \ + -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} dest: ${LIBAFSAUTHENT} - ${INSTALL_DATA} ${LIBAFSAUTHENT} ${DEST}/lib/${LIBAFSAUTHENT} - -ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} + ../config/shlib-install -d ${DEST}/lib \ + -l libafsauthent \ + -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} ${LIBAFSAUTHENT}: ${LIBOBJS} - case ${SYS_NAME} in \ - rs_aix4*) \ - ${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -bE:afsauthent.exp -lafsrpc ${MT_LIBS};; \ - sun*_5*) \ - ${SHLIB_LINKER} -h libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \ - *_linux*) \ - ${SHLIB_LINKER} -Wl,-h,libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \ - *) \ - ${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \ - esac + ../config/shlib-build -d $(srcdir) -l libafsauthent \ + -M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} -- \ + ${LIBOBJS} ${MT_LIBS} audit.o: ${AUDIT}/audit.c ${CCRULE} @@ -281,4 +274,4 @@ pioctl.o: ${SYS}/pioctl.c ${CCRULE} clean: - $(RM) -f *.o *.a libafsauthent* + $(RM) -f *.o *.a libafsauthent.a* libafsauthent.sl* libafsauthent.so* diff --git a/src/shlibafsauthent/afsauthent.exp b/src/shlibafsauthent/libafsauthent.exp similarity index 100% rename from src/shlibafsauthent/afsauthent.exp rename to src/shlibafsauthent/libafsauthent.exp diff --git a/src/shlibafsauthent/mapfile b/src/shlibafsauthent/libafsauthent.map similarity index 100% rename from src/shlibafsauthent/mapfile rename to src/shlibafsauthent/libafsauthent.map diff --git a/src/shlibafsrpc/.cvsignore b/src/shlibafsrpc/.cvsignore index ca4b2c5750..2a3afb8659 100644 --- a/src/shlibafsrpc/.cvsignore +++ b/src/shlibafsrpc/.cvsignore @@ -1,2 +1,4 @@ Makefile -libafsrpc.so.1.1 +libafsrpc.a* +libafsrpc.sl* +libafsrpc.so* diff --git a/src/shlibafsrpc/Makefile.in b/src/shlibafsrpc/Makefile.in index 59d7f14364..b89734cb7d 100644 --- a/src/shlibafsrpc/Makefile.in +++ b/src/shlibafsrpc/Makefile.in @@ -137,31 +137,21 @@ LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR} all: ${TOP_LIBDIR}/${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC} - ${INSTALL_DATA} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC} - -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} + ../config/shlib-install -d ${TOP_LIBDIR} \ + -l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR} install: ${LIBAFSRPC} - ${INSTALL_DATA} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC} - -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} + ../config/shlib-install -d ${DESTDIR}${libdir} \ + -l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR} dest: ${LIBAFSRPC} - ${INSTALL_DATA} ${LIBAFSRPC} ${DEST}/lib/${LIBAFSRPC} - -ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX} - -ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} + ../config/shlib-install -d ${DEST}/lib \ + -l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR} ${LIBAFSRPC}: ${LIBOBJS} - case ${SYS_NAME} in \ - rs_aix4* | rs_aix5*) \ - ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:${srcdir}/afsrpc.exp ${MT_LIBS};; \ - sun*_5*) \ - ${SHLIB_LINKER} -h libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \ - *_linux*) \ - ${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \ - *) \ - ${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \ - esac + ../config/shlib-build -d $(srcdir) -l libafsrpc \ + -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR} -- \ + ${LIBOBJS} ${MT_LIBS} rx_event.o: ${RX}/rx_event.c ${CCRULE} @@ -417,4 +407,4 @@ afsaux.o: ${FSINT}/afsaux.c ${CCRULE} clean: - $(RM) -f *.o libafsrpc* + $(RM) -f *.o libafsrpc.a* libafsrpc.sl* libafsrpc.so* diff --git a/src/shlibafsrpc/afsrpc.exp b/src/shlibafsrpc/libafsrpc.exp similarity index 100% rename from src/shlibafsrpc/afsrpc.exp rename to src/shlibafsrpc/libafsrpc.exp diff --git a/src/shlibafsrpc/mapfile b/src/shlibafsrpc/libafsrpc.map similarity index 100% rename from src/shlibafsrpc/mapfile rename to src/shlibafsrpc/libafsrpc.map diff --git a/src/sys/Makefile.in b/src/sys/Makefile.in index 09e366d9a8..85aba821ad 100644 --- a/src/sys/Makefile.in +++ b/src/sys/Makefile.in @@ -1,8 +1,3 @@ -# API version. When something changes, increment as appropriate. -# Ignore at your own risk. -LIBAFSSETPAGMAJOR=1 -LIBAFSSETPAGMINOR=0 - # Copyright 2000, International Business Machines Corporation and others. # All Rights Reserved. # @@ -19,7 +14,8 @@ CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCF SFLAGS=-I${TOP_INCDIR} LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS} -OBJECTS= afssyscalls.o setpag.o pioctl.o glue.o syscall.o +OBJECTS= afssyscalls.o setpag.o pioctl.o glue.o \ + AFS_component_version_number.o SHLIBOBJS = picobj/setpag.o picobj/glue.o syscall.o RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o @@ -80,39 +76,32 @@ depinstall: \ Krmtsys.cs.c Krmtsys.h Krmtsys.xdr.c rmtsys.h libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o - -$(RM) -f $@ - $(AR) crv $@ ${OBJECTS} ${RMTOBJS} \ - AFS_component_version_number.o ${LIBSYS_AIX_EXP} - $(RANLIB) $@ - @set -x; case "${SYS_NAME}" in \ - rs_aix*) \ - $(AR) crv $@ afsl.exp;; \ + $(RM) -f $@ + @set -e; set -x; case "$(SYS_NAME)" in \ + sgi_* | hp_ux10*) \ + ${AR} crv $@ ${OBJECTS} ${RMTOBJS} syscall.o ;; \ + rs_aix*) \ + ${AR} crv $@ ${OBJECTS} ${RMTOBJS} syscall.o afsl.exp ;; \ + *) \ + ${AR} crv $@ ${OBJECTS} ${RMTOBJS} ;; \ esac + $(RANLIB) $@ tests: pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd syscall.o: syscall.s - @set -x; case "$(SYS_NAME)" in \ - sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \ - /usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \ - as -o syscall.o syscall.ss; \ - $(RM) syscall.ss;; \ - sgi_* |*_darwin* ) \ - ${CC} ${CFLAGS} -c ${srcdir}/syscall.s;; \ - alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \ - ${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${srcdir}/syscall.s; \ - ${AS} -o syscall.o syscall.i; \ - $(RM) -f syscall.ss syscall.i;; \ - hp_ux11? ) \ - touch syscall.o;; \ - amd64_fbsd*|i386_*bsd*|*nbsd*) \ - ${CCOBJ} -E ${SFLAGS} syscall.s > syscall.S ; \ - ${AS} syscall.S -o syscall.o ; \ - $(RM) -f syscall.S ;;\ - *) \ + @set -e; set -x; case "$(SYS_NAME)" in \ + sgi_*) \ + ${CC} ${CFLAGS} -c ${SYS}/syscall.s; \ + ;; \ + rs_aix* | hp_ux10*) \ /lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \ - as -o syscall.o syscall.ss; \ - $(RM) syscall.ss;; \ + as -o syscall.o syscall.ss; \ + $(RM) syscall.ss; \ + ;; \ + *) \ + touch syscall.o ; \ + ;; \ esac afssyscalls.o: afssyscalls.c afssyscalls.h diff --git a/src/sys/afssetpag.exp b/src/sys/afssetpag.exp deleted file mode 100644 index 65b79aed0d..0000000000 --- a/src/sys/afssetpag.exp +++ /dev/null @@ -1 +0,0 @@ -lsetpag diff --git a/src/sys/mapfile b/src/sys/mapfile deleted file mode 100644 index e56525739d..0000000000 --- a/src/sys/mapfile +++ /dev/null @@ -1,10 +0,0 @@ -# Export map for libafssetpag, used on Linux and Solaris to restrict -# exports from the shared libraries to just the public ABI. Add symbol -# versioning while we're at it, just in case. - -AFSSETPAG_1.0 { - global: - lsetpag; - local: - *; -};