Annotation of src/include/Makefile, Revision 1.27
1.27 ! etheisen 1: # $OpenBSD: Makefile,v 1.26 1996/10/06 19:59:52 pefo 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.4 niklas 11: FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
1.8 deraadt 12: disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \
13: 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 \
! 17: sha1.h signal.h stab.h stddef.h stdio.h stdlib.h string.h \
! 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.21 mickey 33: LDIRS= dev net netinet netccitt netiso netns netipx nfs sys ufs vm ddb scsi
1.1 deraadt 34:
1.20 downsj 35: RDIRS= ../lib/libcompat ../lib/libcurses ../lib/libform ../lib/libmenu \
1.23 millert 36: ../lib/libocurses ../lib/libpanel ../lib/librpcsvc ../lib/libskey \
37: ../lib/libtermlib ../lib/libedit ../lib/libpcap ../lib/libutil \
38: ../lib/libz ../sys/arch/${MACHINE}
1.7 deraadt 39:
1.1 deraadt 40: NOOBJ= noobj
41:
42: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
43: .include <bsd.own.mk>
44: SYS_INCLUDE?= copies
1.9 tholo 45: .if defined(KERBEROS)
46: RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb ../kerberosIV/ss
47: .endif
1.1 deraadt 48:
1.6 deraadt 49: includes:
1.1 deraadt 50: @echo installing ${FILES}
51: @-for i in ${FILES}; do \
52: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
53: install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
54: done
55: @echo installing ${DIRS}
56: @-for i in ${DIRS}; do \
57: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
58: ${DESTDIR}/usr/include/$$i; \
59: (cd $$i; for j in *.[ih]; do \
60: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
61: install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
62: done); \
63: done
64: @echo installing ${LFILES}
65: @-for i in ${LFILES}; do \
66: rm -f ${DESTDIR}/usr/include/$$i; \
67: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
68: done
69: @echo installing ${MFILES}
70: @-for i in ${MFILES}; do \
71: rm -f ${DESTDIR}/usr/include/$$i; \
72: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 73: done
1.1 deraadt 74: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
75: find ${DESTDIR}/usr/include -type f | \
76: xargs chmod a=r
77: find ${DESTDIR}/usr/include -type d | \
78: xargs chmod u=rwx,go=rx
1.7 deraadt 79: @-for i in ${RDIRS}; do \
80: echo installing in ${.CURDIR}/$$i; \
81: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
82: done
1.1 deraadt 83:
84: copies:
85: @echo copies: ${LDIRS}
86: @-for i in ${LDIRS}; do \
87: rm -rf ${DESTDIR}/usr/include/$$i; \
88: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
89: ${DESTDIR}/usr/include/$$i ; \
90: done
91: cd ../sys; \
92: pax -rw -pa -L \
93: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
94: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
95: rm -rf ${DESTDIR}/usr/include/machine
96: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
97: ${DESTDIR}/usr/include/machine
98: pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
99: ../sys/arch/${MACHINE}/include/*.h \
100: ${DESTDIR}/usr/include/machine
101: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
102: if test ${MACHINE} != ${MACHINE_ARCH} -a \
103: -d ../sys/arch/${MACHINE_ARCH}/include; then \
104: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
105: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
106: pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
107: ../sys/arch/${MACHINE_ARCH}/include/*.h \
108: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
109: else \
110: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
111: fi
112:
113: symlinks:
114: @echo symlinks: ${LDIRS}
115: @for i in ${LDIRS}; do \
116: rm -rf ${DESTDIR}/usr/include/$$i; \
117: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
118: done
119: rm -rf ${DESTDIR}/usr/include/machine
120: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
121: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
122: if test ${MACHINE} != ${MACHINE_ARCH} -a \
123: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
124: ln -s /sys/arch/${MACHINE_ARCH}/include \
125: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
126: else \
127: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
128: fi
129:
1.6 deraadt 130: includes: ${SYS_INCLUDE}
131:
1.1 deraadt 132: .include <bsd.prog.mk>