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