Makefile revision 1.12
11.12Sapb#	$NetBSD: Makefile,v 1.12 2012/12/02 12:44:06 apb Exp $
21.1Stv
31.12SapbHOSTPROG= 	host-mkdep
41.12SapbHOSTPROGNAME=	${_TOOL_PREFIX}host-mkdep
51.12SapbHOST_BINDIR=	${TOOLDIR}/bin
61.12Sapb
71.12SapbNOMAN=	# defined
81.12SapbSRCS=	# empty
91.1Stv
101.1StvCLEANFILES+=	config.cache config.log config.status host-mkdep
111.1Stv
121.1Stv.include <bsd.hostprog.mk>
131.1Stv
141.11Sapb# XXX: The configure script needs to use awk, but we can't pass
151.11Sapb# AWK=${TOOL_AWK:Q} in CONFIGURE_ENV, because TOOL_AWK is not yet
161.11Sapb# available at the time that host-mkdep is built.  The configure script
171.11Sapb# will try to find some other version of awk.
181.11Sapb#
191.11SapbCONFIGURE_ENV=	CC=${HOST_CC:Q}
201.10Sapb
211.1Stvrealall: host-mkdep
221.1Stvhost-mkdep: configure host-mkdep.in
231.1Stv	-rm -f $@
241.11Sapb	${CONFIGURE_ENV} \
251.11Sapb	    ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache
261.7Schristos	chmod +x $@
271.1Stv
281.12Sapb# Use uninstalled copy of the install program
291.12SapbINSTALL_OBJ!=	cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
301.12SapbINSTALL=	${INSTALL_OBJ}/xinstall
311.12Sapb
321.12Sapb# Install rule, copied from src/tools/Makefile.host.
331.12Sapb# We can't include Makefile.host because there is no HOST_SRCDIR
341.12Sapb# corresponding to host-mkdep.
351.12Sapb#
361.12Sapbrealinstall: install.host
371.12Sapbinstall.host: ${HOST_BINDIR}/${HOSTPROGNAME}
381.12Sapb${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
391.12Sapb	${_MKTARGET_INSTALL}
401.12Sapb	mkdir -p ${HOST_BINDIR}
411.12Sapb	${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
421.12Sapb
431.12Sapb.if ${MKUPDATE} == "no"
441.12Sapb.PHONY:		${HOST_BINDIR}/${HOSTPROGNAME}
451.12Sapb.endif
461.1Stv
471.1Stv# Run by hand, then "configure" script committed:
481.1Stvregen:
491.6Sthorpej	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
50