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

Annotation of src/include/Makefile, Revision 1.120

1.120   ! deraadt     1: #      $OpenBSD: Makefile,v 1.119 2003/07/14 16:14:43 mho 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 \
1.116     millert    18:        resolv.h rmd160.h search.h setjmp.h sgtty.h sha1.h sha2.h skipjack.h \
1.107     art        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.120   ! deraadt    37: RDIRS= ../lib/libpthread ../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.94      hin        63: .if ${KERBEROS5:L} == "yes"
1.119     mho        64: RDIRS+= ../lib/libkrb5 ../lib/libgssapi ../lib/libkadm5srv
1.9       tholo      65: .endif
1.61      niklas     66:
                     67: prereq:
1.91      espie      68:        @for i in ${PRDIRS}; do \
1.62      niklas     69:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      70:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     71:        done
1.91      espie      72:        @for i in ${PWDIRS}; do \
1.61      niklas     73:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      74:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
1.61      niklas     75:        done
1.1       deraadt    76:
1.6       deraadt    77: includes:
1.1       deraadt    78:        @echo installing ${FILES}
1.91      espie      79:        @for i in ${FILES}; do \
1.1       deraadt    80:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    81:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    82:        done
                     83:        @echo installing ${DIRS}
1.91      espie      84:        @for i in ${DIRS}; do \
1.32      downsj     85:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    86:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      87:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    88:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    89:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie      90:                done; \
1.1       deraadt    91:        done
1.118     markus     92:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
                     93:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ssl \
                     94:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/openssl
                     95:        @mkdir ${DESTDIR}/usr/include/openssl
                     96:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
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.111     itojun    135:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    136:            ../sys/arch/${MACHINE}/include/*.h \
                    137:            ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   138:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    139:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    140:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   141:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.111     itojun    142:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
                    143:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    144:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.1       deraadt   145:        fi
1.65      espie     146:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   147:
                    148: symlinks:
                    149:        @echo symlinks: ${LDIRS}
                    150:        @for i in ${LDIRS}; do \
1.91      espie     151:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   152:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    153:        done
1.65      espie     154:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
                    155:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   156:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    157:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    158:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    159:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    160:        fi
1.91      espie     161:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   162:
1.6       deraadt   163: includes: ${SYS_INCLUDE}
                    164:
1.91      espie     165: .PHONY: prereq includes copies symlink
1.1       deraadt   166: .include <bsd.prog.mk>