Annotation of src/include/Makefile, Revision 1.80
1.80 ! deraadt 1: # $OpenBSD: Makefile,v 1.79 2000/02/25 17:37:43 hin 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.78 itojun 13: fstab.h fts.h glob.h grp.h ieeefp.h ifaddrs.h inttypes.h iso646.h \
14: kvm.h langinfo.h libgen.h limits.h locale.h malloc.h math.h md4.h \
15: md5.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
1.54 millert 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 \
1.71 espie 18: stdbool.h stddef.h stdio.h stdlib.h string.h strings.h struct.h sysexits.h \
1.60 deraadt 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.80 ! deraadt 34: LDIRS= crypto ddb dev isofs miscfs net netatalk netccitt netinet \
! 35: netinet6 netipx netiso netns nfs scsi sys ufs uvm vm xfs
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.75 beck 48: WDIRS= ../lib/libssl ../gnu/lib/libgmp ../usr.sbin/httpd
1.66 espie 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
1.76 espie 54: PWDIRS= ../lib/libssl ../usr.sbin/httpd ../gnu/egcs/libf2c
1.61 niklas 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.79 hin 62: RDIRS+= ../kerberosIV
1.9 tholo 63: .endif
1.61 niklas 64:
65: prereq:
1.62 niklas 66: @-for i in ${PRDIRS}; do \
67: echo preparing in ${.CURDIR}/$$i; \
68: (cd ${.CURDIR}/$$i; ${MAKE} prereq) \
69: done
1.61 niklas 70: @-for i in ${PWDIRS}; do \
71: echo preparing in ${.CURDIR}/$$i; \
72: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper prereq) \
73: done
1.1 deraadt 74:
1.6 deraadt 75: includes:
1.1 deraadt 76: @echo installing ${FILES}
77: @-for i in ${FILES}; do \
78: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 79: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 80: done
81: @echo installing ${DIRS}
82: @-for i in ${DIRS}; do \
1.32 downsj 83: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 84: ${DESTDIR}/usr/include/$$i; \
85: (cd $$i; for j in *.[ih]; do \
86: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 87: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1 deraadt 88: done); \
89: done
1.73 beck 90: @rm -f ${DESTDIR}/usr/include/openssl
1.72 deraadt 91: @ln -sf ssl ${DESTDIR}/usr/include/openssl
1.1 deraadt 92: @echo installing ${LFILES}
93: @-for i in ${LFILES}; do \
94: rm -f ${DESTDIR}/usr/include/$$i; \
95: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
96: done
97: @echo installing ${MFILES}
98: @-for i in ${MFILES}; do \
99: rm -f ${DESTDIR}/usr/include/$$i; \
100: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 101: done
1.1 deraadt 102: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
103: find ${DESTDIR}/usr/include -type f | \
104: xargs chmod a=r
105: find ${DESTDIR}/usr/include -type d | \
106: xargs chmod u=rwx,go=rx
1.7 deraadt 107: @-for i in ${RDIRS}; do \
108: echo installing in ${.CURDIR}/$$i; \
109: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47 niklas 110: done
111: @-for i in ${WDIRS}; do \
112: echo installing in ${.CURDIR}/$$i; \
113: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7 deraadt 114: done
1.1 deraadt 115:
116: copies:
117: @echo copies: ${LDIRS}
118: @-for i in ${LDIRS}; do \
119: rm -rf ${DESTDIR}/usr/include/$$i; \
1.32 downsj 120: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 121: ${DESTDIR}/usr/include/$$i ; \
122: done
123: cd ../sys; \
124: pax -rw -pa -L \
125: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
1.77 deraadt 126: 'netiso/xebec/*' '!' -path 'dev/microcode/*' \
127: -print` ${DESTDIR}/usr/include
1.65 espie 128: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32 downsj 129: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65 espie 130: ${DESTDIR}/usr/include/${MACHINE}
1.52 espie 131: pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1 deraadt 132: ../sys/arch/${MACHINE}/include/*.h \
1.65 espie 133: ${DESTDIR}/usr/include/${MACHINE}
1.1 deraadt 134: if test ${MACHINE} != ${MACHINE_ARCH} -a \
135: -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32 downsj 136: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 137: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52 espie 138: pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1 deraadt 139: ../sys/arch/${MACHINE_ARCH}/include/*.h \
140: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
141: fi
1.65 espie 142: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1 deraadt 143:
144: symlinks:
145: @echo symlinks: ${LDIRS}
146: @for i in ${LDIRS}; do \
147: rm -rf ${DESTDIR}/usr/include/$$i; \
148: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
149: done
1.65 espie 150: cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
151: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1 deraadt 152: if test ${MACHINE} != ${MACHINE_ARCH} -a \
153: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
154: ln -s /sys/arch/${MACHINE_ARCH}/include \
155: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
156: fi
1.65 espie 157: ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine ; \
1.1 deraadt 158:
1.6 deraadt 159: includes: ${SYS_INCLUDE}
160:
1.1 deraadt 161: .include <bsd.prog.mk>