[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / include

Annotation of src/include/Makefile, Revision 1.101

1.101   ! mickey      1: #      $OpenBSD: Makefile,v 1.100 2001/12/30 07:06:53 pvalchev 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.96      pvalchev   23: .if (${MACHINE_ARCH} != "powerpc")
1.8       deraadt    24: FILES+=        dlfcn.h link.h
1.86      hugh       25: .endif
                     26:
                     27: .if (${MACHINE_ARCH} != "vax")
                     28: FILES+= ieeefp.h
1.8       deraadt    29: .endif
1.1       deraadt    30:
                     31: MFILES=        float.h frame.h stdarg.h varargs.h
                     32: LFILES=        errno.h fcntl.h syslog.h termios.h
1.26      pefo       33:
1.96      pvalchev   34: .if (${MACHINE_ARCH} == "powerpc")
1.26      pefo       35: MFILES+= link.h dlfcn.h
                     36: .endif
1.1       deraadt    37:
                     38: DIRS=  arpa protocols rpc rpcsvc
1.95      deraadt    39: LDIRS= crypto ddb dev isofs miscfs net netatalk netccitt netinet altq \
1.99      deraadt    40:        netinet6 netipx netiso netnatm netns nfs scsi sys ufs uvm xfs
1.1       deraadt    41:
1.61      niklas     42: # Directories with an includes target
1.58      d          43: RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
1.64      millert    44:        ../lib/libcurses++ ../lib/libform ../lib/libmenu ../lib/libocurses \
                     45:        ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc ../lib/libskey \
1.97      deraadt    46:        ../lib/libsectok ../lib/libedit ../lib/libpcap ../lib/libutil \
1.100     pvalchev   47:        ../lib/libusbhid ../lib/libwrap ../lib/libz ../lib/libkeynote \
1.98      deraadt    48:        ../gnu/lib/libreadline ../sys/arch/${MACHINE}
1.7       deraadt    49:
1.62      niklas     50: # Places using Makefile that needs a prerequisite target met before includes
                     51: PRDIRS=
                     52:
1.61      niklas     53: # Directories with an includes target that use Makefile.bsd-wrapper
1.88      brad       54: WDIRS= ../lib/libssl ../usr.sbin/httpd ../gnu/egcs/libio \
                     55:        ../gnu/egcs/libstdc++ ../gnu/egcs/libf2c ../gnu/egcs/libobjc \
                     56:        ../gnu/egcs/gcc
1.47      niklas     57:
1.61      niklas     58: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     59: # before includes
1.76      espie      60: PWDIRS=        ../lib/libssl ../usr.sbin/httpd ../gnu/egcs/libf2c
1.61      niklas     61:
1.1       deraadt    62: NOOBJ= noobj
                     63:
                     64: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     65: .include <bsd.own.mk>
                     66: SYS_INCLUDE?=  copies
1.91      espie      67: .if ${KERBEROS:L} == "yes"
1.81      niklas     68: RDIRS+=        ../kerberosIV/lib
                     69: PRDIRS+=../kerberosIV/lib/kadm ../kerberosIV/lib/krb
1.94      hin        70: .endif
                     71: .if ${KERBEROS5:L} == "yes"
                     72: RDIRS+=        ../kerberosV/lib
1.9       tholo      73: .endif
1.61      niklas     74:
                     75: prereq:
1.91      espie      76:        @for i in ${PRDIRS}; do \
1.62      niklas     77:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      78:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     79:        done
1.91      espie      80:        @for i in ${PWDIRS}; do \
1.61      niklas     81:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      82:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
1.61      niklas     83:        done
1.1       deraadt    84:
1.6       deraadt    85: includes:
1.1       deraadt    86:        @echo installing ${FILES}
1.91      espie      87:        @for i in ${FILES}; do \
1.1       deraadt    88:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    89:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    90:        done
                     91:        @echo installing ${DIRS}
1.91      espie      92:        @for i in ${DIRS}; do \
1.32      downsj     93:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    94:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      95:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    96:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    97:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie      98:                done; \
1.1       deraadt    99:        done
1.73      beck      100:        @rm -f ${DESTDIR}/usr/include/openssl
1.72      deraadt   101:        @ln -sf ssl ${DESTDIR}/usr/include/openssl
1.1       deraadt   102:        @echo installing ${LFILES}
1.91      espie     103:        @for i in ${LFILES}; do \
                    104:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   105:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    106:        done
                    107:        @echo installing ${MFILES}
1.91      espie     108:        @for i in ${MFILES}; do \
                    109:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   110:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   111:        done
1.1       deraadt   112:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                    113:        find ${DESTDIR}/usr/include -type f | \
                    114:                xargs chmod a=r
                    115:        find ${DESTDIR}/usr/include -type d | \
                    116:                xargs chmod u=rwx,go=rx
1.91      espie     117:        @for i in ${RDIRS}; do \
1.7       deraadt   118:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     119:                cd ${.CURDIR}/$$i && ${MAKE} includes; \
1.47      niklas    120:        done
1.91      espie     121:        @for i in ${WDIRS}; do \
1.47      niklas    122:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     123:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
1.7       deraadt   124:        done
1.1       deraadt   125:
                    126: copies:
                    127:        @echo copies: ${LDIRS}
1.91      espie     128:        @for i in ${LDIRS}; do \
                    129:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    130:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   131:                        ${DESTDIR}/usr/include/$$i ; \
                    132:        done
                    133:        cd ../sys; \
                    134:        pax -rw -pa -L \
1.101   ! mickey    135:            `find ${LDIRS} -follow -type f -name '*.h' \
        !           136:            '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
1.65      espie     137:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32      downsj    138:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     139:                ${DESTDIR}/usr/include/${MACHINE}
1.52      espie     140:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1       deraadt   141:            ../sys/arch/${MACHINE}/include/*.h \
1.65      espie     142:            ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   143:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    144:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    145:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   146:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52      espie     147:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1       deraadt   148:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    149:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    150:        fi
1.65      espie     151:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   152:
                    153: symlinks:
                    154:        @echo symlinks: ${LDIRS}
                    155:        @for i in ${LDIRS}; do \
1.91      espie     156:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   157:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    158:        done
1.65      espie     159:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
                    160:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   161:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    162:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    163:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    164:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    165:        fi
1.91      espie     166:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   167:
1.6       deraadt   168: includes: ${SYS_INCLUDE}
                    169:
1.91      espie     170: .PHONY: prereq includes copies symlink
1.1       deraadt   171: .include <bsd.prog.mk>