PERFORCE change 31959 for review
Juli Mallett
jmallett at FreeBSD.org
Tue May 27 19:59:21 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=31959
Change 31959 by jmallett at 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 "<osreldate.h> cannot be used in the kernel, use <sys/param.h>"' >> 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 <bsd.prog.mk>
+
+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 <bsd.prog.mk>
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
More information about the p4-projects
mailing list