Annotation of src/include/Makefile, Revision 1.90
1.90 ! millert 1: # $OpenBSD: Makefile,v 1.89 2001/03/02 13:27:04 espie 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.87 millert 11: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h bsd_auth.h cast.h cpio.h \
1.82 millert 12: ctype.h curses.h db.h dbm.h des.h dirent.h disktab.h elf_abi.h err.h \
1.86 hugh 13: fnmatch.h fstab.h fts.h glob.h grp.h ifaddrs.h inttypes.h \
1.82 millert 14: iso646.h kvm.h langinfo.h libgen.h limits.h locale.h login_cap.h \
15: malloc.h math.h md4.h md5.h memory.h mpool.h ndbm.h netdb.h netgroup.h \
1.89 espie 16: nlist.h nl_types.h ohash.h olf_abi.h paths.h poll.h pwd.h \
17: ranlib.h re_comp.h \
1.87 millert 18: readpassphrase.h regex.h resolv.h rmd160.h search.h setjmp.h sgtty.h \
19: sha1.h skipjack.h signal.h stab.h stdbool.h stddef.h stdio.h stdlib.h \
20: string.h strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
21: unistd.h utime.h utmp.h vis.h
1.8 deraadt 22:
1.63 rahnds 23: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips") && \
24: (${MACHINE_ARCH} != "powerpc")
1.8 deraadt 25: FILES+= dlfcn.h link.h
1.86 hugh 26: .endif
27:
28: .if (${MACHINE_ARCH} != "vax")
29: FILES+= ieeefp.h
1.8 deraadt 30: .endif
1.1 deraadt 31:
32: MFILES= float.h frame.h stdarg.h varargs.h
33: LFILES= errno.h fcntl.h syslog.h termios.h
1.26 pefo 34:
1.85 rahnds 35: .if (${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "powerpc")
1.26 pefo 36: MFILES+= link.h dlfcn.h
37: .endif
1.1 deraadt 38:
39: DIRS= arpa protocols rpc rpcsvc
1.80 deraadt 40: LDIRS= crypto ddb dev isofs miscfs net netatalk netccitt netinet \
1.84 deraadt 41: netinet6 netipx netiso netnatm netns nfs scsi sys ufs uvm vm xfs
1.1 deraadt 42:
1.61 niklas 43: # Directories with an includes target
1.58 d 44: RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
1.64 millert 45: ../lib/libcurses++ ../lib/libform ../lib/libmenu ../lib/libocurses \
46: ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc ../lib/libskey \
47: ../lib/libedit ../lib/libpcap ../lib/libutil ../lib/libwrap \
1.90 ! millert 48: ../lib/libz ../lib/libkeynote ../gnu/lib/libreadline \
! 49: ../sys/arch/${MACHINE}
1.7 deraadt 50:
1.62 niklas 51: # Places using Makefile that needs a prerequisite target met before includes
52: PRDIRS=
53:
1.61 niklas 54: # Directories with an includes target that use Makefile.bsd-wrapper
1.88 brad 55: WDIRS= ../lib/libssl ../usr.sbin/httpd ../gnu/egcs/libio \
56: ../gnu/egcs/libstdc++ ../gnu/egcs/libf2c ../gnu/egcs/libobjc \
57: ../gnu/egcs/gcc
1.47 niklas 58:
1.61 niklas 59: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
60: # before includes
1.76 espie 61: PWDIRS= ../lib/libssl ../usr.sbin/httpd ../gnu/egcs/libf2c
1.61 niklas 62:
1.1 deraadt 63: NOOBJ= noobj
64:
65: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
66: .include <bsd.own.mk>
67: SYS_INCLUDE?= copies
1.83 espie 68: .if (${KERBEROS:L} == "yes")
1.81 niklas 69: RDIRS+= ../kerberosIV/lib
70: PRDIRS+=../kerberosIV/lib/kadm ../kerberosIV/lib/krb
1.9 tholo 71: .endif
1.61 niklas 72:
73: prereq:
1.62 niklas 74: @-for i in ${PRDIRS}; do \
75: echo preparing in ${.CURDIR}/$$i; \
76: (cd ${.CURDIR}/$$i; ${MAKE} prereq) \
77: done
1.61 niklas 78: @-for i in ${PWDIRS}; do \
79: echo preparing in ${.CURDIR}/$$i; \
80: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper prereq) \
81: done
1.1 deraadt 82:
1.6 deraadt 83: includes:
1.1 deraadt 84: @echo installing ${FILES}
85: @-for i in ${FILES}; do \
86: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 87: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 88: done
89: @echo installing ${DIRS}
90: @-for i in ${DIRS}; do \
1.32 downsj 91: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 92: ${DESTDIR}/usr/include/$$i; \
93: (cd $$i; for j in *.[ih]; do \
94: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 95: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1 deraadt 96: done); \
97: done
1.73 beck 98: @rm -f ${DESTDIR}/usr/include/openssl
1.72 deraadt 99: @ln -sf ssl ${DESTDIR}/usr/include/openssl
1.1 deraadt 100: @echo installing ${LFILES}
101: @-for i in ${LFILES}; do \
102: rm -f ${DESTDIR}/usr/include/$$i; \
103: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
104: done
105: @echo installing ${MFILES}
106: @-for i in ${MFILES}; do \
107: rm -f ${DESTDIR}/usr/include/$$i; \
108: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 109: done
1.1 deraadt 110: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
111: find ${DESTDIR}/usr/include -type f | \
112: xargs chmod a=r
113: find ${DESTDIR}/usr/include -type d | \
114: xargs chmod u=rwx,go=rx
1.7 deraadt 115: @-for i in ${RDIRS}; do \
116: echo installing in ${.CURDIR}/$$i; \
117: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47 niklas 118: done
119: @-for i in ${WDIRS}; do \
120: echo installing in ${.CURDIR}/$$i; \
121: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7 deraadt 122: done
1.1 deraadt 123:
124: copies:
125: @echo copies: ${LDIRS}
126: @-for i in ${LDIRS}; do \
127: rm -rf ${DESTDIR}/usr/include/$$i; \
1.32 downsj 128: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 129: ${DESTDIR}/usr/include/$$i ; \
130: done
131: cd ../sys; \
132: pax -rw -pa -L \
133: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
1.77 deraadt 134: 'netiso/xebec/*' '!' -path 'dev/microcode/*' \
135: -print` ${DESTDIR}/usr/include
1.65 espie 136: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32 downsj 137: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65 espie 138: ${DESTDIR}/usr/include/${MACHINE}
1.52 espie 139: pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1 deraadt 140: ../sys/arch/${MACHINE}/include/*.h \
1.65 espie 141: ${DESTDIR}/usr/include/${MACHINE}
1.1 deraadt 142: if test ${MACHINE} != ${MACHINE_ARCH} -a \
143: -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32 downsj 144: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 145: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52 espie 146: pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1 deraadt 147: ../sys/arch/${MACHINE_ARCH}/include/*.h \
148: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
149: fi
1.65 espie 150: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1 deraadt 151:
152: symlinks:
153: @echo symlinks: ${LDIRS}
154: @for i in ${LDIRS}; do \
155: rm -rf ${DESTDIR}/usr/include/$$i; \
156: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
157: done
1.65 espie 158: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
159: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1 deraadt 160: if test ${MACHINE} != ${MACHINE_ARCH} -a \
161: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
162: ln -s /sys/arch/${MACHINE_ARCH}/include \
163: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
164: fi
1.65 espie 165: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine ; \
1.1 deraadt 166:
1.6 deraadt 167: includes: ${SYS_INCLUDE}
168:
1.1 deraadt 169: .include <bsd.prog.mk>