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