Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/compat - move the per-platform subdir list into archdirs.mk



details:   https://anonhg.NetBSD.org/src/rev/b9e4520df85c
branches:  trunk
changeset: 749941:b9e4520df85c
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Dec 13 09:27:13 2009 +0000

description:
- move the per-platform subdir list into archdirs.mk
- move the per-ABI subdir list into compatsubdir.mk.  use the new
MAKEDIRTARGETENV support to force a new objdir for compat library builds,
and simply traverse over the normal src path once for each ABI to be
built.  this eliminates all the shadow Makefile's for every library, and
allows multiple compat ABIs to be built for a single platform, such as
both o32 and n64 for mips64's default n32.
- compat/Makefile is merely a subdir provider now, and takes the real
information from archdirs.mk

diffstat:

 compat/Makefile        |  28 ++++++++--------------------
 compat/archdirs.mk     |  15 +++++++++++++++
 compat/compatsubdir.mk |  39 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 62 insertions(+), 20 deletions(-)

diffs (103 lines):

diff -r 795a67a23578 -r b9e4520df85c compat/Makefile
--- a/compat/Makefile   Sun Dec 13 09:25:57 2009 +0000
+++ b/compat/Makefile   Sun Dec 13 09:27:13 2009 +0000
@@ -1,29 +1,17 @@
-#      $NetBSD: Makefile,v 1.4 2009/06/07 22:59:22 christos Exp $
+#      $NetBSD: Makefile,v 1.5 2009/12/13 09:27:13 mrg Exp $
 
-# Build 32-bit compat versions of:
-#      src/gnu/lib/libgcc4 into ${DESTDIR}/usr/lib/<32arch>
-#      src/lib/libc into ${DESTDIR}/usr/lib/<32arch>
-#      src/gnu/lib/ into ${DESTDIR}/usr/lib/<32arch>
-#      src/lib/ into ${DESTDIR}/usr/lib/<32arch>
-#      src/libexec/ld.elf_so into ${DESTDIR}/usr/libexec/ld.elf_so-<32arch>
+# Build multi-abi libaries
 
 .include <bsd.own.mk>
 
-.if ${MKCOMPAT} != "no" && \
-    (${MACHINE_ARCH} == "sparc64" || ${MACHINE_ARCH} == "x86_64")
-
+.if ${MKCOMPAT} != "no"
 .if !make(includes)
-SUBDIR=        gnu/lib/crtstuff4 .WAIT \
-       lib/csu .WAIT \
-       gnu/lib/libgcc4 .WAIT \
-       lib/libc .WAIT \
-       lib/libutil .WAIT \
-       lib gnu/lib .WAIT \
-       external/lib .WAIT \
-       crypto/external/lib .WAIT \
-       libexec/ld.elf_so
+
+.include "archdirs.mk"
+
+SUBDIR=        dirshack .WAIT ${ARCHDIR_SUBDIR}
+
 .endif
-
 .endif
 
 .include <bsd.subdir.mk>
diff -r 795a67a23578 -r b9e4520df85c compat/archdirs.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/archdirs.mk        Sun Dec 13 09:27:13 2009 +0000
@@ -0,0 +1,15 @@
+#      $NetBSD: archdirs.mk,v 1.1 2009/12/13 09:27:13 mrg Exp $
+
+# list of subdirs used per-platform
+
+.if ${MACHINE} == "sparc64"
+ARCHDIR_SUBDIR=        sparc64/sparc
+.endif
+
+.if ${MACHINE} == "amd64"
+ARCHDIR_SUBDIR=        amd64/i386
+.endif
+
+.if (${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el")
+ARCHDIR_SUBDIR=        mips64/64 mips64/o32
+.endif
diff -r 795a67a23578 -r b9e4520df85c compat/compatsubdir.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/compat/compatsubdir.mk    Sun Dec 13 09:27:13 2009 +0000
@@ -0,0 +1,39 @@
+#      $NetBSD: compatsubdir.mk,v 1.1 2009/12/13 09:27:13 mrg Exp $
+
+# Build netbsd libraries.
+
+.include <bsd.own.mk>
+
+.if ${MKCOMPAT} != "no"
+.if !make(includes)
+
+# make sure we get an objdir built early enough
+.include <bsd.prog.mk>
+
+# XXX make this use MAKEOBJDIR
+MAKEDIRTARGETENV=      MAKEOBJDIRPREFIX=${.OBJDIR} MKOBJDIRS=yes MKSHARE=no BSD_MK_COMPAT_FILE=${BSD_MK_COMPAT_FILE}
+
+# XXX fix the "library" list to include all 'external' libs?
+.if defined(BOOTSTRAP_SUBDIRS)
+SUBDIR=        ${BOOTSTRAP_SUBDIRS}
+.else
+SUBDIR= ../../../gnu/lib/crtstuff4 .WAIT \
+       ../../../lib/csu .WAIT \
+       ../../../gnu/lib/libgcc4 .WAIT \
+       ../../../lib/libc .WAIT \
+       ../../../lib/libutil .WAIT \
+       ../../../lib .WAIT \
+       ../../../gnu/lib \
+       ../../../external/bsd/atf/lib \
+       ../../../external/bsd/bind/lib \
+       ../../../external/bsd/libevent/lib \
+       ../../../external/bsd/file/lib \
+       ../../../external/bsd/openldap/lib \
+       ../../../external/gpl3/binutils/lib \
+       ../../../libexec/ld.elf_so
+.endif
+
+.include <bsd.subdir.mk>
+
+.endif
+.endif



Home | Main Index | Thread Index | Old Index