1 # $NetBSD: Makefile,v 1.13 2018/05/01 19:59:47 christos Exp $ 2 3 .include <bsd.hostinit.mk> 4 5 HOSTPROG= host-mkdep 6 HOSTPROGNAME= ${_TOOL_PREFIX}host-mkdep 7 HOST_BINDIR= ${TOOLDIR}/bin 8 9 SRCS= # empty 10 11 CLEANFILES+= config.cache config.log config.status host-mkdep 12 13 .include <bsd.hostprog.mk> 14 15 # XXX: The configure script needs to use awk, but we can't pass 16 # AWK=${TOOL_AWK:Q} in CONFIGURE_ENV, because TOOL_AWK is not yet 17 # available at the time that host-mkdep is built. The configure script 18 # will try to find some other version of awk. 19 # 20 CONFIGURE_ENV= CC=${HOST_CC:Q} 21 22 realall: host-mkdep 23 host-mkdep: configure host-mkdep.in 24 -rm -f $@ 25 ${CONFIGURE_ENV} \ 26 ${HOST_SH} ${.CURDIR}/configure --cache-file=config.cache 27 chmod +x $@ 28 29 # Use uninstalled copy of the install program 30 INSTALL_OBJ!= cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR} 31 INSTALL= ${INSTALL_OBJ}/xinstall 32 33 # Install rule, copied from src/tools/Makefile.host. 34 # We can't include Makefile.host because there is no HOST_SRCDIR 35 # corresponding to host-mkdep. 36 # 37 realinstall: install.host 38 install.host: ${HOST_BINDIR}/${HOSTPROGNAME} 39 ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG} 40 ${_MKTARGET_INSTALL} 41 mkdir -p ${HOST_BINDIR} 42 ${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET} 43 44 .if ${MKUPDATE} == "no" 45 .PHONY: ${HOST_BINDIR}/${HOSTPROGNAME} 46 .endif 47 48 # Run by hand, then "configure" script committed: 49 regen: 50 cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf 51