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

Annotation of src/include/Makefile, Revision 1.115

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