Module Name: src Committed By: mrg Date: Sun Dec 13 09:27:13 UTC 2009
Modified Files: src/compat: Makefile Added Files: src/compat: archdirs.mk compatsubdir.mk Log Message: - 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 To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/compat/Makefile cvs rdiff -u -r0 -r1.1 src/compat/archdirs.mk src/compat/compatsubdir.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/compat/Makefile diff -u src/compat/Makefile:1.4 src/compat/Makefile:1.5 --- src/compat/Makefile:1.4 Sun Jun 7 22:59:22 2009 +++ src/compat/Makefile Sun Dec 13 09:27:13 2009 @@ -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 -.endif +.include "archdirs.mk" + +SUBDIR= dirshack .WAIT ${ARCHDIR_SUBDIR} + +.endif .endif .include <bsd.subdir.mk> Added files: Index: src/compat/archdirs.mk diff -u /dev/null src/compat/archdirs.mk:1.1 --- /dev/null Sun Dec 13 09:27:13 2009 +++ src/compat/archdirs.mk Sun Dec 13 09:27:13 2009 @@ -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 Index: src/compat/compatsubdir.mk diff -u /dev/null src/compat/compatsubdir.mk:1.1 --- /dev/null Sun Dec 13 09:27:13 2009 +++ src/compat/compatsubdir.mk Sun Dec 13 09:27:13 2009 @@ -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