Annotation of src/include/Makefile, Revision 1.42
1.42 ! provos 1: # $OpenBSD: Makefile,v 1.41 1997/05/30 08:27:22 downsj Exp $
1.8 deraadt 2: # $NetBSD: Makefile,v 1.59 1996/05/15 21:36:43 jtc Exp $
1.1 deraadt 3:
4: # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
5:
6: # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
7: # links.
8:
9: # Missing: mp.h
10:
1.37 provos 11: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cpio.h ctype.h db.h \
1.42 ! provos 12: des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h \
! 13: glob.h grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h locale.h \
1.25 millert 14: malloc.h math.h md4.h md5.h memory.h mpool.h ndbm.h netdb.h \
1.27 etheisen 15: netgroup.h nlist.h nl_types.h olf_abi.h paths.h poll.h pwd.h \
16: ranlib.h re_comp.h regex.h resolv.h search.h setjmp.h sgtty.h \
1.36 millert 17: sha1.h signal.h stab.h stddef.h stdio.h stdlib.h string.h \
1.27 etheisen 18: strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
19: unistd.h utime.h utmp.h vis.h
1.8 deraadt 20:
1.22 pefo 21: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips")
1.8 deraadt 22: FILES+= dlfcn.h link.h
23: .endif
1.1 deraadt 24:
25: MFILES= float.h frame.h stdarg.h varargs.h
26: LFILES= errno.h fcntl.h syslog.h termios.h
1.26 pefo 27:
28: .if (${MACHINE_ARCH} == "mips")
29: MFILES+= link.h dlfcn.h
30: .endif
1.1 deraadt 31:
32: DIRS= arpa protocols rpc rpcsvc
1.28 downsj 33: LDIRS= dev net netinet netccitt netiso netns netipx nfs sys ufs vm ddb \
1.41 downsj 34: scsi
1.1 deraadt 35:
1.29 downsj 36: RDIRS= ../lib/libcom_err ../lib/libcompat ../lib/libcurses ../lib/libform \
37: ../lib/libmenu ../lib/libocurses ../lib/libpanel ../lib/librpcsvc \
1.30 downsj 38: ../lib/libskey ../lib/libss ../lib/libtermlib ../lib/libedit \
1.38 downsj 39: ../lib/libpcap ../lib/libutil ../lib/libwrap ../lib/libz \
40: ../sys/arch/${MACHINE}
1.7 deraadt 41:
1.1 deraadt 42: NOOBJ= noobj
43:
44: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
45: .include <bsd.own.mk>
46: SYS_INCLUDE?= copies
1.39 millert 47: .if (${KERBEROS} == "yes")
1.31 downsj 48: RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.9 tholo 49: .endif
1.1 deraadt 50:
1.6 deraadt 51: includes:
1.1 deraadt 52: @echo installing ${FILES}
53: @-for i in ${FILES}; do \
54: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 55: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 56: done
57: @echo installing ${DIRS}
58: @-for i in ${DIRS}; do \
1.32 downsj 59: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 60: ${DESTDIR}/usr/include/$$i; \
61: (cd $$i; for j in *.[ih]; do \
62: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 63: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1 deraadt 64: done); \
65: done
66: @echo installing ${LFILES}
67: @-for i in ${LFILES}; do \
68: rm -f ${DESTDIR}/usr/include/$$i; \
69: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
70: done
71: @echo installing ${MFILES}
72: @-for i in ${MFILES}; do \
73: rm -f ${DESTDIR}/usr/include/$$i; \
74: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 75: done
1.1 deraadt 76: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
77: find ${DESTDIR}/usr/include -type f | \
78: xargs chmod a=r
79: find ${DESTDIR}/usr/include -type d | \
80: xargs chmod u=rwx,go=rx
1.7 deraadt 81: @-for i in ${RDIRS}; do \
82: echo installing in ${.CURDIR}/$$i; \
83: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
84: done
1.1 deraadt 85:
86: copies:
87: @echo copies: ${LDIRS}
88: @-for i in ${LDIRS}; do \
89: rm -rf ${DESTDIR}/usr/include/$$i; \
1.32 downsj 90: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 91: ${DESTDIR}/usr/include/$$i ; \
92: done
93: cd ../sys; \
94: pax -rw -pa -L \
95: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
96: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
97: rm -rf ${DESTDIR}/usr/include/machine
1.32 downsj 98: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 99: ${DESTDIR}/usr/include/machine
100: pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
101: ../sys/arch/${MACHINE}/include/*.h \
102: ${DESTDIR}/usr/include/machine
103: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
104: if test ${MACHINE} != ${MACHINE_ARCH} -a \
105: -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32 downsj 106: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 107: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
108: pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
109: ../sys/arch/${MACHINE_ARCH}/include/*.h \
110: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
111: else \
112: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
113: fi
114:
115: symlinks:
116: @echo symlinks: ${LDIRS}
117: @for i in ${LDIRS}; do \
118: rm -rf ${DESTDIR}/usr/include/$$i; \
119: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
120: done
121: rm -rf ${DESTDIR}/usr/include/machine
122: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
123: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
124: if test ${MACHINE} != ${MACHINE_ARCH} -a \
125: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
126: ln -s /sys/arch/${MACHINE_ARCH}/include \
127: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
128: else \
129: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
130: fi
131:
1.6 deraadt 132: includes: ${SYS_INCLUDE}
133:
1.1 deraadt 134: .include <bsd.prog.mk>