Home | History | Annotate | Line # | Download | only in sys
Makefile revision 1.22.8.1
      1  1.22.8.1   thorpej #	$NetBSD: Makefile,v 1.22.8.1 1997/11/15 01:11:51 thorpej Exp $
      2       1.6       mrg 
      3       1.6       mrg # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
      4       1.6       mrg # links.
      5       1.1       cgd 
      6       1.5        pk SUBDIR+= arch/${MACHINE}
      7      1.10       mrg 
      8      1.16     veego .if (${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "mips" && \
      9      1.15   thorpej      ${MACHINE_ARCH} != "powerpc")
     10      1.13     veego SUBDIR+= lkm
     11      1.10       mrg .endif
     12       1.1       cgd 
     13      1.17   thorpej LFILES=	errno.h fcntl.h md5.h poll.h syslog.h termios.h
     14       1.8       mrg MFILES=	float.h frame.h stdarg.h varargs.h
     15      1.22  drochner LDIRS=	dev isofs net netatalk netinet netccitt netiso netns netnatm nfs miscfs \
     16      1.19        pk 	sys ufs vm 
     17       1.6       mrg 
     18       1.6       mrg # Change SYS_INCLUDE in bsd.own.mk or /etc/mk.conf to "symlinks" if you
     19       1.6       mrg # don't want copies
     20       1.6       mrg .include <bsd.own.mk>
     21       1.6       mrg SYS_INCLUDE?=	copies
     22  1.22.8.1   thorpej 
     23  1.22.8.1   thorpej # If DESTDIR is set, we're probably building a release, so force "copies".
     24  1.22.8.1   thorpej .if defined(DESTDIR) && (${DESTDIR} != "/" && !empty(DESTDIR))
     25  1.22.8.1   thorpej SYS_INCLUDE=	copies
     26  1.22.8.1   thorpej .endif
     27       1.6       mrg 
     28      1.21       cjs .PHONY:	includes
     29      1.21       cjs includes: ${SYS_INCLUDE}
     30       1.6       mrg 	@echo installing ${LFILES}
     31       1.6       mrg 	@-for i in ${LFILES}; do \
     32       1.6       mrg 		rm -f ${DESTDIR}/usr/include/$$i; \
     33       1.6       mrg 		ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
     34       1.6       mrg 	done
     35       1.6       mrg 	@echo installing ${MFILES}
     36       1.6       mrg 	@-for i in ${MFILES}; do \
     37       1.6       mrg 		rm -f ${DESTDIR}/usr/include/$$i; \
     38       1.6       mrg 		ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
     39       1.6       mrg 	done
     40       1.6       mrg 
     41      1.21       cjs .PHONY:	copies
     42      1.21       cjs copies:
     43       1.6       mrg 	@echo copies: ${LDIRS}
     44       1.6       mrg 	@-for i in ${LDIRS}; do \
     45       1.6       mrg 		rm -rf ${DESTDIR}/usr/include/$$i; \
     46       1.9   thorpej 		${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
     47       1.6       mrg 			${DESTDIR}/usr/include/$$i ; \
     48       1.6       mrg 	done
     49       1.6       mrg 	pax -rw -pa -L \
     50       1.6       mrg 	    `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
     51       1.6       mrg 	    'netiso/xebec/*' -print` ${DESTDIR}/usr/include
     52       1.6       mrg 	rm -rf ${DESTDIR}/usr/include/machine
     53       1.9   thorpej 	${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
     54       1.6       mrg 		${DESTDIR}/usr/include/machine
     55       1.6       mrg 	pax -rw -pa -s "|arch/${MACHINE}/include||" \
     56       1.6       mrg 	    arch/${MACHINE}/include/*.h \
     57       1.6       mrg 	    ${DESTDIR}/usr/include/machine   
     58       1.6       mrg 	rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
     59       1.6       mrg 	if test ${MACHINE} != ${MACHINE_ARCH} -a \
     60       1.6       mrg 	    -d arch/${MACHINE_ARCH}/include; then \
     61       1.9   thorpej 		${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
     62      1.11     chuck 		${DESTDIR}/usr/include/${MACHINE_ARCH}; \
     63       1.6       mrg 		pax -rw -pa -s "|arch/${MACHINE_ARCH}/include||" \
     64       1.6       mrg 		    arch/${MACHINE_ARCH}/include/*.h \
     65       1.6       mrg 		    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
     66       1.6       mrg 	else \
     67       1.6       mrg 		ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
     68       1.6       mrg 	fi
     69       1.6       mrg 
     70      1.21       cjs .PHONY:	symlinks
     71      1.21       cjs symlinks:
     72       1.6       mrg 	@echo symlinks: ${LDIRS}
     73       1.6       mrg 	@for i in ${LDIRS}; do \
     74       1.6       mrg 		rm -rf ${DESTDIR}/usr/include/$$i; \
     75       1.6       mrg 		ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
     76       1.6       mrg 	done
     77       1.6       mrg 	rm -rf ${DESTDIR}/usr/include/machine
     78       1.6       mrg 	ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
     79       1.6       mrg 	rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
     80       1.6       mrg 	if test ${MACHINE} != ${MACHINE_ARCH} -a \
     81       1.6       mrg 	    -d arch/${MACHINE_ARCH}/include ; then \
     82       1.6       mrg 		ln -s /sys/arch/${MACHINE_ARCH}/include \
     83       1.6       mrg 		    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
     84       1.6       mrg 	else \
     85       1.6       mrg 		ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
     86       1.6       mrg 	fi
     87       1.6       mrg 
     88       1.1       cgd .include <bsd.subdir.mk>
     89