Annotation of src/include/Makefile, Revision 1.4
1.4 ! niklas 1: # $NetBSD: Makefile,v 1.56 1996/02/05 22:34:09 jtc Exp $
1.1 deraadt 2:
3: # @(#)Makefile 5.45.1.1 (Berkeley) 5/6/91
4:
5: # Doing a make install builds /usr/include
6: #
7: # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
8: # links.
9:
10: # Missing: mp.h
11:
1.4 ! niklas 12: FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
! 13: disktab.h dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \
! 14: grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h link.h locale.h \
! 15: malloc.h math.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h \
! 16: nl_types.h paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h resolv.h \
! 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 \
! 19: unistd.h utime.h utmp.h vis.h
1.1 deraadt 20:
21: MFILES= float.h frame.h stdarg.h varargs.h
22: LFILES= errno.h fcntl.h syslog.h termios.h
1.2 deraadt 23: CFILES= curses.h
1.1 deraadt 24:
25: DIRS= arpa protocols rpc rpcsvc
26: LDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm
27:
28: NOOBJ= noobj
29:
30: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
31: .include <bsd.own.mk>
32: SYS_INCLUDE?= copies
33:
34: realinstall:
35: @echo installing ${FILES}
36: @-for i in ${FILES}; do \
37: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
38: install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
39: done
40: @echo installing ${DIRS}
41: @-for i in ${DIRS}; do \
42: install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
43: ${DESTDIR}/usr/include/$$i; \
44: (cd $$i; for j in *.[ih]; do \
45: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
46: install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
47: done); \
48: done
49: @echo installing ${LFILES}
50: @-for i in ${LFILES}; do \
51: rm -f ${DESTDIR}/usr/include/$$i; \
52: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
53: done
54: @echo installing ${MFILES}
55: @-for i in ${MFILES}; do \
56: rm -f ${DESTDIR}/usr/include/$$i; \
57: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 58: done
59: @echo installing ${CFILES}
60: @-for i in ${CFILES}; do \
61: cmp -s ../lib/libcurses/$$i ${DESTDIR}/usr/include/$$i || \
62: install -c -m 444 ../lib/libcurses/$$i \
63: ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 64: done
65: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
66: find ${DESTDIR}/usr/include -type f | \
67: xargs chmod a=r
68: find ${DESTDIR}/usr/include -type d | \
69: xargs chmod u=rwx,go=rx
70:
71: beforeinstall:
72: install -d -o ${BINOWN} -g ${BINGRP} -m 755 ${DESTDIR}/usr/include
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:
120: .include <bsd.prog.mk>
121:
122: realinstall: ${SYS_INCLUDE}