1 # $NetBSD: Makefile,v 1.6 1996/09/29 23:29:17 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 LFILES= errno.h fcntl.h poll.h syslog.h termios.h 9 LDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm 10 11 # Change SYS_INCLUDE in bsd.own.mk or /etc/mk.conf to "symlinks" if you 12 # don't want copies 13 .include <bsd.own.mk> 14 SYS_INCLUDE?= copies 15 16 includes: ${SYS_INCLUDE} 17 @echo installing ${LFILES} 18 @-for i in ${LFILES}; do \ 19 rm -f ${DESTDIR}/usr/include/$$i; \ 20 ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \ 21 done 22 @echo installing ${MFILES} 23 @-for i in ${MFILES}; do \ 24 rm -f ${DESTDIR}/usr/include/$$i; \ 25 ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \ 26 done 27 28 copies: 29 @echo copies: ${LDIRS} 30 @-for i in ${LDIRS}; do \ 31 rm -rf ${DESTDIR}/usr/include/$$i; \ 32 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 33 ${DESTDIR}/usr/include/$$i ; \ 34 done 35 pax -rw -pa -L \ 36 `find ${LDIRS} -follow -type f -name '*.h' '!' -path \ 37 'netiso/xebec/*' -print` ${DESTDIR}/usr/include 38 rm -rf ${DESTDIR}/usr/include/machine 39 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 40 ${DESTDIR}/usr/include/machine 41 pax -rw -pa -s "|arch/${MACHINE}/include||" \ 42 arch/${MACHINE}/include/*.h \ 43 ${DESTDIR}/usr/include/machine 44 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 45 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 46 -d arch/${MACHINE_ARCH}/include; then \ 47 install -d -o ${BINOWN} -g ${BINGRP} -m 755 \ 48 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 49 pax -rw -pa -s "|arch/${MACHINE_ARCH}/include||" \ 50 arch/${MACHINE_ARCH}/include/*.h \ 51 ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 52 else \ 53 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \ 54 fi 55 56 symlinks: 57 @echo symlinks: ${LDIRS} 58 @for i in ${LDIRS}; do \ 59 rm -rf ${DESTDIR}/usr/include/$$i; \ 60 ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \ 61 done 62 rm -rf ${DESTDIR}/usr/include/machine 63 ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine 64 rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH} 65 if test ${MACHINE} != ${MACHINE_ARCH} -a \ 66 -d arch/${MACHINE_ARCH}/include ; then \ 67 ln -s /sys/arch/${MACHINE_ARCH}/include \ 68 ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 69 else \ 70 ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \ 71 fi 72 73 .include <bsd.prog.mk> 74 .include <bsd.subdir.mk> 75