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

Annotation of src/include/Makefile, Revision 1.62

1.62    ! niklas      1: #      $OpenBSD: Makefile,v 1.61 1999/03/02 21:47:33 niklas 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.62    ! niklas     43: # Places using Makefile that needs a prerequisite target met before includes
        !            44: PRDIRS=
        !            45:
1.61      niklas     46: # Directories with an includes target that use Makefile.bsd-wrapper
1.56      deraadt    47: WDIRS= ../lib/libssl ../gnu/lib/libg++/libg++ ../gnu/lib/libg++/libio \
1.47      niklas     48:        ../gnu/lib/libg++/librx ../gnu/lib/libg++/libstdc++ \
1.49      millert    49:        ../gnu/usr.bin/gcc ../gnu/lib/libgmp
1.47      niklas     50:
1.61      niklas     51: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     52: # before includes
                     53: PWDIRS=        ../lib/libssl
                     54:
1.1       deraadt    55: NOOBJ= noobj
                     56:
                     57: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     58: .include <bsd.own.mk>
                     59: SYS_INCLUDE?=  copies
1.39      millert    60: .if (${KERBEROS} == "yes")
1.31      downsj     61: RDIRS+=        ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.62    ! niklas     62: PRDIRS+=../kerberosIV/kadm ../kerberosIV/krb
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
                     90:        @echo installing ${LFILES}
                     91:        @-for i in ${LFILES}; do \
                     92:                rm -f ${DESTDIR}/usr/include/$$i; \
                     93:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     94:        done
                     95:        @echo installing ${MFILES}
                     96:        @-for i in ${MFILES}; do \
                     97:                rm -f ${DESTDIR}/usr/include/$$i; \
                     98:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    99:        done
1.1       deraadt   100:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                    101:        find ${DESTDIR}/usr/include -type f | \
                    102:                xargs chmod a=r
                    103:        find ${DESTDIR}/usr/include -type d | \
                    104:                xargs chmod u=rwx,go=rx
1.7       deraadt   105:        @-for i in ${RDIRS}; do \
                    106:                echo installing in ${.CURDIR}/$$i; \
                    107:                (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47      niklas    108:        done
                    109:        @-for i in ${WDIRS}; do \
                    110:                echo installing in ${.CURDIR}/$$i; \
                    111:                (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7       deraadt   112:        done
1.1       deraadt   113:
                    114: copies:
                    115:        @echo copies: ${LDIRS}
                    116:        @-for i in ${LDIRS}; do \
                    117:                rm -rf ${DESTDIR}/usr/include/$$i; \
1.32      downsj    118:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   119:                        ${DESTDIR}/usr/include/$$i ; \
                    120:        done
                    121:        cd ../sys; \
                    122:        pax -rw -pa -L \
                    123:            `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
                    124:            'netiso/xebec/*' -print` ${DESTDIR}/usr/include
                    125:        rm -rf ${DESTDIR}/usr/include/machine
1.32      downsj    126:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   127:                ${DESTDIR}/usr/include/machine
1.52      espie     128:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1       deraadt   129:            ../sys/arch/${MACHINE}/include/*.h \
                    130:            ${DESTDIR}/usr/include/machine
                    131:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    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:        else \
                    140:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    141:        fi
                    142:
                    143: symlinks:
                    144:        @echo symlinks: ${LDIRS}
                    145:        @for i in ${LDIRS}; do \
                    146:                rm -rf ${DESTDIR}/usr/include/$$i; \
                    147:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    148:        done
                    149:        rm -rf ${DESTDIR}/usr/include/machine
                    150:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
                    151:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    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:        else \
                    157:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    158:        fi
                    159:
1.6       deraadt   160: includes: ${SYS_INCLUDE}
                    161:
1.1       deraadt   162: .include <bsd.prog.mk>