Wed Jun 14 17:11:39 2017 UTC ()
Unbreak MKPAM=no build

Make cron(8) linkage with PAM conditional.


(kamil)
diff -r1.4 -r1.5 src/external/bsd/cron/bin/cron/Makefile

cvs diff -r1.4 -r1.5 src/external/bsd/cron/bin/cron/Makefile (expand / switch to context diff)
--- src/external/bsd/cron/bin/cron/Makefile 2017/06/09 17:36:29 1.4
+++ src/external/bsd/cron/bin/cron/Makefile 2017/06/14 17:11:39 1.5
@@ -1,13 +1,22 @@
-#	$NetBSD: Makefile,v 1.4 2017/06/09 17:36:29 christos Exp $
+#	$NetBSD: Makefile,v 1.5 2017/06/14 17:11:39 kamil Exp $
 
+.include <bsd.own.mk>
+
 BINDIR=	/usr/sbin
 PROG=	cron
 SRCS=	cron.c database.c do_command.c entry.c env.c job.c \
-	misc.c pam_auth.c popen.c pw_dup.c user.c
-CPPFLAGS+=-I${.CURDIR} -DLOGIN_CAP -DUSE_PAM
-DPADD+=${LIBPAM} ${LIBUTIL}
-LDADD+=-lpam -lutil
+	misc.c popen.c pw_dup.c user.c
+CPPFLAGS+=-I${.CURDIR} -DLOGIN_CAP
+DPADD+=	${LIBUTIL}
+LDADD+=	-lutil
 MAN=	cron.8
+
+.if (${MKPAM} != "no")
+SRCS+=		pam_auth.c
+CPPFLAGS+=	-DUSE_PAM
+DPADD+=		${LIBPAM}
+LDADD+=		-lpam
+.endif
 
 CWARNFLAGS.clang+=	-Wno-string-plus-int