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

Annotation of src/include/Makefile, Revision 1.123

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