Annotation of src/include/Makefile, Revision 1.61
1.61 ! niklas 1: # $OpenBSD: Makefile,v 1.60 1999/02/26 00:54:00 deraadt 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.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.61 ! niklas 36: # Directories with an includes target
1.58 d 37: RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
38: ../lib/libform ../lib/libmenu ../lib/libocurses ../lib/libossaudio \
39: ../lib/libpanel ../lib/librpcsvc ../lib/libskey ../lib/libedit \
1.51 art 40: ../lib/libpcap ../lib/libutil ../lib/libwrap ../lib/libz \
41: ../sys/arch/${MACHINE}
1.7 deraadt 42:
1.61 ! niklas 43: # Directories with an includes target that use Makefile.bsd-wrapper
1.56 deraadt 44: WDIRS= ../lib/libssl ../gnu/lib/libg++/libg++ ../gnu/lib/libg++/libio \
1.47 niklas 45: ../gnu/lib/libg++/librx ../gnu/lib/libg++/libstdc++ \
1.49 millert 46: ../gnu/usr.bin/gcc ../gnu/lib/libgmp
1.47 niklas 47:
1.61 ! niklas 48: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
! 49: # before includes
! 50: PWDIRS= ../lib/libssl
! 51:
1.1 deraadt 52: NOOBJ= noobj
53:
54: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
55: .include <bsd.own.mk>
56: SYS_INCLUDE?= copies
1.39 millert 57: .if (${KERBEROS} == "yes")
1.31 downsj 58: RDIRS+= ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.9 tholo 59: .endif
1.61 ! niklas 60:
! 61: prereq:
! 62: @-for i in ${PWDIRS}; do \
! 63: echo preparing in ${.CURDIR}/$$i; \
! 64: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper prereq) \
! 65: done
1.1 deraadt 66:
1.6 deraadt 67: includes:
1.1 deraadt 68: @echo installing ${FILES}
69: @-for i in ${FILES}; do \
70: cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40 millert 71: ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1 deraadt 72: done
73: @echo installing ${DIRS}
74: @-for i in ${DIRS}; do \
1.32 downsj 75: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 76: ${DESTDIR}/usr/include/$$i; \
77: (cd $$i; for j in *.[ih]; do \
78: cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40 millert 79: ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1 deraadt 80: done); \
81: done
82: @echo installing ${LFILES}
83: @-for i in ${LFILES}; do \
84: rm -f ${DESTDIR}/usr/include/$$i; \
85: ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
86: done
87: @echo installing ${MFILES}
88: @-for i in ${MFILES}; do \
89: rm -f ${DESTDIR}/usr/include/$$i; \
90: ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2 deraadt 91: done
1.1 deraadt 92: chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
93: find ${DESTDIR}/usr/include -type f | \
94: xargs chmod a=r
95: find ${DESTDIR}/usr/include -type d | \
96: xargs chmod u=rwx,go=rx
1.7 deraadt 97: @-for i in ${RDIRS}; do \
98: echo installing in ${.CURDIR}/$$i; \
99: (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47 niklas 100: done
101: @-for i in ${WDIRS}; do \
102: echo installing in ${.CURDIR}/$$i; \
103: (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7 deraadt 104: done
1.1 deraadt 105:
106: copies:
107: @echo copies: ${LDIRS}
108: @-for i in ${LDIRS}; do \
109: rm -rf ${DESTDIR}/usr/include/$$i; \
1.32 downsj 110: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 111: ${DESTDIR}/usr/include/$$i ; \
112: done
113: cd ../sys; \
114: pax -rw -pa -L \
115: `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
116: 'netiso/xebec/*' -print` ${DESTDIR}/usr/include
117: rm -rf ${DESTDIR}/usr/include/machine
1.32 downsj 118: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 119: ${DESTDIR}/usr/include/machine
1.52 espie 120: pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1 deraadt 121: ../sys/arch/${MACHINE}/include/*.h \
122: ${DESTDIR}/usr/include/machine
123: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
124: if test ${MACHINE} != ${MACHINE_ARCH} -a \
125: -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32 downsj 126: ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1 deraadt 127: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52 espie 128: pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1 deraadt 129: ../sys/arch/${MACHINE_ARCH}/include/*.h \
130: ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
131: else \
132: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
133: fi
134:
135: symlinks:
136: @echo symlinks: ${LDIRS}
137: @for i in ${LDIRS}; do \
138: rm -rf ${DESTDIR}/usr/include/$$i; \
139: ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
140: done
141: rm -rf ${DESTDIR}/usr/include/machine
142: ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
143: rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
144: if test ${MACHINE} != ${MACHINE_ARCH} -a \
145: -d ../sys/arch/${MACHINE_ARCH}/include ; then \
146: ln -s /sys/arch/${MACHINE_ARCH}/include \
147: ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
148: else \
149: ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
150: fi
151:
1.6 deraadt 152: includes: ${SYS_INCLUDE}
153:
1.1 deraadt 154: .include <bsd.prog.mk>