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

Annotation of src/include/Makefile, Revision 1.48

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