xref: /original-bsd/old/mkhosts/Makefile (revision 6f387ca0)
1*6f387ca0Sbostic#	@(#)Makefile	5.5 (Berkeley) 05/24/90
2f82f42feSbostic
3f82f42feSbosticSRCS=	mkhosts.c
4d3c88db0SbosticMAN8=	mkhosts.0
5d3c88db0Sbostic.PATH:	${.CURDIR}
6f82f42feSbostic
7d3c88db0Sbosticall: mkhosts ${MAN8}
8f82f42feSbostic
9d3c88db0Sbosticmkhosts: ${LIBC} mkhosts.c
10d3c88db0Sbostic	@echo "Mkhosts requires the dbm version of the hostent(3) routines."
11d3c88db0Sbostic	@echo "If gethosts(3) is not in libc, mkhosts will not be installed."
12d3c88db0Sbostic	-${CC} -o ${.TARGET} ${CFLAGS} ${.CURDIR}/${.PREFIX}.c || \
13d3c88db0Sbostic	    cd ${.CURDIR} && ${MAKE} clean
14f82f42feSbostic
15f82f42feSbosticclean:
16d3c88db0Sbostic	rm -f core mkhosts mkhosts.o
17f82f42feSbostic
18f82f42feSbosticcleandir: clean
19d3c88db0Sbostic	rm -f ${MAN8} tags .depend
20f82f42feSbostic
21f82f42feSbosticdepend: ${SRCS}
22d3c88db0Sbostic	mkdep -p ${CFLAGS} ${.ALLSRC}
23f82f42feSbostic
24d3c88db0Sbosticinstall: maninstall
256c84b390Sbostic	-if [ -f mkhosts ]; then \
26d3c88db0Sbostic	    install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
27d3c88db0Sbostic		mkhosts ${DESTDIR}${BINDIR}; \
28d3c88db0Sbostic	else \
29d3c88db0Sbostic		exit 0; \
30d3c88db0Sbostic	fi
31f82f42feSbostic
32f82f42feSbosticlint: ${SRCS}
33d3c88db0Sbostic	cd ${.CURDIR}; lint ${CFLAGS} ${LINTFLAGS} ${SRCS}
34f82f42feSbostic
35f82f42feSbostictags: ${SRCS}
36d3c88db0Sbostic	cd ${.CURDIR}; ctags ${SRCS}
37d3c88db0Sbostic
38*6f387ca0Sbostic.include <bsd.prog.mk>
39