From owner-p4-projects@FreeBSD.ORG Tue May 27 19:59:21 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 60F3737B404; Tue, 27 May 2003 19:59:20 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1214337B401 for ; Tue, 27 May 2003 19:59:20 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9069243F75 for ; Tue, 27 May 2003 19:59:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h4S2xJ0U072710 for ; Tue, 27 May 2003 19:59:19 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h4S2xJlq072707 for perforce@freebsd.org; Tue, 27 May 2003 19:59:19 -0700 (PDT) Date: Tue, 27 May 2003 19:59:19 -0700 (PDT) Message-Id: <200305280259.h4S2xJlq072707@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 31959 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2003 02:59:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=31959 Change 31959 by jmallett@jmallett_big-lizard on 2003/05/27 19:58:36 IFC this. I'm not very sure I got things totally right here and want to take another look, XXX! Affected files ... .. //depot/projects/mips/include/Makefile#14 integrate Differences ... ==== //depot/projects/mips/include/Makefile#14 (text+ko) ==== @@ -1,10 +1,7 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.196 2003/04/17 14:14:21 nectar Exp $ +# $FreeBSD: src/include/Makefile,v 1.197 2003/05/05 12:54:26 bde Exp $ # -# Doing a make install builds /usr/include -# -# The ``rm -rf''s used below are safe because rm doesn't follow symbolic -# links. +# Doing a "make install" builds /usr/include. CLEANFILES= osreldate.h version vers.c SUBDIR= arpa protocols rpcsvc rpc @@ -39,13 +36,10 @@ fs/fdescfs fs/fifofs fs/msdosfs fs/ntfs fs/nullfs fs/nwfs fs/portalfs \ fs/procfs fs/smbfs fs/umapfs fs/unionfs isofs/cd9660 \ netatm/ipatm netatm/sigpvc netatm/spans netatm/uni \ - netgraph/bluetooth/include \ security/mac_biba security/mac_bsdextended security/mac_lomac\ security/mac_mls security/mac_partition ufs/ffs ufs/ufs -# For SHARED=symlinks, cam, netatm, and netgraph are symlinks, so cam/scsi, -# netatm/*, and netgraph/* are taken care of -LSYMSUBDIRS= ${LSUBDIRS:Ncam/scsi:Nnetatm/*:Nnetgraph/*} +LSUBSUBDIRS= netgraph/bluetooth/include # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is @@ -64,7 +58,7 @@ . ${.CURDIR}/../sys/conf/newvers.sh; \ echo "$$COPYRIGHT" > osreldate.h; \ echo "#ifdef _KERNEL" >> osreldate.h; \ - echo '#error "/usr/include/osreldate.h cannot be used in the kernel, use sys/param.h"' >> osreldate.h; \ + echo '#error " cannot be used in the kernel, use "' >> osreldate.h; \ echo "#else" >> osreldate.h; \ echo \#'undef __FreeBSD_version' >> osreldate.h; \ echo \#'define __FreeBSD_version' $$RELDATE >> osreldate.h; \ @@ -80,57 +74,99 @@ INCSLINKS+= posix4/$i ${INCLUDEDIR}/$i .endfor +.include + +installincludes: ${SHARED} +${SHARED}: compat + +# Take care of stale directory-level symlinks. +compat: +.for i in ${LDIRS} ${LSUBDIRS} machine crypto + if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ + rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ + fi +.endfor + mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \ + -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ + -p ${DESTDIR}${INCLUDEDIR} + copies: -.for i in ${LDIRS} ${LSYMSUBDIRS} platform machine crypto - if [ -L ${DESTDIR}/usr/include/$i ]; then \ - rm -f ${DESTDIR}/usr/include/$i; \ - fi +.for i in ${LDIRS} ${LSUBDIRS} crypto machine machine/pc platform +.if exists(${DESTDIR}${INCLUDEDIR}/$i) + cd ${DESTDIR}${INCLUDEDIR}/$i; \ + for h in *.h; do \ + if [ -L $$h ]; then rm -f $$h; fi; \ + done +.endif .endfor - mtree -deU ${MTREE_FOLLOWS_SYMLINKS} -f ${.CURDIR}/../etc/mtree/BSD.include.dist \ - -p ${DESTDIR}/usr/include -.for i in ${LDIRS} ${LSUBDIRS} +.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} cd ${.CURDIR}/../sys; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ - ${DESTDIR}/usr/include/$i + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 $i/*.h \ + ${DESTDIR}${INCLUDEDIR}/$i .endfor cd ${.CURDIR}/../sys; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \ - ${DESTDIR}/usr/include/crypto + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 opencrypto/*.h \ + ${DESTDIR}${INCLUDEDIR}/crypto .if ${MACHINE_ARCH} != ${MACHINE} && exists(${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}/usr/include/platform + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/platform .endif -.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}/usr/include/machine + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/machine .if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ - ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ - ${DESTDIR}/usr/include/machine/pc + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/machine/pc .endif -.endif symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." .for i in ${LDIRS} - rm -rf ${DESTDIR}/usr/include/$i - ln -s ../../sys/$i ${DESTDIR}/usr/include/$i + cd ${.CURDIR}/../sys/$i; \ + for h in *.h; do \ + ln -fs ../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + done +.endfor +.for i in ${LSUBDIRS} + cd ${.CURDIR}/../sys/$i; \ + for h in *.h; do \ + ln -fs ../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + done .endfor - rm -rf ${DESTDIR}/usr/include/crypto - ln -s ../../sys/opencrypto ${DESTDIR}/usr/include/crypto -.for i in ${LSYMSUBDIRS} - rm -rf ${DESTDIR}/usr/include/$i - ln -s ../../../sys/$i ${DESTDIR}/usr/include/$i +.for i in ${LSUBSUBDIRS} + cd ${.CURDIR}/../sys/$i; \ + for h in *.h; do \ + ln -fs ../../../../../sys/$i/$$h ${DESTDIR}${INCLUDEDIR}/$i; \ + done .endfor - rm -rf ${DESTDIR}/usr/include/platform -.if ${MACHINE_ARCH} != ${MACHINE} && exists(../../sys/${MACHINE_ARCH}/${MACHINE}) - ln -s ../../sys/${MACHINE_ARCH}/${MACHINE} ${DESTDIR}/usr/include/platform -.endif rm -rf ${DESTDIR}/usr/include/machine ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine .include installincludes: ${SHARED} + cd ${.CURDIR}/../sys/opencrypto; \ + for h in *.h; do \ + ln -fs ../../../sys/opencrypto/$$h \ + ${DESTDIR}${INCLUDEDIR}/crypto; \ + done +.if ${MACHINE_ARCH} != ${MACHINE} && exists(${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}) + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/${MACHINE}; \ + for h in *.h; do \ + ln -fs ../../../sys/${MACHINE_ARCH}/${MACHINE}/$$h \ + ${DESTDIR}${INCLUDEDIR}/platform; \ + done + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ + for h in *.h; do \ + ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h \ + ${DESTDIR}${INCLUDEDIR}/machine; \ + done +.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) + cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ + for h in *.h; do \ + ln -fs ../../../../sys/${MACHINE_ARCH}/include/pc/$$h \ + ${DESTDIR}${INCLUDEDIR}/machine/pc; \ + done +.endif