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

Annotation of src/include/Makefile, Revision 1.6

1.6     ! deraadt     1: #      $NetBSD: Makefile,v 1.57 1996/04/25 00:55:44 jtc Exp $
1.1       deraadt     2:
                      3: #      @(#)Makefile    5.45.1.1 (Berkeley) 5/6/91
                      4:
                      5: # Doing a make install builds /usr/include
                      6: #
                      7: # The ``rm -rf''s used below are safe because rm doesn't follow symbolic
                      8: # links.
                      9:
                     10: # Missing: mp.h
                     11:
1.4       niklas     12: FILES= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
                     13:        disktab.h dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h \
                     14:        grp.h ieeefp.h iso646.h kvm.h langinfo.h limits.h link.h locale.h \
                     15:        malloc.h math.h memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h \
                     16:        nl_types.h paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h resolv.h \
                     17:        search.h setjmp.h sgtty.h signal.h stab.h stddef.h stdio.h stdlib.h \
                     18:        string.h strings.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
                     19:        unistd.h utime.h utmp.h vis.h
1.1       deraadt    20:
                     21: MFILES=        float.h frame.h stdarg.h varargs.h
                     22: LFILES=        errno.h fcntl.h syslog.h termios.h
1.2       deraadt    23: CFILES=        curses.h
1.1       deraadt    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:
                     28: NOOBJ= noobj
                     29:
                     30: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     31: .include <bsd.own.mk>
                     32: SYS_INCLUDE?=  copies
                     33:
1.6     ! deraadt    34: includes:
1.1       deraadt    35:        @echo installing ${FILES}
                     36:        @-for i in ${FILES}; do \
                     37:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
                     38:                    install -c -m 444 $$i ${DESTDIR}/usr/include/$$i; \
                     39:        done
                     40:        @echo installing ${DIRS}
                     41:        @-for i in ${DIRS}; do \
                     42:                install -d -o ${BINOWN} -g ${BINGRP} -m 755 \
                     43:                        ${DESTDIR}/usr/include/$$i; \
                     44:                (cd $$i; for j in *.[ih]; do \
                     45:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
                     46:                        install -c -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
                     47:                done); \
                     48:        done
                     49:        @echo installing ${LFILES}
                     50:        @-for i in ${LFILES}; do \
                     51:                rm -f ${DESTDIR}/usr/include/$$i; \
                     52:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     53:        done
                     54:        @echo installing ${MFILES}
                     55:        @-for i in ${MFILES}; do \
                     56:                rm -f ${DESTDIR}/usr/include/$$i; \
                     57:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    58:        done
                     59:        @echo installing ${CFILES}
                     60:        @-for i in ${CFILES}; do \
                     61:                cmp -s ../lib/libcurses/$$i ${DESTDIR}/usr/include/$$i || \
                     62:                    install -c -m 444 ../lib/libcurses/$$i \
                     63:                        ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    64:        done
                     65:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                     66:        find ${DESTDIR}/usr/include -type f | \
                     67:                xargs chmod a=r
                     68:        find ${DESTDIR}/usr/include -type d | \
                     69:                xargs chmod u=rwx,go=rx
                     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>