Annotation of src/include/Makefile, Revision 1.8
1.7 deraadt 1: # $OpenBSD$
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.7 deraadt 31: RDIRS= ../lib/libcurses ../lib/librpcsvc ../lib/libpcap
32:
1.1 deraadt 33: NOOBJ= noobj
34:
35: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
36: .include <bsd.own.mk>
37: SYS_INCLUDE?= copies
38:
1.6 deraadt 39: includes:
1.1 deraadt 40: @echo installing ${FILES}
41: @-for i in ${FILES}; do \
42: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
43: install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
44: done
45: @echo installing ${DIRS}
46: @-for i in ${DIRS}; do \
47: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
48: ${DESTDIR}/usr/include/$$i; \
49: (cd $$i; for j in *.[ih]; do \
50: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
51: install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
52: done); \
53: done
54: @echo installing ${LFILES}
55: @-for i in ${LFILES}; do \
56: rm -f ${DESTDIR}/usr/include/$$i; \
57: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
58: done
59: @echo installing ${MFILES}
60: @-for i in ${MFILES}; do \
61: rm -f ${DESTDIR}/usr/include/$$i; \
62: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 63: done
1.1 deraadt 64: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
65: find ${DESTDIR}/usr/include -type f | \
66: xargs chmod a=r
67: find ${DESTDIR}/usr/include -type d | \
68: xargs chmod u=rwx,go=rx
1.7 deraadt 69: @-for i in ${RDIRS}; do \
70: echo installing in ${.CURDIR}/$$i; \
71: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
72: done
1.1 deraadt 73:
74: copies:
75: @echo copies: ${LDIRS}
76: @-for i in ${LDIRS}; do \
77: rm -rf ${DESTDIR}/usr/include/$$i; \
78: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
79: ${DESTDIR}/usr/include/$$i ; \
80: done
81: cd ../sys; \
82: pax -rw -pa -L \
83: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
84: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
85: rm -rf ${DESTDIR}/usr/include/machine
86: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
87: ${DESTDIR}/usr/include/machine
88: pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
89: ../sys/arch/${MACHINE}/include/*.h \
90: ${DESTDIR}/usr/include/machine
91: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
92: if test ${MACHINE} != ${MACHINE_ARCH} -a \
93: -d ../sys/arch/${MACHINE_ARCH}/include; then \
94: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
95: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
96: pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
97: ../sys/arch/${MACHINE_ARCH}/include/*.h \
98: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
99: else \
100: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
101: fi
102:
103: symlinks:
104: @echo symlinks: ${LDIRS}
105: @for i in ${LDIRS}; do \
106: rm -rf ${DESTDIR}/usr/include/$$i; \
107: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
108: done
109: rm -rf ${DESTDIR}/usr/include/machine
110: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
111: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
112: if test ${MACHINE} != ${MACHINE_ARCH} -a \
113: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
114: ln -s /sys/arch/${MACHINE_ARCH}/include \
115: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
116: else \
117: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
118: fi
119:
1.6 deraadt 120: includes: ${SYS_INCLUDE}
121:
1.1 deraadt 122: .include <bsd.prog.mk>