Annotation of src/include/Makefile, Revision 1.19
1.19 ! tholo 1: # $OpenBSD: Makefile,v 1.18 1996/07/24 09:05:05 mickey 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.12 niklas 14: malloc.h math.h md2.h md4.h md5.h memory.h mpool.h ndbm.h netdb.h \
15: netgroup.h nlist.h nl_types.h paths.h poll.h pwd.h ranlib.h re_comp.h \
1.17 downsj 16: regex.h resolv.h \
1.4 niklas 17: search.h setjmp.h sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h \
18: string.h strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
1.16 deraadt 19: unistd.h utime.h utmp.h vis.h
1.8 deraadt 20:
21: .if (${MACHINE_ARCH} != "alpha")
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
27:
28: DIRS= arpa protocols rpc rpcsvc
1.18 mickey 29: LDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm ddb scsi
1.1 deraadt 30:
1.11 deraadt 31: RDIRS= ../lib/libcurses ../lib/libform ../lib/libmenu ../lib/libocurses \
1.14 deraadt 32: ../lib/libpanel ../lib/librpcsvc ../lib/libtermlib ../lib/libedit \
1.19 ! tholo 33: ../lib/libpcap ../lib/libutil ../lib/libz ../sys/arch/${MACHINE}
1.7 deraadt 34:
1.1 deraadt 35: NOOBJ= noobj
36:
37: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
38: .include <bsd.own.mk>
39: SYS_INCLUDE?= copies
1.9 tholo 40: .if defined(KERBEROS)
41: RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb ../kerberosIV/ss
42: .endif
1.1 deraadt 43:
1.6 deraadt 44: includes:
1.1 deraadt 45: @echo installing ${FILES}
46: @-for i in ${FILES}; do \
47: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
48: install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
49: done
50: @echo installing ${DIRS}
51: @-for i in ${DIRS}; do \
52: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
53: ${DESTDIR}/usr/include/$$i; \
54: (cd $$i; for j in *.[ih]; do \
55: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
56: install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
57: done); \
58: done
59: @echo installing ${LFILES}
60: @-for i in ${LFILES}; do \
61: rm -f ${DESTDIR}/usr/include/$$i; \
62: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
63: done
64: @echo installing ${MFILES}
65: @-for i in ${MFILES}; do \
66: rm -f ${DESTDIR}/usr/include/$$i; \
67: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 68: done
1.1 deraadt 69: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
70: find ${DESTDIR}/usr/include -type f | \
71: xargs chmod a=r
72: find ${DESTDIR}/usr/include -type d | \
73: xargs chmod u=rwx,go=rx
1.7 deraadt 74: @-for i in ${RDIRS}; do \
75: echo installing in ${.CURDIR}/$$i; \
76: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
77: done
1.1 deraadt 78:
79: copies:
80: @echo copies: ${LDIRS}
81: @-for i in ${LDIRS}; do \
82: rm -rf ${DESTDIR}/usr/include/$$i; \
83: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
84: ${DESTDIR}/usr/include/$$i ; \
85: done
86: cd ../sys; \
87: pax -rw -pa -L \
88: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
89: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
90: rm -rf ${DESTDIR}/usr/include/machine
91: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
92: ${DESTDIR}/usr/include/machine
93: pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
94: ../sys/arch/${MACHINE}/include/*.h \
95: ${DESTDIR}/usr/include/machine
96: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
97: if test ${MACHINE} != ${MACHINE_ARCH} -a \
98: -d ../sys/arch/${MACHINE_ARCH}/include; then \
99: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
100: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
101: pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
102: ../sys/arch/${MACHINE_ARCH}/include/*.h \
103: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
104: else \
105: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
106: fi
107:
108: symlinks:
109: @echo symlinks: ${LDIRS}
110: @for i in ${LDIRS}; do \
111: rm -rf ${DESTDIR}/usr/include/$$i; \
112: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
113: done
114: rm -rf ${DESTDIR}/usr/include/machine
115: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
116: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
117: if test ${MACHINE} != ${MACHINE_ARCH} -a \
118: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
119: ln -s /sys/arch/${MACHINE_ARCH}/include \
120: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
121: else \
122: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
123: fi
124:
1.6 deraadt 125: includes: ${SYS_INCLUDE}
126:
1.1 deraadt 127: .include <bsd.prog.mk>