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

Annotation of src/include/Makefile, Revision 1.216

1.216   ! jca         1: #      $OpenBSD: Makefile,v 1.215 2016/11/08 19:56:56 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
                     84:        @echo installing ${LFILES}
1.91      espie      85:        @for i in ${LFILES}; do \
                     86:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    87:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                     88:        done
                     89:        @echo installing ${MFILES}
1.91      espie      90:        @for i in ${MFILES}; do \
                     91:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt    92:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt    93:        done
1.91      espie      94:        @for i in ${RDIRS}; do \
1.7       deraadt    95:                echo installing in ${.CURDIR}/$$i; \
1.163     espie      96:                cd ${.CURDIR}/$$i && ${RUN_MAKE}; \
1.7       deraadt    97:        done
1.215     tb         98:        chown -RP ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                     99:        find ${DESTDIR}/usr/include -type f -print0 | \
                    100:                xargs -0r chmod a=r
                    101:        find ${DESTDIR}/usr/include \( -type d -o -type l \) -print0 | \
                    102:                xargs -0r chmod -h u=rwx,go=rx
1.1       deraadt   103:
                    104: copies:
                    105:        @echo copies: ${LDIRS}
1.91      espie     106:        @for i in ${LDIRS}; do \
                    107:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    108:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   109:                        ${DESTDIR}/usr/include/$$i ; \
                    110:        done
                    111:        cd ../sys; \
                    112:        pax -rw -pa -L \
1.169     deraadt   113:            `find ${LDIRS} -follow -type f -name '*.h' '!' \
1.206     kettenis  114:            '(' -path 'dev/microcode/*' -or -path 'dev/pci/drm/*' ')' \
1.169     deraadt   115:            -print` ${DESTDIR}/usr/include
1.153     miod      116:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.32      downsj    117:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     118:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    119:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    120:            ../sys/arch/${MACHINE}/include/*.h \
                    121:            ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      122:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    123:            -d ../sys/arch/${MACHINE_CPU}/include; then \
1.32      downsj    124:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.153     miod      125:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
                    126:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_CPU}/include||" \
                    127:                    ../sys/arch/${MACHINE_CPU}/include/*.h \
                    128:                    ${DESTDIR}/usr/include/${MACHINE_CPU}; \
1.1       deraadt   129:        fi
1.65      espie     130:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   131:
                    132: symlinks:
                    133:        @echo symlinks: ${LDIRS}
                    134:        @for i in ${LDIRS}; do \
1.91      espie     135:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   136:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    137:        done
1.153     miod      138:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_CPU} machine
1.65      espie     139:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.153     miod      140:        if test ${MACHINE} != ${MACHINE_CPU} -a \
                    141:            -d ../sys/arch/${MACHINE_CPU}/include ; then \
                    142:                ln -s /sys/arch/${MACHINE_CPU}/include \
                    143:                    ${DESTDIR}/usr/include/${MACHINE_CPU} ; \
1.1       deraadt   144:        fi
1.91      espie     145:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   146:
1.6       deraadt   147: includes: ${SYS_INCLUDE}
                    148:
1.91      espie     149: .PHONY: prereq includes copies symlink
1.1       deraadt   150: .include <bsd.prog.mk>