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