Makefile revision 1.5
1# $NetBSD: Makefile,v 1.5 2010/02/20 13:43:31 joerg Exp $ 2 3HOSTPROGNAME= ${_TOOL_PREFIX}mandoc 4HOST_SRCDIR= external/bsd/mdocml/bin/mandoc 5 6NOMAN= # defined 7 8.include <bsd.own.mk> 9.include <bsd.sys.mk> 10 11NETBSD_MINOR!= ${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n 12NETBSD_OSNAME= "NetBSD ${NETBSD_MINOR}" 13 14HOST_CPPFLAGS+= -DOSNAME=${NETBSD_OSNAME:Q} -DHAVE_CONFIG_H -I. 15 16DPSRCS+= config.h 17 18CLEANFILES+= config.log config.h 19 20config.h: config.h.pre config.h.post 21 rm -f config.log 22 ( cat ${DISTDIR}/config.h.pre; \ 23 echo; \ 24 if $(CC) $(CFLAGS) -Werror -c ${DISTDIR}/test-strlcat.c >> config.log 2>&1; then \ 25 echo '#define HAVE_STRLCAT'; \ 26 rm test-strlcat.o; \ 27 fi; \ 28 if $(CC) $(CFLAGS) -Werror -c ${DISTDIR}/test-strlcpy.c >> config.log 2>&1; then \ 29 echo '#define HAVE_STRLCPY'; \ 30 rm test-strlcpy.o; \ 31 fi; \ 32 echo; \ 33 cat ${DISTDIR}/config.h.post \ 34 ) > $@ 35 36.include "${.CURDIR}/../Makefile.host" 37