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

Annotation of src/include/Makefile, Revision 1.2

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