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

Annotation of src/include/Makefile, Revision 1.33

1.33    ! etheisen    1: #      $OpenBSD: Makefile,v 1.32 1996/12/08 15:26:51 downsj 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.4       niklas     11: FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
1.8       deraadt    12:        disktab.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \
                     13:        grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h locale.h \
1.25      millert    14:        malloc.h math.h md4.h md5.h memory.h mpool.h ndbm.h netdb.h \
1.27      etheisen   15:        netgroup.h nlist.h nl_types.h olf_abi.h paths.h poll.h pwd.h \
                     16:        ranlib.h re_comp.h regex.h resolv.h search.h setjmp.h sgtty.h \
                     17:        sha1.h signal.h stab.h stddef.h stdio.h stdlib.h string.h \
                     18:        strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
                     19:        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.28      downsj     33: LDIRS= dev net netinet netccitt netiso netns netipx nfs sys ufs vm ddb \
1.33    ! etheisen   34:        scsi ss gnu/ext2fs
1.1       deraadt    35:
1.29      downsj     36: RDIRS= ../lib/libcom_err ../lib/libcompat ../lib/libcurses ../lib/libform \
                     37:        ../lib/libmenu ../lib/libocurses ../lib/libpanel ../lib/librpcsvc \
1.30      downsj     38:        ../lib/libskey ../lib/libss ../lib/libtermlib ../lib/libedit \
                     39:        ../lib/libpcap ../lib/libutil ../lib/libz ../sys/arch/${MACHINE}
1.7       deraadt    40:
1.1       deraadt    41: NOOBJ= noobj
                     42:
                     43: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     44: .include <bsd.own.mk>
                     45: SYS_INCLUDE?=  copies
1.9       tholo      46: .if defined(KERBEROS)
1.31      downsj     47: RDIRS+=        ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.9       tholo      48: .endif
1.1       deraadt    49:
1.6       deraadt    50: includes:
1.1       deraadt    51:        @echo installing ${FILES}
                     52:        @-for i in ${FILES}; do \
                     53:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.32      downsj     54:                    ${INSTALL} ${COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    55:        done
                     56:        @echo installing ${DIRS}
                     57:        @-for i in ${DIRS}; do \
1.32      downsj     58:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    59:                        ${DESTDIR}/usr/include/$$i; \
                     60:                (cd $$i; for j in *.[ih]; do \
                     61:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.32      downsj     62:                        ${INSTALL} ${COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1       deraadt    63:                done); \
                     64:        done
                     65:        @echo installing ${LFILES}
                     66:        @-for i in ${LFILES}; do \
                     67:                rm -f ${DESTDIR}/usr/include/$$i; \
                     68:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     69:        done
                     70:        @echo installing ${MFILES}
                     71:        @-for i in ${MFILES}; do \
                     72:                rm -f ${DESTDIR}/usr/include/$$i; \
                     73:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    74:        done
1.1       deraadt    75:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                     76:        find ${DESTDIR}/usr/include -type f | \
                     77:                xargs chmod a=r
                     78:        find ${DESTDIR}/usr/include -type d | \
                     79:                xargs chmod u=rwx,go=rx
1.7       deraadt    80:        @-for i in ${RDIRS}; do \
                     81:                echo installing in ${.CURDIR}/$$i; \
                     82:                (cd ${.CURDIR}/$$i; ${MAKE} includes) \
                     83:        done
1.1       deraadt    84:
                     85: copies:
                     86:        @echo copies: ${LDIRS}
                     87:        @-for i in ${LDIRS}; do \
                     88:                rm -rf ${DESTDIR}/usr/include/$$i; \
1.32      downsj     89:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    90:                        ${DESTDIR}/usr/include/$$i ; \
                     91:        done
                     92:        cd ../sys; \
                     93:        pax -rw -pa -L \
                     94:            `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
                     95:            'netiso/xebec/*' -print` ${DESTDIR}/usr/include
                     96:        rm -rf ${DESTDIR}/usr/include/machine
1.32      downsj     97:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    98:                ${DESTDIR}/usr/include/machine
                     99:        pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
                    100:            ../sys/arch/${MACHINE}/include/*.h \
                    101:            ${DESTDIR}/usr/include/machine
                    102:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    103:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    104:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    105:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   106:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    107:                pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
                    108:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    109:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    110:        else \
                    111:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    112:        fi
                    113:
                    114: symlinks:
                    115:        @echo symlinks: ${LDIRS}
                    116:        @for i in ${LDIRS}; do \
                    117:                rm -rf ${DESTDIR}/usr/include/$$i; \
                    118:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    119:        done
                    120:        rm -rf ${DESTDIR}/usr/include/machine
                    121:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
                    122:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    123:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    124:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    125:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    126:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    127:        else \
                    128:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    129:        fi
                    130:
1.6       deraadt   131: includes: ${SYS_INCLUDE}
                    132:
1.1       deraadt   133: .include <bsd.prog.mk>