Simplify and correct (previous did not work for !defined(DESTDIR)

This commit is contained in:
christos 2011-04-16 21:41:24 +00:00
parent d8dc3301a0
commit 640ac4b1c5
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.656 2011/04/15 18:05:45 elric Exp $
# $NetBSD: bsd.own.mk,v 1.657 2011/04/16 21:41:24 christos Exp $
# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
@ -207,8 +207,10 @@ FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
OBJC= false
.endif
CPPFLAGS+= ${!defined(HOSTPROG) && !defined(HOSTLIB) && defined(DESTDIR) :? --sysroot=${DESTDIR} :}
LDFLAGS+= ${!defined(HOSTPROG) && !defined(HOSTLIB) && defined(DESTDIR) :? --sysroot=${DESTDIR} :}
.if !defined(HOSTPROG) && !defined(HOSTLIB) && defined(DESTDIR)
CPPFLAGGS+= --sysroot=${DESTDIR}
LDFLAGS+= --sysroot=${DESTDIR}
.endif
.endif # EXTERNAL_TOOLCHAIN # }
HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep