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

Annotation of src/include/Makefile, Revision 1.142

1.142   ! matthieu    1: #      $OpenBSD: Makefile,v 1.141 2007/10/19 14:28:15 deraadt 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.137     millert    16:        dlfcn.h elf_abi.h err.h errno.h fnmatch.h fstab.h fts.h ftw.h getopt.h \
1.121     millert    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 \
1.130     espie      24:        time.h ttyent.h tzfile.h unistd.h utime.h utmp.h vis.h \
                     25:        wchar.h wctype.h
1.8       deraadt    26:
1.108     art        27: FILES+=        link.h link_aout.h link_elf.h
1.86      hugh       28:
                     29: .if (${MACHINE_ARCH} != "vax")
                     30: FILES+= ieeefp.h
1.8       deraadt    31: .endif
1.1       deraadt    32:
1.122     espie      33: MFILES=        float.h frame.h
1.138     millert    34: LFILES=        fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1       deraadt    35:
                     36: DIRS=  arpa protocols rpc rpcsvc
1.133     henning    37: LDIRS= crypto ddb dev isofs miscfs net netatalk netinet altq \
1.140     deraadt    38:        netinet6 netnatm net80211 netbt nfs scsi sys ufs uvm xfs
1.1       deraadt    39:
1.61      niklas     40: # Directories with an includes target
1.120     deraadt    41: RDIRS= ../lib/libpthread ../lib/libcompat ../lib/libcurses \
1.131     millert    42:        ../lib/libform ../lib/libssl ../lib/libmenu \
1.104     deraadt    43:        ../lib/libocurses ../lib/libossaudio ../lib/libpanel ../lib/librpcsvc \
1.141     deraadt    44:        ../lib/libskey ../lib/libsectok ../lib/libedit ../lib/libexpat \
                     45:        ../lib/libpcap ../lib/libutil ../lib/libusbhid ../lib/libwrap \
                     46:        ../lib/libz ../lib/libkeynote ../lib/libevent ../usr.bin/lex \
1.127     millert    47:        ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \
1.104     deraadt    48:        ../sys/arch/${MACHINE}
1.7       deraadt    49:
1.62      niklas     50: # Places using Makefile that needs a prerequisite target met before includes
1.113     markus     51: PRDIRS=
1.62      niklas     52:
1.61      niklas     53: # Directories with an includes target that use Makefile.bsd-wrapper
1.126     drahn      54: WDIRS= ../usr.sbin/httpd ../gnu/usr.bin/binutils
1.47      niklas     55:
1.61      niklas     56: # Places using Makefile.bsd-wrapper that needs a prerequisite target met
                     57: # before includes
1.139     espie      58: PWDIRS=        ../gnu/usr.bin/binutils
1.123     espie      59:
                     60: .if ${USE_GCC3:L} == "yes"
1.124     drahn      61: WDIRS+= ../gnu/lib/libstdc++ ../gnu/usr.bin/gcc ../gnu/lib/libobjc \
                     62:        ../gnu/lib/libf2c
                     63: PWDIRS+= ../gnu/lib/libstdc++ ../gnu/lib/libf2c
1.123     espie      64: .else
                     65: WDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
1.132     espie      66:        ../gnu/egcs/libf2c ../gnu/lib/libobjc ../gnu/egcs/gcc
1.123     espie      67: PWDIRS+= ../gnu/egcs/libf2c
                     68: .endif
1.61      niklas     69:
1.1       deraadt    70: NOOBJ= noobj
                     71:
                     72: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     73: SYS_INCLUDE?=  copies
1.94      hin        74: .if ${KERBEROS5:L} == "yes"
1.119     mho        75: RDIRS+= ../lib/libkrb5 ../lib/libgssapi ../lib/libkadm5srv
1.9       tholo      76: .endif
1.61      niklas     77:
                     78: prereq:
1.91      espie      79:        @for i in ${PRDIRS}; do \
1.62      niklas     80:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      81:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     82:        done
1.91      espie      83:        @for i in ${PWDIRS}; do \
1.61      niklas     84:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      85:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
1.61      niklas     86:        done
1.1       deraadt    87:
1.6       deraadt    88: includes:
1.1       deraadt    89:        @echo installing ${FILES}
1.91      espie      90:        @for i in ${FILES}; do \
1.1       deraadt    91:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    92:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    93:        done
                     94:        @echo installing ${DIRS}
1.91      espie      95:        @for i in ${DIRS}; do \
1.32      downsj     96:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    97:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      98:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    99:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert   100:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie     101:                done; \
1.1       deraadt   102:        done
1.118     markus    103:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
                    104:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ssl \
                    105:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/openssl
                    106:        @mkdir ${DESTDIR}/usr/include/openssl
                    107:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt   108:        @echo installing ${LFILES}
1.91      espie     109:        @for i in ${LFILES}; do \
                    110:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   111:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    112:        done
                    113:        @echo installing ${MFILES}
1.91      espie     114:        @for i in ${MFILES}; do \
                    115:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   116:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   117:        done
1.1       deraadt   118:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
1.136     deraadt   119:        find ${DESTDIR}/usr/include -type f -print0 | \
                    120:                xargs -0r chmod a=r
                    121:        find ${DESTDIR}/usr/include -type d -print0 | \
                    122:                xargs -0r chmod u=rwx,go=rx
1.91      espie     123:        @for i in ${RDIRS}; do \
1.7       deraadt   124:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     125:                cd ${.CURDIR}/$$i && ${MAKE} includes; \
1.47      niklas    126:        done
1.91      espie     127:        @for i in ${WDIRS}; do \
1.47      niklas    128:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     129:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
1.7       deraadt   130:        done
1.1       deraadt   131:
                    132: copies:
                    133:        @echo copies: ${LDIRS}
1.91      espie     134:        @for i in ${LDIRS}; do \
                    135:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    136:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   137:                        ${DESTDIR}/usr/include/$$i ; \
                    138:        done
                    139:        cd ../sys; \
                    140:        pax -rw -pa -L \
1.101     mickey    141:            `find ${LDIRS} -follow -type f -name '*.h' \
                    142:            '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
1.65      espie     143:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32      downsj    144:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     145:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    146:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    147:            ../sys/arch/${MACHINE}/include/*.h \
                    148:            ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   149:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    150:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    151:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.142   ! matthieu  152:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.111     itojun    153:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
                    154:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    155:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.1       deraadt   156:        fi
1.65      espie     157:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   158:
                    159: symlinks:
                    160:        @echo symlinks: ${LDIRS}
                    161:        @for i in ${LDIRS}; do \
1.91      espie     162:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   163:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    164:        done
1.65      espie     165:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
                    166:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   167:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    168:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    169:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    170:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    171:        fi
1.91      espie     172:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   173:
1.6       deraadt   174: includes: ${SYS_INCLUDE}
                    175:
1.91      espie     176: .PHONY: prereq includes copies symlink
1.1       deraadt   177: .include <bsd.prog.mk>