Home | History | Annotate | Line # | Download | only in host-mkdep
      1 #	$NetBSD: Makefile,v 1.16 2020/06/13 10:49:17 lukem 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 CONFIGURE_ARGS=	--cache-file=config.cache
     23 .if ${MAKEVERBOSE} == 0
     24 CONFIGURE_ARGS+=--silent
     25 .endif
     26 
     27 realall: host-mkdep
     28 host-mkdep: configure host-mkdep.in
     29 	-rm -f $@
     30 	${CONFIGURE_ENV} ${HOST_SH} ${.CURDIR}/configure ${CONFIGURE_ARGS}
     31 	chmod +x $@
     32 
     33 # Use uninstalled copy of the install program
     34 INSTALL_OBJ!=	cd ${NETBSDSRCDIR}/tools/binstall && ${PRINTOBJDIR}
     35 INSTALL=	${INSTALL_OBJ}/xinstall
     36 
     37 # Install rule, copied from src/tools/Makefile.host.
     38 # We can't include Makefile.host because there is no HOST_SRCDIR
     39 # corresponding to host-mkdep.
     40 #
     41 realinstall: install.host
     42 install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
     43 ${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
     44 	${_MKTARGET_INSTALL}
     45 	mkdir -p ${HOST_BINDIR}
     46 	${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
     47 
     48 .if ${MKUPDATE} == "no"
     49 .PHONY:		${HOST_BINDIR}/${HOSTPROGNAME}
     50 .endif
     51 
     52 # Run by hand, then "configure" script committed:
     53 regen:
     54 	cd ${.CURDIR} && ${TOOLDIR}/bin/${_TOOL_PREFIX}autoconf
     55