Annotation of src/include/Makefile, Revision 1.59
1.59 ! millert 1: # $OpenBSD: Makefile,v 1.58 1999/02/01 22:59:15 d 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.53 provos 11: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cast.h cpio.h ctype.h \
1.59 ! millert 12: curses.h db.h dbm.h des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h \
1.54 millert 13: fstab.h fts.h glob.h grp.h ieeefp.h inttypes.h iso646.h kvm.h \
14: langinfo.h libgen.h limits.h locale.h malloc.h math.h md4.h md5.h \
15: memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
16: olf_abi.h paths.h poll.h pwd.h ranlib.h re_comp.h regex.h resolv.h \
17: rmd160.h search.h setjmp.h sgtty.h sha1.h signal.h stab.h stddef.h \
18: stdio.h stdlib.h string.h strings.h struct.h sysexits.h tar.h time.h \
19: ttyent.h tzfile.h 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
1.26 pefo 27:
28: .if (${MACHINE_ARCH} == "mips")
29: MFILES+= link.h dlfcn.h
30: .endif
1.1 deraadt 31:
32: DIRS= arpa protocols rpc rpcsvc
1.57 deraadt 33: LDIRS= dev net netinet netinet6 netccitt netiso netns netipx nfs sys ufs vm ddb \
1.55 art 34: scsi netatalk isofs xfs
1.1 deraadt 35:
1.58 d 36: RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
37: ../lib/libform ../lib/libmenu ../lib/libocurses ../lib/libossaudio \
38: ../lib/libpanel ../lib/librpcsvc ../lib/libskey ../lib/libedit \
1.51 art 39: ../lib/libpcap ../lib/libutil ../lib/libwrap ../lib/libz \
40: ../sys/arch/${MACHINE}
1.7 deraadt 41:
1.56 deraadt 42: WDIRS= ../lib/libssl ../gnu/lib/libg++/libg++ ../gnu/lib/libg++/libio \
1.47 niklas 43: ../gnu/lib/libg++/librx ../gnu/lib/libg++/libstdc++ \
1.49 millert 44: ../gnu/usr.bin/gcc ../gnu/lib/libgmp
1.47 niklas 45:
1.1 deraadt 46: NOOBJ= noobj
47:
48: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
49: .include <bsd.own.mk>
50: SYS_INCLUDE?= copies
1.39 millert 51: .if (${KERBEROS} == "yes")
1.31 downsj 52: RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.9 tholo 53: .endif
1.1 deraadt 54:
1.6 deraadt 55: includes:
1.1 deraadt 56: @echo installing ${FILES}
57: @-for i in ${FILES}; do \
58: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 59: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 60: done
61: @echo installing ${DIRS}
62: @-for i in ${DIRS}; do \
1.32 downsj 63: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 64: ${DESTDIR}/usr/include/$$i; \
65: (cd $$i; for j in *.[ih]; do \
66: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 67: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1 deraadt 68: done); \
69: done
70: @echo installing ${LFILES}
71: @-for i in ${LFILES}; do \
72: rm -f ${DESTDIR}/usr/include/$$i; \
73: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
74: done
75: @echo installing ${MFILES}
76: @-for i in ${MFILES}; do \
77: rm -f ${DESTDIR}/usr/include/$$i; \
78: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 79: done
1.1 deraadt 80: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
81: find ${DESTDIR}/usr/include -type f | \
82: xargs chmod a=r
83: find ${DESTDIR}/usr/include -type d | \
84: xargs chmod u=rwx,go=rx
1.7 deraadt 85: @-for i in ${RDIRS}; do \
86: echo installing in ${.CURDIR}/$$i; \
87: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47 niklas 88: done
89: @-for i in ${WDIRS}; do \
90: echo installing in ${.CURDIR}/$$i; \
91: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7 deraadt 92: done
1.1 deraadt 93:
94: copies:
95: @echo copies: ${LDIRS}
96: @-for i in ${LDIRS}; do \
97: rm -rf ${DESTDIR}/usr/include/$$i; \
1.32 downsj 98: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 99: ${DESTDIR}/usr/include/$$i ; \
100: done
101: cd ../sys; \
102: pax -rw -pa -L \
103: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
104: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
105: rm -rf ${DESTDIR}/usr/include/machine
1.32 downsj 106: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 107: ${DESTDIR}/usr/include/machine
1.52 espie 108: pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1 deraadt 109: ../sys/arch/${MACHINE}/include/*.h \
110: ${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 \
1.32 downsj 114: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 115: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52 espie 116: pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1 deraadt 117: ../sys/arch/${MACHINE_ARCH}/include/*.h \
118: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
119: else \
120: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
121: fi
122:
123: symlinks:
124: @echo symlinks: ${LDIRS}
125: @for i in ${LDIRS}; do \
126: rm -rf ${DESTDIR}/usr/include/$$i; \
127: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
128: done
129: rm -rf ${DESTDIR}/usr/include/machine
130: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
131: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
132: if test ${MACHINE} != ${MACHINE_ARCH} -a \
133: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
134: ln -s /sys/arch/${MACHINE_ARCH}/include \
135: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
136: else \
137: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
138: fi
139:
1.6 deraadt 140: includes: ${SYS_INCLUDE}
141:
1.1 deraadt 142: .include <bsd.prog.mk>