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