1#	$NetBSD: Makefile,v 1.14 2018/05/01 19:59:47 christos Exp $
2
3.include <bsd.hostinit.mk>
4
5.-include	"${TOOLDIR}/share/compat/defs.mk"
6
7TIMESTAMP=	${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
8
9CLEANFILES+=	lorder
10
11.PATH: ${.CURDIR}/../../usr.bin/lorder
12
13.include <bsd.hostprog.mk>
14
15install: ${TIMESTAMP}
16${TIMESTAMP}: lorder
17	${HOST_INSTALL_FILE} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
18
19lorder: lorder.sh
20	${TOOL_SED} -e "s,/bin/sh,"${HOST_BSHELL:Q}",g" \
21	    -e "s,{JOIN:=.*},{JOIN:="${TOOL_JOIN:Q}"}," \
22	    -e "s,{MKTEMP:=.*},{MKTEMP:="${TOOL_MKTEMP:Q}"}," \
23	    -e "s,{NM:=.*},{NM:="${NM:Q}"}," \
24	    -e "s,{SED:=.*},{SED:="${TOOL_SED:Q}"}," \
25	    < ${.ALLSRC} > ${.TARGET}
26
27realall: lorder
28