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

Annotation of src/include/Makefile, Revision 1.110

1.110   ! itojun      1: #      $OpenBSD: Makefile,v 1.109 2002/06/07 17:46:55 drahn 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 \
                     13:        dlfcn.h elf_abi.h err.h fnmatch.h fstab.h fts.h glob.h grp.h \
                     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.58      d          37: RDIRS= ../lib/libc_r ../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 \
                     42:        ../lib/libkeynote ../usr.bin/lex ../gnu/lib/libreadline \
                     43:        ../sys/arch/${MACHINE}
1.7       deraadt    44:
1.62      niklas     45: # Places using Makefile that needs a prerequisite target met before includes
1.105     deraadt    46: PRDIRS=        ../lib/libssl
1.62      niklas     47:
1.61      niklas     48: # Directories with an includes target that use Makefile.bsd-wrapper
1.104     deraadt    49: WDIRS= ../usr.sbin/httpd ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
                     50:        ../gnu/egcs/libf2c ../gnu/egcs/libobjc ../gnu/egcs/gcc \
                     51:        ../gnu/usr.bin/binutils
1.47      niklas     52:
1.61      niklas     53: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     54: # before includes
1.104     deraadt    55: PWDIRS=        ../usr.sbin/httpd ../gnu/egcs/libf2c ../gnu/usr.bin/binutils
1.61      niklas     56:
1.1       deraadt    57: NOOBJ= noobj
                     58:
                     59: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     60: .include <bsd.own.mk>
                     61: SYS_INCLUDE?=  copies
1.91      espie      62: .if ${KERBEROS:L} == "yes"
1.81      niklas     63: RDIRS+=        ../kerberosIV/lib
                     64: PRDIRS+=../kerberosIV/lib/kadm ../kerberosIV/lib/krb
1.94      hin        65: .endif
                     66: .if ${KERBEROS5:L} == "yes"
                     67: RDIRS+=        ../kerberosV/lib
1.9       tholo      68: .endif
1.61      niklas     69:
                     70: prereq:
1.91      espie      71:        @for i in ${PRDIRS}; do \
1.62      niklas     72:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      73:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     74:        done
1.91      espie      75:        @for i in ${PWDIRS}; do \
1.61      niklas     76:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      77:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
1.61      niklas     78:        done
1.1       deraadt    79:
1.6       deraadt    80: includes:
1.1       deraadt    81:        @echo installing ${FILES}
1.91      espie      82:        @for i in ${FILES}; do \
1.1       deraadt    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}
1.91      espie      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; \
1.91      espie      90:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    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.91      espie      93:                done; \
1.1       deraadt    94:        done
1.73      beck       95:        @rm -f ${DESTDIR}/usr/include/openssl
1.72      deraadt    96:        @ln -sf ssl ${DESTDIR}/usr/include/openssl
1.1       deraadt    97:        @echo installing ${LFILES}
1.91      espie      98:        @for i in ${LFILES}; do \
                     99:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   100:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    101:        done
                    102:        @echo installing ${MFILES}
1.91      espie     103:        @for i in ${MFILES}; do \
                    104:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   105:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   106:        done
1.1       deraadt   107:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                    108:        find ${DESTDIR}/usr/include -type f | \
                    109:                xargs chmod a=r
                    110:        find ${DESTDIR}/usr/include -type d | \
                    111:                xargs chmod u=rwx,go=rx
1.91      espie     112:        @for i in ${RDIRS}; do \
1.7       deraadt   113:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     114:                cd ${.CURDIR}/$$i && ${MAKE} includes; \
1.47      niklas    115:        done
1.91      espie     116:        @for i in ${WDIRS}; do \
1.47      niklas    117:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     118:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
1.7       deraadt   119:        done
1.1       deraadt   120:
                    121: copies:
                    122:        @echo copies: ${LDIRS}
1.91      espie     123:        @for i in ${LDIRS}; do \
                    124:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    125:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   126:                        ${DESTDIR}/usr/include/$$i ; \
                    127:        done
                    128:        cd ../sys; \
                    129:        pax -rw -pa -L \
1.101     mickey    130:            `find ${LDIRS} -follow -type f -name '*.h' \
                    131:            '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
1.65      espie     132:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32      downsj    133:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     134:                ${DESTDIR}/usr/include/${MACHINE}
1.110   ! itojun    135:        (cd ../sys/arch/${MACHINE}/include; \
        !           136:         pax -rw -pa *.h ${DESTDIR}/usr/include/${MACHINE})
1.1       deraadt   137:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    138:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    139:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   140:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.110   ! itojun    141:                (cd ../sys/arch/${MACHINE_ARCH}/include; \
        !           142:                 pax -rw -pa *.h ${DESTDIR}/usr/include/${MACHINE_ARCH}); \
1.1       deraadt   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 \
1.91      espie     149:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   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:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    155:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    156:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    157:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    158:        fi
1.91      espie     159:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   160:
1.6       deraadt   161: includes: ${SYS_INCLUDE}
                    162:
1.91      espie     163: .PHONY: prereq includes copies symlink
1.1       deraadt   164: .include <bsd.prog.mk>