diff options
author | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-03-18 06:21:41 +0000 |
---|---|---|
committer | Matthew Dempsky <matthew@cvs.openbsd.org> | 2011-03-18 06:21:41 +0000 |
commit | 0b4fc396775b8075241394f0705aa32a7912a5a1 (patch) | |
tree | 2caca381e0bfda7976602fffe9758c3718f436fa | |
parent | 039a304529d6f63bed86bf9bdf1df132b27ba226 (diff) |
Fix obj directory probing to support cross compiling.
"Go for it" deraadt@
-rw-r--r-- | sys/arch/hp300/stand/Makefile.inc | 38 | ||||
-rw-r--r-- | sys/arch/loongson/stand/Makefile.inc | 14 | ||||
-rw-r--r-- | sys/arch/sgi/stand/Makefile.inc | 14 | ||||
-rw-r--r-- | sys/arch/sparc/stand/Makefile.inc | 14 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/Makefile.inc | 14 |
5 files changed, 33 insertions, 61 deletions
diff --git a/sys/arch/hp300/stand/Makefile.inc b/sys/arch/hp300/stand/Makefile.inc index 3bd8f37a9e9..9b7c413124e 100644 --- a/sys/arch/hp300/stand/Makefile.inc +++ b/sys/arch/hp300/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.9 2007/11/26 10:01:42 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.10 2011/03/18 06:21:40 matthew Exp $ # $NetBSD: Makefile.inc,v 1.7 1997/05/12 07:43:18 thorpej Exp $ BINDIR= /usr/mdec @@ -21,10 +21,8 @@ CPPFLAGS+= -DHEAP_LIMIT="0xffffdfff" ### Figure out what to use for libcommon COMMONDIR= ${.CURDIR}/../common -.if exists(${COMMONDIR}/obj.${MACHINE}) -COMMONOBJDIR= ${COMMONDIR}/obj.${MACHINE} -.elif exists(${COMMONDIR}/obj) -COMMONOBJDIR= ${COMMONDIR}/obj +.if exists(${COMMONDIR}/${__objdir}) +COMMONOBJDIR= ${COMMONDIR}/${__objdir} .else COMMONOBJDIR= ${COMMONDIR} .endif @@ -34,10 +32,8 @@ LIBCOMMON= ${COMMONOBJDIR}/libcommon.a ### Figure out what to use for libsa LIBSADIR= ${.CURDIR}/../libsa -.if exists(${LIBSADIR}/obj.${MACHINE}) -LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} -.elif exists(${LIBSADIR}/obj) -LIBSAOBJDIR= ${LIBSADIR}/obj +.if exists(${LIBSADIR}/${__objdir}) +LIBSAOBJDIR= ${LIBSADIR}/${__objdir} .else LIBSAOBJDIR= ${LIBSADIR} .endif @@ -47,10 +43,8 @@ LIBSA= ${LIBSAOBJDIR}/libsa.a ### Figure out what to use for libsaz LIBSAZDIR= ${.CURDIR}/../libsaz -.if exists(${LIBSAZDIR}/obj.${MACHINE}) -LIBSAZOBJDIR= ${LIBSAZDIR}/obj.${MACHINE} -.elif exists(${LIBSAZDIR}/obj) -LIBSAZOBJDIR= ${LIBSAZDIR}/obj +.if exists(${LIBSAZDIR}/${__objdir}) +LIBSAZOBJDIR= ${LIBSAZDIR}/${__objdir} .else LIBSAZOBJDIR= ${LIBSAZDIR} .endif @@ -60,10 +54,8 @@ LIBSAZ= ${LIBSAZOBJDIR}/libsaz.a ### Figure out what to use for libz LIBZDIR= ${.CURDIR}/../libz -.if exists(${LIBZDIR}/obj.${MACHINE}) -LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} -.elif exists(${LIBZDIR}/obj) -LIBZOBJDIR= ${LIBZDIR}/obj +.if exists(${LIBZDIR}/${__objdir}) +LIBZOBJDIR= ${LIBZDIR}/${__objdir} .else LIBZOBJDIR= ${LIBZDIR} .endif @@ -73,10 +65,8 @@ LIBZ= ${LIBZOBJDIR}/libz.a ### Figure out what to use for mkboot MKBOOTDIR= ${.CURDIR}/../mkboot -.if exists(${MKBOOTDIR}/obj.${MACHINE}) -MKBOOTOBJDIR= ${MKBOOTDIR}/obj.${MACHINE} -.elif exists(${MKBOOTDIR}/obj) -MKBOOTOBJDIR= ${MKBOOTDIR}/obj +.if exists(${MKBOOTDIR}/${__objdir}) +MKBOOTOBJDIR= ${MKBOOTDIR}/${__objdir} .else MKBOOTOBJDIR= ${MKBOOTDIR} .endif @@ -86,10 +76,8 @@ MKBOOT_PROG= ${MKBOOTOBJDIR}/mkboot ### Figure out what to use for stripboot STRIPBOOTDIR= ${.CURDIR}/../stripboot -.if exists(${STRIPBOOTDIR}/obj.${MACHINE}) -STRIPBOOTOBJDIR= ${STRIPBOOTDIR}/obj.${MACHINE} -.elif exists(${STRIPBOOTDIR}/obj) -STRIPBOOTOBJDIR= ${STRIPBOOTDIR}/obj +.if exists(${STRIPBOOTDIR}/${__objdir}) +STRIPBOOTOBJDIR= ${STRIPBOOTDIR}/${__objdir} .else STRIPBOOTOBJDIR= ${STRIPBOOTDIR} .endif diff --git a/sys/arch/loongson/stand/Makefile.inc b/sys/arch/loongson/stand/Makefile.inc index 1bf6cfac139..30b3f82700a 100644 --- a/sys/arch/loongson/stand/Makefile.inc +++ b/sys/arch/loongson/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.1 2010/02/14 22:39:33 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.2 2011/03/18 06:21:40 matthew Exp $ BINDIR= /usr/mdec @@ -25,10 +25,8 @@ LD?= ld ### Figure out what to use for libsa LIBSADIR?= ${.CURDIR}/../libsa -.if exists(${LIBSADIR}/obj.${MACHINE}) -LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} -.elif exists(${LIBSADIR}/obj) -LIBSAOBJDIR= ${LIBSADIR}/obj +.if exists(${LIBSADIR}/${__objdir}) +LIBSAOBJDIR= ${LIBSADIR}/${__objdir} .else LIBSAOBJDIR= ${LIBSADIR} .endif @@ -38,10 +36,8 @@ LIBSA= ${LIBSAOBJDIR}/libsa.a ### Figure out what to use for libz LIBZDIR?= ${.CURDIR}/../libz -.if exists(${LIBZDIR}/obj.${MACHINE}) -LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} -.elif exists(${LIBZDIR}/obj) -LIBZOBJDIR= ${LIBZDIR}/obj +.if exists(${LIBZDIR}/${__objdir}) +LIBZOBJDIR= ${LIBZDIR}/${__objdir} .else LIBZOBJDIR= ${LIBZDIR} .endif diff --git a/sys/arch/sgi/stand/Makefile.inc b/sys/arch/sgi/stand/Makefile.inc index d0a7be610ed..063028b4dcd 100644 --- a/sys/arch/sgi/stand/Makefile.inc +++ b/sys/arch/sgi/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.6 2010/09/14 14:28:05 marco Exp $ +# $OpenBSD: Makefile.inc,v 1.7 2011/03/18 06:21:40 matthew Exp $ # $NetBSD: Makefile.inc,v 1.7 2000/08/20 14:57:16 mrg Exp $ .ifndef __INCLUDED_STAND_MAKEFILE_INC @@ -24,10 +24,8 @@ LIBSA_CPPFLAGS?= -DNEEDS_HEAP_H ### Figure out what to use for libsa LIBSADIR?= ${.CURDIR}/../libsa -.if exists(${LIBSADIR}/obj.${MACHINE}) -LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} -.elif exists(${LIBSADIR}/obj) -LIBSAOBJDIR= ${LIBSADIR}/obj +.if exists(${LIBSADIR}/${__objdir}) +LIBSAOBJDIR= ${LIBSADIR}/${__objdir} .else LIBSAOBJDIR= ${LIBSADIR} .endif @@ -37,10 +35,8 @@ LIBSA= ${LIBSAOBJDIR}/libsa.a ### Figure out what to use for libz LIBZDIR?= ${.CURDIR}/../libz -.if exists(${LIBZDIR}/obj.${MACHINE}) -LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} -.elif exists(${LIBZDIR}/obj) -LIBZOBJDIR= ${LIBZDIR}/obj +.if exists(${LIBZDIR}/${__objdir}) +LIBZOBJDIR= ${LIBZDIR}/${__objdir} .else LIBZOBJDIR= ${LIBZDIR} .endif diff --git a/sys/arch/sparc/stand/Makefile.inc b/sys/arch/sparc/stand/Makefile.inc index ec409ea3fc7..9d816a8d35a 100644 --- a/sys/arch/sparc/stand/Makefile.inc +++ b/sys/arch/sparc/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.16 2010/06/29 21:33:54 miod Exp $ +# $OpenBSD: Makefile.inc,v 1.17 2011/03/18 06:21:40 matthew Exp $ # $NetBSD: Makefile.inc,v 1.5 1996/02/01 22:33:01 mycroft Exp $ BINDIR= /usr/mdec @@ -48,10 +48,8 @@ DEFS= -DSTANDALONE -D_STANDALONE -DRELOC=${RELOC} -DSUN_BOOTPARAMS \ ### Figure out what to use for libsa LIBSADIR= ${.CURDIR}/../libsa -.if exists(${LIBSADIR}/obj.${MACHINE}) -LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} -.elif exists(${LIBSADIR}/obj) -LIBSAOBJDIR= ${LIBSADIR}/obj +.if exists(${LIBSADIR}/${__objdir}) +LIBSAOBJDIR= ${LIBSADIR}/${__objdir} .else LIBSAOBJDIR= ${LIBSADIR} .endif @@ -61,10 +59,8 @@ LIBSA= ${LIBSAOBJDIR}/libsa.a ### Figure out what to use for libz LIBZDIR= ${.CURDIR}/../libz -.if exists(${LIBZDIR}/obj.${MACHINE}) -LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} -.elif exists(${LIBZDIR}/obj) -LIBZOBJDIR= ${LIBZDIR}/obj +.if exists(${LIBZDIR}/${__objdir}) +LIBZOBJDIR= ${LIBZDIR}/${__objdir} .else LIBZOBJDIR= ${LIBZDIR} .endif diff --git a/sys/arch/sparc64/stand/Makefile.inc b/sys/arch/sparc64/stand/Makefile.inc index d79ce2579bc..11b174cfd69 100644 --- a/sys/arch/sparc64/stand/Makefile.inc +++ b/sys/arch/sparc64/stand/Makefile.inc @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.inc,v 1.8 2007/11/26 10:26:02 deraadt Exp $ +# $OpenBSD: Makefile.inc,v 1.9 2011/03/18 06:21:40 matthew Exp $ # $NetBSD: Makefile.inc,v 1.7 2000/08/20 14:57:16 mrg Exp $ .ifndef __INCLUDED_STAND_MAKEFILE_INC @@ -23,10 +23,8 @@ CFLAGS+= -fno-builtin-vprintf -fno-builtin-printf -fno-builtin-putchar ### Figure out what to use for libsa LIBSADIR= ${.CURDIR}/../libsa -.if exists(${LIBSADIR}/obj.${MACHINE}) -LIBSAOBJDIR= ${LIBSADIR}/obj.${MACHINE} -.elif exists(${LIBSADIR}/obj) -LIBSAOBJDIR= ${LIBSADIR}/obj +.if exists(${LIBSADIR}/${__objdir}) +LIBSAOBJDIR= ${LIBSADIR}/${__objdir} .else LIBSAOBJDIR= ${LIBSADIR} .endif @@ -36,10 +34,8 @@ LIBSA= ${LIBSAOBJDIR}/libsa.a ### Figure out what to use for libz LIBZDIR= ${.CURDIR}/../libz -.if exists(${LIBZDIR}/obj.${MACHINE}) -LIBZOBJDIR= ${LIBZDIR}/obj.${MACHINE} -.elif exists(${LIBZDIR}/obj) -LIBZOBJDIR= ${LIBZDIR}/obj +.if exists(${LIBZDIR}/${__objdir}) +LIBZOBJDIR= ${LIBZDIR}/${__objdir} .else LIBZOBJDIR= ${LIBZDIR} .endif |