- Provide HOSTEXEEXT if NOCOMPATLIB
- merge a variable for readability and add an exe suffix where needed.
This commit is contained in:
parent
2b02e3cd5e
commit
e382023f82
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue