diff options
author | bde <bde@FreeBSD.org> | 1999-03-23 03:41:09 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-03-23 03:41:09 +0000 |
commit | 058bbe3c62f6b237dfe29d81ff580f61e0778da1 (patch) | |
tree | 171325298a9d43bc0c33658a1f2b65a43d677018 /lib/libcrypt/Makefile | |
parent | 9c2168a7db110eba1a53fc1ee5abfd924c688984 (diff) | |
download | FreeBSD-src-058bbe3c62f6b237dfe29d81ff580f61e0778da1.zip FreeBSD-src-058bbe3c62f6b237dfe29d81ff580f61e0778da1.tar.gz |
Simplified using new SYMLINKS macro, mainly to test this macro. The
ifdefs are too ugly for this to be much of a simplification. The
existence tests are even uglier now. Note that the previous commit
was not submitted by me. It missed the point and just added a second
layer of unused removals.
Fixed hard-coded "libcrypt"s. The LCRYPTBASE macro mainly makes
things hard to read, but use it while we have it.
Diffstat (limited to 'lib/libcrypt/Makefile')
-rw-r--r-- | lib/libcrypt/Makefile | 41 |
1 files changed, 15 insertions, 26 deletions
diff --git a/lib/libcrypt/Makefile b/lib/libcrypt/Makefile index 026da79..d5518c8 100644 --- a/lib/libcrypt/Makefile +++ b/lib/libcrypt/Makefile @@ -1,5 +1,5 @@ # -# $Id$ +# $Id: Makefile,v 1.17 1999/01/24 07:48:30 markm Exp $ # LCRYPTBASE= libcrypt @@ -23,35 +23,24 @@ CFLAGS+= -I${.CURDIR}/../libmd -DLIBC_SCCS SONAME= ${LCRYPTBASE}.so.${SHLIB_MAJOR} .endif +# Include this early to pick up the definitions of SHLIB_MAJOR and +# SHLIB_MINOR which are used in the existence tests. +.include "${.CURDIR}/../Makefile.inc" + # We only install the links if they do not already exist. # This may have to be revised - -afterinstall: -.if !defined(NOPIC) - @cd ${DESTDIR}${SHLIBDIR}; \ - if [ ! -e ${LCRYPTSO} ]; then \ - rm -f ${LCRYPTSO}; \ - ln -sf ${LSCRYPTSO} ${LCRYPTSO}; \ - fi +.if !exists(${DESTDIR}${LIBDIR}/${LCRYPTBASE}.a) +SYMLINKS+= ${LSCRYPTBASE}.a ${LIBDIR}/${LCRYPTBASE}.a +.endif +.if !defined(NOPROFILE) && !exists(${DESTDIR}${LIBDIR}/${LCRYPTBASE}_p.a) +SYMLINKS+= ${LSCRYPTBASE}_p.a ${LIBDIR}/${LCRYPTBASE}_p.a .endif -.if !defined(NOPIC) && ${OBJFORMAT} == elf - @cd ${DESTDIR}${SHLIBDIR}; \ - if [ ! -e ${LCRYPTBASE}.so ]; then \ - rm -f ${LCRYPTBASE}.so; \ - ln -sf ${LSCRYPTBASE}.so libcrypt.so; \ - fi +.if !defined(NOPIC) && !exists(${DESTDIR}${SHLIBDIR}/${LCRYPTSO}) +SYMLINKS+= ${LSCRYPTSO} ${SHLIBDIR}/${LCRYPTSO} .endif - @cd ${DESTDIR}${LIBDIR}; \ - if [ ! -e ${LCRYPTBASE}.a ]; then \ - rm -f ${LCRYPTBASE}.a; \ - ln -sf ${LSCRYPTBASE}.a libcrypt.a; \ - fi -.if !defined(NOPROFILE) - @cd ${DESTDIR}${LIBDIR}; \ - if [ ! -e ${LCRYPTBASE}_p.a ]; then \ - rm -f ${LCRYPTBASE}_p.a; \ - ln -sf ${LSCRYPTBASE}_p.a libcrypt_p.a; \ - fi +.if !defined(NOPIC) && ${OBJFORMAT} == elf && \ + !exists(${DESTDIR}${SHLIBDIR}/${LCRYPTBASE}.so) +SYMLINKS+= ${LSCRYPTBASE}.so ${SHLIBDIR}/${LCRYPTBASE}.so .endif .include <bsd.lib.mk> |