1#! /bin/sh
2#	$NetBSD: buildmake.sh.in,v 1.8 2006/08/26 22:17:48 christos Exp $
3#
4# buildmake.sh.in - Autoconf-processed shell script for building make(1).
5#
6
7: ${HOST_CC="@CC@"}
8: ${HOST_CFLAGS="@CPPFLAGS@ @CFLAGS@"}
9: ${HOST_LDFLAGS="@LDFLAGS@ @LIBS@"}
10: ${runcmd=""}
11
12docmd () {
13	echo "$1"
14	$1 || exit 1
15}
16
17MKSRCDIR=@srcdir@/../../usr.bin/make
18
19for f in $MKSRCDIR/*.c $MKSRCDIR/lst.lib/*.c; do
20	docmd "${HOST_CC} ${HOST_CFLAGS} @DEFS@ -c $f"
21done
22
23docmd "${HOST_CC} ${HOST_CFLAGS} -o ${_TOOL_PREFIX:-nb}make *.o ${HOST_LDFLAGS}"
24