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

Annotation of src/include/Makefile, Revision 1.7

1.7     ! deraadt     1: #      $OpenBSD$
1.6       deraadt     2: #      $NetBSD: Makefile,v 1.57 1996/04/25 00:55:44 jtc Exp $
1.1       deraadt     3:
                      4: #      @(#)Makefile    5.45.1.1 (Berkeley) 5/6/91
                      5:
                      6: # Doing a make install builds /usr/include
                      7: #
                      8: # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
                      9: # links.
                     10:
                     11: # Missing: mp.h
                     12:
1.4       niklas     13: FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
                     14:        disktab.h dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \
                     15:        grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h link.h locale.h \
                     16:        malloc.h math.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h \
                     17:        nl_types.h paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h resolv.h \
                     18:        search.h setjmp.h sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h \
                     19:        string.h strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
                     20:        unistd.h utime.h utmp.h vis.h
1.1       deraadt    21:
                     22: MFILES=        float.h frame.h stdarg.h varargs.h
                     23: LFILES=        errno.h fcntl.h syslog.h termios.h
                     24:
                     25: DIRS=  arpa protocols rpc rpcsvc
1.5       mickey     26: LDIRS= dev net netinet netccitt netiso netns nfs sys ufs vm ddb
1.1       deraadt    27:
1.7     ! deraadt    28: RDIRS= ../lib/libcurses ../lib/librpcsvc ../lib/libpcap
        !            29:
1.1       deraadt    30: NOOBJ= noobj
                     31:
                     32: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     33: .include <bsd.own.mk>
                     34: SYS_INCLUDE?=  copies
                     35:
1.6       deraadt    36: includes:
1.1       deraadt    37:        @echo installing ${FILES}
                     38:        @-for i in ${FILES}; do \
                     39:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
                     40:                    install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
                     41:        done
                     42:        @echo installing ${DIRS}
                     43:        @-for i in ${DIRS}; do \
                     44:                install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
                     45:                        ${DESTDIR}/usr/include/$$i; \
                     46:                (cd $$i; for j in *.[ih]; do \
                     47:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
                     48:                        install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
                     49:                done); \
                     50:        done
                     51:        @echo installing ${LFILES}
                     52:        @-for i in ${LFILES}; do \
                     53:                rm -f ${DESTDIR}/usr/include/$$i; \
                     54:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     55:        done
                     56:        @echo installing ${MFILES}
                     57:        @-for i in ${MFILES}; do \
                     58:                rm -f ${DESTDIR}/usr/include/$$i; \
                     59:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    60:        done
1.1       deraadt    61:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                     62:        find ${DESTDIR}/usr/include -type f | \
                     63:                xargs chmod a=r
                     64:        find ${DESTDIR}/usr/include -type d | \
                     65:                xargs chmod u=rwx,go=rx
1.7     ! deraadt    66:        @-for i in ${RDIRS}; do \
        !            67:                echo installing in ${.CURDIR}/$$i; \
        !            68:                (cd ${.CURDIR}/$$i; ${MAKE} includes) \
        !            69:        done
1.1       deraadt    70:
                     71: copies:
                     72:        @echo copies: ${LDIRS}
                     73:        @-for i in ${LDIRS}; do \
                     74:                rm -rf ${DESTDIR}/usr/include/$$i; \
                     75:                install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
                     76:                        ${DESTDIR}/usr/include/$$i ; \
                     77:        done
                     78:        cd ../sys; \
                     79:        pax -rw -pa -L \
                     80:            `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
                     81:            'netiso/xebec/*' -print` ${DESTDIR}/usr/include
                     82:        rm -rf ${DESTDIR}/usr/include/machine
                     83:        install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
                     84:                ${DESTDIR}/usr/include/machine
                     85:        pax -rw -pa -s "|../sys/arch/${MACHINE}/include||" \
                     86:            ../sys/arch/${MACHINE}/include/*.h \
                     87:            ${DESTDIR}/usr/include/machine
                     88:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                     89:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                     90:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
                     91:                install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
                     92:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                     93:                pax -rw -pa -s "|../sys/arch/${MACHINE_ARCH}/include||" \
                     94:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                     95:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                     96:        else \
                     97:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                     98:        fi
                     99:
                    100: symlinks:
                    101:        @echo symlinks: ${LDIRS}
                    102:        @for i in ${LDIRS}; do \
                    103:                rm -rf ${DESTDIR}/usr/include/$$i; \
                    104:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    105:        done
                    106:        rm -rf ${DESTDIR}/usr/include/machine
                    107:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/machine
                    108:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    109:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    110:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    111:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    112:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    113:        else \
                    114:                ln -s machine ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    115:        fi
                    116:
1.6       deraadt   117: includes: ${SYS_INCLUDE}
                    118:
1.1       deraadt   119: .include <bsd.prog.mk>