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

Annotation of src/include/Makefile, Revision 1.67

1.67    ! angelos     1: #      $OpenBSD: Makefile,v 1.66 1999/05/26 16:02:55 espie 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.53      provos     11: FILES= a.out.h ar.h assert.h bitstring.h blf.h bm.h cast.h cpio.h ctype.h \
1.59      millert    12:        curses.h db.h dbm.h des.h dirent.h disktab.h elf_abi.h err.h fnmatch.h \
1.54      millert    13:        fstab.h fts.h glob.h grp.h ieeefp.h inttypes.h iso646.h kvm.h \
                     14:        langinfo.h libgen.h limits.h locale.h malloc.h math.h md4.h md5.h \
                     15:        memory.h mpool.h ndbm.h netdb.h netgroup.h nlist.h nl_types.h \
                     16:        olf_abi.h paths.h poll.h pwd.h ranlib.h re_comp.h regex.h resolv.h \
1.60      deraadt    17:        rmd160.h search.h setjmp.h sgtty.h sha1.h skipjack.h signal.h stab.h \
                     18:        stddef.h stdio.h stdlib.h string.h strings.h struct.h sysexits.h \
                     19:        tar.h time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h
1.8       deraadt    20:
1.63      rahnds     21: .if (${MACHINE_ARCH} != "alpha") && (${MACHINE_ARCH} != "mips") && \
                     22:        (${MACHINE_ARCH} != "powerpc")
1.8       deraadt    23: FILES+=        dlfcn.h link.h
                     24: .endif
1.1       deraadt    25:
                     26: MFILES=        float.h frame.h stdarg.h varargs.h
                     27: LFILES=        errno.h fcntl.h syslog.h termios.h
1.26      pefo       28:
                     29: .if (${MACHINE_ARCH} == "mips")
                     30: MFILES+= link.h dlfcn.h
                     31: .endif
1.1       deraadt    32:
                     33: DIRS=  arpa protocols rpc rpcsvc
1.57      deraadt    34: LDIRS= dev net netinet netinet6 netccitt netiso netns netipx nfs sys ufs vm ddb \
1.55      art        35:        scsi netatalk isofs xfs
1.1       deraadt    36:
1.61      niklas     37: # Directories with an includes target
1.58      d          38: RDIRS= ../lib/libc_r ../lib/libcom_err ../lib/libcompat ../lib/libcurses \
1.64      millert    39:        ../lib/libcurses++ ../lib/libform ../lib/libmenu ../lib/libocurses \
                     40:        ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc ../lib/libskey \
                     41:        ../lib/libedit ../lib/libpcap ../lib/libutil ../lib/libwrap \
1.67    ! angelos    42:        ../lib/libz ../lib/libkeynote ../sys/arch/${MACHINE}
1.7       deraadt    43:
1.62      niklas     44: # Places using Makefile that needs a prerequisite target met before includes
                     45: PRDIRS=
                     46:
1.61      niklas     47: # Directories with an includes target that use Makefile.bsd-wrapper
1.66      espie      48: WDIRS= ../lib/libssl ../gnu/lib/libgmp
                     49:
                     50: WDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ ../gnu/egcs/libf2c \
                     51:        ../gnu/egcs/libobjc ../gnu/egcs/gcc
                     52: #WDIRS+= ../gnu/lib/libg++/libg++ ../gnu/lib/libg++/libio \
                     53: #      ../gnu/lib/libg++/librx ../gnu/lib/libg++/libstdc++ \
                     54: #      ../gnu/usr.bin/gcc
1.47      niklas     55:
1.61      niklas     56: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     57: # before includes
                     58: PWDIRS=        ../lib/libssl
                     59:
1.1       deraadt    60: NOOBJ= noobj
                     61:
                     62: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     63: .include <bsd.own.mk>
                     64: SYS_INCLUDE?=  copies
1.39      millert    65: .if (${KERBEROS} == "yes")
1.31      downsj     66: RDIRS+=        ../kerberosIV/include ../kerberosIV/kadm ../kerberosIV/krb
1.62      niklas     67: PRDIRS+=../kerberosIV/kadm ../kerberosIV/krb
1.9       tholo      68: .endif
1.61      niklas     69:
                     70: prereq:
1.62      niklas     71:        @-for i in ${PRDIRS}; do \
                     72:                echo preparing in ${.CURDIR}/$$i; \
                     73:                (cd ${.CURDIR}/$$i; ${MAKE} prereq) \
                     74:        done
1.61      niklas     75:        @-for i in ${PWDIRS}; do \
                     76:                echo preparing in ${.CURDIR}/$$i; \
                     77:                (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper prereq) \
                     78:        done
1.1       deraadt    79:
1.6       deraadt    80: includes:
1.1       deraadt    81:        @echo installing ${FILES}
                     82:        @-for i in ${FILES}; do \
                     83:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    84:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    85:        done
                     86:        @echo installing ${DIRS}
                     87:        @-for i in ${DIRS}; do \
1.32      downsj     88:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    89:                        ${DESTDIR}/usr/include/$$i; \
                     90:                (cd $$i; for j in *.[ih]; do \
                     91:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    92:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.1       deraadt    93:                done); \
                     94:        done
                     95:        @echo installing ${LFILES}
                     96:        @-for i in ${LFILES}; do \
                     97:                rm -f ${DESTDIR}/usr/include/$$i; \
                     98:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     99:        done
                    100:        @echo installing ${MFILES}
                    101:        @-for i in ${MFILES}; do \
                    102:                rm -f ${DESTDIR}/usr/include/$$i; \
                    103:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   104:        done
1.1       deraadt   105:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                    106:        find ${DESTDIR}/usr/include -type f | \
                    107:                xargs chmod a=r
                    108:        find ${DESTDIR}/usr/include -type d | \
                    109:                xargs chmod u=rwx,go=rx
1.7       deraadt   110:        @-for i in ${RDIRS}; do \
                    111:                echo installing in ${.CURDIR}/$$i; \
                    112:                (cd ${.CURDIR}/$$i; ${MAKE} includes) \
1.47      niklas    113:        done
                    114:        @-for i in ${WDIRS}; do \
                    115:                echo installing in ${.CURDIR}/$$i; \
                    116:                (cd ${.CURDIR}/$$i; ${MAKE} -f Makefile.bsd-wrapper includes) \
1.7       deraadt   117:        done
1.1       deraadt   118:
                    119: copies:
                    120:        @echo copies: ${LDIRS}
                    121:        @-for i in ${LDIRS}; do \
                    122:                rm -rf ${DESTDIR}/usr/include/$$i; \
1.32      downsj    123:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   124:                        ${DESTDIR}/usr/include/$$i ; \
                    125:        done
                    126:        cd ../sys; \
                    127:        pax -rw -pa -L \
                    128:            `find ${LDIRS} -follow -type f -name '*.h' '!' -path \
                    129:            'netiso/xebec/*' -print` ${DESTDIR}/usr/include
1.65      espie     130:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32      downsj    131:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     132:                ${DESTDIR}/usr/include/${MACHINE}
1.52      espie     133:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
1.1       deraadt   134:            ../sys/arch/${MACHINE}/include/*.h \
1.65      espie     135:            ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   136:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    137:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    138:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   139:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.52      espie     140:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
1.1       deraadt   141:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    142:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
                    143:        fi
1.65      espie     144:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   145:
                    146: symlinks:
                    147:        @echo symlinks: ${LDIRS}
                    148:        @for i in ${LDIRS}; do \
                    149:                rm -rf ${DESTDIR}/usr/include/$$i; \
                    150:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    151:        done
1.65      espie     152:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
                    153:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   154:        rm -rf ${DESTDIR}/usr/include/${MACHINE_ARCH}
                    155:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    156:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    157:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    158:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    159:        fi
1.65      espie     160:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine ; \
1.1       deraadt   161:
1.6       deraadt   162: includes: ${SYS_INCLUDE}
                    163:
1.1       deraadt   164: .include <bsd.prog.mk>