- Provide HOSTEXEEXT if NOCOMPATLIB

- merge a variable for readability and add an exe suffix where needed.
This commit is contained in:
christos 2013-02-17 00:32:42 +00:00
parent 2b02e3cd5e
commit e382023f82
1 changed files with 10 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.host,v 1.29 2012/12/02 12:48:32 apb Exp $
# $NetBSD: Makefile.host,v 1.30 2013/02/17 00:32:42 christos Exp $
NOINFO= # defined
NOLINT= # defined
@ -9,6 +9,8 @@ NOMAN= # defined
.ifndef NOCOMPATLIB
# Use TOOLDIR copy of libnbcompat and associated *.h files
.-include "${TOOLDIR}/share/compat/defs.mk"
.elif !empty(.MAKE.OS:M*CYGWIN*)
HOSTEXEEXT=.exe
.endif
# Resolve pathnames in variables.
@ -43,6 +45,7 @@ HOSTPROGNAME?= ${HOSTPROG}
HOST_BINDIR?= ${TOOLDIR}/bin
HOST_CPPFLAGS:= ${HOST_CPPFLAGS} ${CPPFLAGS}
HOST_CPPFLAGS:= ${HOST_CPPFLAGS:N-Wp,-iremap,*:N--sysroot=*}
HOST_INSTALLPROG?=${HOST_BINDIR}/${HOSTPROGNAME}${HOSTEXEEXT}
.undef LINKS
SRCS?= ${HOSTPROG}.c
@ -52,14 +55,17 @@ SRCS+= ${HOST_SRCS}
# Install rule.
realinstall: install.host install.files
install.host: ${HOST_BINDIR}/${HOSTPROGNAME}
${HOST_BINDIR}/${HOSTPROGNAME}:: ${HOSTPROG}
install.host: ${HOST_INSTALLPROG}
${HOST_INSTALLPROG}:: ${HOSTPROG}
${_MKTARGET_INSTALL}
mkdir -p ${HOST_BINDIR}
${HOST_INSTALL_FILE} -m ${BINMODE} ${HOSTPROG}${HOSTEXEEXT} ${.TARGET}
.if !empty(.MAKE.OS:M*CYGWIN*)
${NETBSDSRCDIR}/tools/binstall/mkmanifest ${.TARGET}
.endif
.if ${MKUPDATE} == "no"
.PHONY: ${HOST_BINDIR}/${HOSTPROGNAME}
.PHONY: ${HOST_INSTALLPROG}
.endif
install.files: