[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / usr.bin / chpass

File: [local] / src / usr.bin / chpass / Makefile (download)

Revision 1.16, Mon Jan 22 21:07:10 2024 UTC (3 months, 3 weeks ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.15: +2 -2 lines

I forgot that chpass(1) and passwd(1) reach-around into libc for
getpwent.c (isn't it horrible), and therefore lack visibility of
the the libc-internal __hash_open() function.  Use -DFORCE_DBOPEN
in chpass/Makefile and passwd/Makefile and adjust getpwent.c to
use the external visible interface.  Is there a better way?

#	$OpenBSD: Makefile,v 1.16 2024/01/22 21:07:10 deraadt Exp $

.include <bsd.own.mk>

PROG=	chpass
SRCS=	chpass.c edit.c field.c table.c util.c getpwent.c
BINOWN=	root
BINMODE=4555
.PATH:	${.CURDIR}/../../lib/libc/gen
LINKS=	${BINDIR}/chpass ${BINDIR}/chfn ${BINDIR}/chpass ${BINDIR}/chsh
CFLAGS+=-I${.CURDIR}/../../lib/libc/include -DFORCE_DBOPEN
DPADD+= ${LIBUTIL}
LDADD+= -lutil

.include <bsd.prog.mk>

getpwent.o: getpwent.c
	${COMPILE.c} -UYP -D'DEF_WEAK(x)=asm("")' \
	    ${.CURDIR}/../../lib/libc/gen/getpwent.c