# @(#)Makefile 8.2 (Berkeley) 4/2/94
# $FreeBSD$
-.include <bsd.own.mk>
+.include <src.opts.mk>
.PATH: ${.CURDIR}/../../usr.sbin/pwd_mkdb ${.CURDIR}/../../lib/libc/gen
#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I.
-DPADD= ${LIBCRYPT} ${LIBUTIL}
-LDADD= -lcrypt -lutil
+LIBADD= crypt util
.if ${MK_NIS} != "no"
-DPADD+= ${LIBYPCLNT}
-LDADD+= -lypclnt
+LIBADD+= ypclnt
.endif
LINKS= ${BINDIR}/chpass ${BINDIR}/chfn
beforeinstall:
.for i in chpass chfn chsh ypchpass ypchfn ypchsh
+.if exists(${DESTDIR}${BINDIR}/$i)
-chflags noschg ${DESTDIR}${BINDIR}/$i
+.endif
.endfor
.if !defined(NO_FSCHG)
afterinstall:
- chflags schg ${DESTDIR}${BINDIR}/chpass
+ -chflags schg ${DESTDIR}${BINDIR}/chpass
.endif
.include <bsd.prog.mk>