#! /bin/sh # $NetBSD: buildmake.sh.in,v 1.15 2020/06/13 11:39:43 lukem Exp $ # # buildmake.sh.in - Autoconf-processed shell script for building make(1). # : ${NETBSDSRCDIR:=@srcdir@/../..} MKSRCDIR=${NETBSDSRCDIR}/usr.bin/make _CC="@CC@" _CFLAGS="@CPPFLAGS@" _CFLAGS="${_CFLAGS} -D_PATH_DEFSYSPATH=\"${NETBSDSRCDIR}/share/mk\"" _CFLAGS="${_CFLAGS} @DEFS@" _CFLAGS="${_CFLAGS} @CFLAGS@" _LDFLAGS="@LDFLAGS@ @LIBS@" docmd () { case "${MAKEVERBOSE:-2}" in 0) ;; 1) echo " $1 ${2##*/}" ;; *) echo "$3" ;; esac $3 || exit 1 } for f in $MKSRCDIR/*.c $MKSRCDIR/lst.lib/*.c; do docmd "compile " "$f" "${_CC} ${_CFLAGS} -c $f" done docmd " link " "${_TOOL_PREFIX:-nb}make" \ "${_CC} -o ${_TOOL_PREFIX:-nb}make *.o ${_LDFLAGS}"