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

Annotation of src/include/Makefile, Revision 1.92

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