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