1 # $NetBSD: Makefile,v 1.10 1996/10/20 23:03:07 mrg Exp $ 2 3 # The ``rm -rf''s used below are safe because rm doesn't follow symbolic 4 # links. 5 6 SUBDIR+= arch/${MACHINE} 7 8 .if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "mips") 9 SUBDIR+= lkm 10 .endif 11 12 LFILES= errno.h fcntl.h poll.h syslog.h termios.h 13 MFILES= float.h frame.h stdarg.h varargs.h 14 LDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm 15 16 # Change SYS_INCLUDE in bsd.own.mk or /etc/mk.conf to "symlinks" if you 17 # don't want copies 18 .include <bsd.own.mk> 19 SYS_INCLUDE?= copies 20 21 includes: ${SYS_INCLUDE} 22 @echo installing ${LFILES} 23 @-for i in ${LFILES}; do \ 24 rm -f ${DESTDIR}/usr/include/$$i; \ 25 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 26 done 27 @echo installing ${MFILES} 28 @-for i in ${MFILES}; do \ 29 rm -f ${DESTDIR}/usr/include/$$i; \ 30 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 31 done 32 33 copies: 34 @echo copies: ${LDIRS} 35 @-for i in ${LDIRS}; do \ 36 rm -rf ${DESTDIR}/usr/include/$$i; \ 37 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 38 ${DESTDIR}/usr/include/$$i ; \ 39 done 40 pax -rw -pa -L \ 41 `find ${LDIRS} -follow -type f -name '*.h' '!' -path \ 42 'netiso/xebec/*' -print` ${DESTDIR}/usr/include 43 rm -rf ${DESTDIR}/usr/include/machine 44 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 45 ${DESTDIR}/usr/include/machine 46 pax -rw -pa -s "|arch/${MACHINE}/include||" \ 47 arch/${MACHINE}/include/*.h \ 48 ${DESTDIR}/usr/include/machine 49 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 50 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 51 -d arch/${MACHINE_ARCH}/include; then \ 52 ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 53 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 54 pax -rw -pa -s "|arch/${MACHINE_ARCH}/include||" \ 55 arch/${MACHINE_ARCH}/include/*.h \ 56 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 57 else \ 58 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 59 fi 60 61 symlinks: 62 @echo symlinks: ${LDIRS} 63 @for i in ${LDIRS}; do \ 64 rm -rf ${DESTDIR}/usr/include/$$i; \ 65 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 66 done 67 rm -rf ${DESTDIR}/usr/include/machine 68 ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 69 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 70 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 71 -d arch/${MACHINE_ARCH}/include ; then \ 72 ln -s /sys/arch/${MACHINE_ARCH}/include \ 73 ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 74 else \ 75 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 76 fi 77 78 .include <bsd.subdir.mk> 79