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

Annotation of src/include/Makefile, Revision 1.215

1.215   ! tb          1: #      $OpenBSD: Makefile,v 1.214 2016/10/16 19:28:44 tb 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:
1.186     eric       12: FILES= a.out.h ar.h asr.h assert.h bitstring.h blf.h bsd_auth.h \
1.212     tedu       13:        complex.h cpio.h ctype.h curses.h db.h dirent.h disktab.h \
1.164     deraadt    14:        dlfcn.h elf_abi.h err.h errno.h fenv.h float.h fnmatch.h fstab.h fts.h \
1.210     deraadt    15:        ftw.h getopt.h glob.h grp.h icdb.h ieeefp.h ifaddrs.h inttypes.h \
                     16:        iso646.h kvm.h langinfo.h libgen.h limits.h link.h link_elf.h \
                     17:        locale.h login_cap.h math.h md5.h memory.h ndbm.h netdb.h netgroup.h \
                     18:        nlist.h nl_types.h paths.h poll.h pwd.h ranlib.h readpassphrase.h \
                     19:        regex.h resolv.h rmd160.h search.h setjmp.h sha1.h sha2.h signal.h \
                     20:        siphash.h sndio.h spawn.h stdbool.h stddef.h stdio.h stdlib.h \
1.211     guenther   21:        string.h strings.h struct.h sysexits.h tar.h tgmath.h tib.h time.h \
1.210     deraadt    22:        ttyent.h unistd.h utime.h utmp.h uuid.h vis.h wchar.h wctype.h
1.1       deraadt    23:
1.164     deraadt    24: MFILES=        frame.h
1.192     guenther   25: LFILES=        endian.h fcntl.h syslog.h termios.h stdarg.h stdint.h varargs.h
1.1       deraadt    26:
                     27: DIRS=  arpa protocols rpc rpcsvc
1.188     henning    28: LDIRS= crypto ddb dev isofs miscfs msdosfs net netinet netinet6 \
1.191     tedu       29:        netmpls net80211 nfs ntfs scsi sys ufs uvm
1.1       deraadt    30:
1.163     espie      31: # Places that need a prerequisite target met before includes
1.214     tb         32: PRDIRS=        ../lib/libcrypto ../lib/librpcsvc
1.163     espie      33:
1.61      niklas     34: # Directories with an includes target
1.214     tb         35: RDIRS= ../lib/libcurses ../lib/libedit \
1.193     deraadt    36:        ../lib/libevent ../lib/libexpat ../lib/libform \
                     37:        ../lib/libfuse ../lib/libkeynote ../lib/libmenu \
1.213     sthen      38:        ../lib/libossaudio ../lib/libpanel ../lib/libpcap \
1.214     tb         39:        ../lib/libradius ../lib/librthread \
1.213     sthen      40:        ../lib/libskey ../lib/libssl  ../lib/libtls \
1.196     jsing      41:        ../lib/libusbhid ../lib/libutil ../lib/libz \
1.187     miod       42:        ../usr.bin/lex ../gnu/lib/libreadline \
1.179     deraadt    43:        ../sys/arch/${MACHINE}
1.123     espie      44:
1.171     robert     45: .if ${COMPILER_VERSION:L} == "gcc3"
1.163     espie      46: RDIRS+= ../gnu/usr.bin/gcc ../gnu/lib/libobjc
                     47: PRDIRS+= ../gnu/lib/libstdc++
1.172     miod       48: .else
1.163     espie      49: RDIRS+= ../gnu/usr.bin/cc/libobjc
1.214     tb         50: PRDIRS+= ../gnu/lib/libstdc++-v3 ../gnu/usr.bin/cc/include
1.123     espie      51: .endif
1.61      niklas     52:
1.163     espie      53: # prereq implies includes
                     54: RDIRS += ${PRDIRS}
                     55:
1.1       deraadt    56: NOOBJ= noobj
                     57:
                     58: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     59: SYS_INCLUDE?=  copies
1.61      niklas     60:
1.163     espie      61: RUN_MAKE = if test -f Makefile.bsd-wrapper; then ${MAKE} -f Makefile.bsd-wrapper $@; else ${MAKE} $@; fi
                     62:
1.61      niklas     63: prereq:
1.91      espie      64:        @for i in ${PRDIRS}; do \
1.62      niklas     65:                echo preparing in ${.CURDIR}/$$i; \
1.163     espie      66:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.61      niklas     67:        done
1.1       deraadt    68:
1.6       deraadt    69: includes:
1.1       deraadt    70:        @echo installing ${FILES}
1.91      espie      71:        @for i in ${FILES}; do \
1.1       deraadt    72:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    73:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    74:        done
                     75:        @echo installing ${DIRS}
1.91      espie      76:        @for i in ${DIRS}; do \
1.32      downsj     77:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    78:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      79:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    80:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    81:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie      82:                done; \
1.1       deraadt    83:        done
1.200     sthen      84:        @ln -sfh openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt    85:        @echo installing ${LFILES}
1.91      espie      86:        @for i in ${LFILES}; do \
                     87:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    88:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     89:        done
                     90:        @echo installing ${MFILES}
1.91      espie      91:        @for i in ${MFILES}; do \
                     92:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    93:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    94:        done
1.91      espie      95:        @for i in ${RDIRS}; do \
1.7       deraadt    96:                echo installing in ${.CURDIR}/$$i; \
1.163     espie      97:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt    98:        done
1.215   ! tb         99:        chown -RP ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
        !           100:        find ${DESTDIR}/usr/include -type f -print0 | \
        !           101:                xargs -0r chmod a=r
        !           102:        find ${DESTDIR}/usr/include \( -type d -o -type l \) -print0 | \
        !           103:                xargs -0r chmod -h u=rwx,go=rx
1.1       deraadt   104:
                    105: copies:
                    106:        @echo copies: ${LDIRS}
1.91      espie     107:        @for i in ${LDIRS}; do \
                    108:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    109:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   110:                        ${DESTDIR}/usr/include/$$i ; \
                    111:        done
                    112:        cd ../sys; \
                    113:        pax -rw -pa -L \
1.169     deraadt   114:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.206     kettenis  115:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*' ')' \
1.169     deraadt   116:            -print` ${DESTDIR}/usr/include
1.153     miod      117:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    118:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     119:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    120:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    121:            ../sys/arch/${MACHINE}/include/*.h \
                    122:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      123:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    124:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    125:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      126:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    127:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    128:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    129:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   130:        fi
1.65      espie     131:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   132:
                    133: symlinks:
                    134:        @echo symlinks: ${LDIRS}
                    135:        @for i in ${LDIRS}; do \
1.91      espie     136:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   137:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    138:        done
1.153     miod      139:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     140:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      141:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    142:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    143:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    144:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   145:        fi
1.91      espie     146:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   147:
1.6       deraadt   148: includes: ${SYS_INCLUDE}
                    149:
1.91      espie     150: .PHONY: prereq includes copies symlink
1.1       deraadt   151: .include <bsd.prog.mk>