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

Annotation of src/include/Makefile, Revision 1.129

1.129   ! fgsch       1: #      $OpenBSD: Makefile,v 1.128 2004/07/15 12:07:53 henning 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.129   ! fgsch      37:        netinet6 netipx netnatm netns net80211 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.127     millert    45:        ../lib/libkeynote ../lib/libevent ../usr.bin/lex \
                     46:        ../gnu/lib/libreadline ../gnu/usr.sbin/sendmail/libmilter \
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.126     drahn      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.126     drahn      57: PWDIRS=        ../usr.sbin/httpd ../gnu/usr.bin/binutils
1.123     espie      58:
                     59: .if ${USE_GCC3:L} == "yes"
1.124     drahn      60: WDIRS+= ../gnu/lib/libstdc++ ../gnu/usr.bin/gcc ../gnu/lib/libobjc \
                     61:        ../gnu/lib/libf2c
                     62: PWDIRS+= ../gnu/lib/libstdc++ ../gnu/lib/libf2c
1.123     espie      63: .else
                     64: WDIRS+= ../gnu/egcs/libio ../gnu/egcs/libstdc++ \
                     65:        ../gnu/egcs/libf2c ../gnu/egcs/libobjc ../gnu/egcs/gcc
                     66: PWDIRS+= ../gnu/egcs/libf2c
                     67: .endif
1.61      niklas     68:
1.1       deraadt    69: NOOBJ= noobj
                     70:
                     71: # Change SYS_INCLUDE in bsd.own.mk to "symlinks" if you don't want copies
                     72: SYS_INCLUDE?=  copies
1.94      hin        73: .if ${KERBEROS5:L} == "yes"
1.119     mho        74: RDIRS+= ../lib/libkrb5 ../lib/libgssapi ../lib/libkadm5srv
1.9       tholo      75: .endif
1.61      niklas     76:
                     77: prereq:
1.91      espie      78:        @for i in ${PRDIRS}; do \
1.62      niklas     79:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      80:                cd ${.CURDIR}/$$i && ${MAKE} prereq; \
1.62      niklas     81:        done
1.91      espie      82:        @for i in ${PWDIRS}; do \
1.61      niklas     83:                echo preparing in ${.CURDIR}/$$i; \
1.91      espie      84:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper prereq; \
1.61      niklas     85:        done
1.1       deraadt    86:
1.6       deraadt    87: includes:
1.1       deraadt    88:        @echo installing ${FILES}
1.91      espie      89:        @for i in ${FILES}; do \
1.1       deraadt    90:                cmp -s $$i ${DESTDIR}/usr/include/$$i || \
1.40      millert    91:                    ${INSTALL} ${INSTALL_COPY} -m 444 $$i ${DESTDIR}/usr/include/$$i; \
1.1       deraadt    92:        done
                     93:        @echo installing ${DIRS}
1.91      espie      94:        @for i in ${DIRS}; do \
1.32      downsj     95:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt    96:                        ${DESTDIR}/usr/include/$$i; \
1.91      espie      97:                cd ${.CURDIR}/$$i && for j in *.[ih]; do \
1.1       deraadt    98:                        cmp -s $$j ${DESTDIR}/usr/include/$$i/$$j || \
1.40      millert    99:                        ${INSTALL} ${INSTALL_COPY} -m 444 $$j ${DESTDIR}/usr/include/$$i/$$j; \
1.91      espie     100:                done; \
1.1       deraadt   101:        done
1.118     markus    102:        @rm -rf ${DESTDIR}/usr/include/openssl ${DESTDIR}/usr/include/ssl \
                    103:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/ssl \
                    104:                ${DESTDIR}/usr/libdata/perl5/site_perl/${MACHINE_ARCH}-openbsd/openssl
                    105:        @mkdir ${DESTDIR}/usr/include/openssl
                    106:        @ln -sf openssl ${DESTDIR}/usr/include/ssl
1.1       deraadt   107:        @echo installing ${LFILES}
1.91      espie     108:        @for i in ${LFILES}; do \
                    109:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   110:                ln -s sys/$$i ${DESTDIR}/usr/include/$$i; \
                    111:        done
                    112:        @echo installing ${MFILES}
1.91      espie     113:        @for i in ${MFILES}; do \
                    114:                rm -f ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   115:                ln -s machine/$$i ${DESTDIR}/usr/include/$$i; \
1.2       deraadt   116:        done
1.1       deraadt   117:        chown -R ${BINOWN}:${BINGRP} ${DESTDIR}/usr/include
                    118:        find ${DESTDIR}/usr/include -type f | \
                    119:                xargs chmod a=r
                    120:        find ${DESTDIR}/usr/include -type d | \
                    121:                xargs chmod u=rwx,go=rx
1.91      espie     122:        @for i in ${RDIRS}; do \
1.7       deraadt   123:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     124:                cd ${.CURDIR}/$$i && ${MAKE} includes; \
1.47      niklas    125:        done
1.91      espie     126:        @for i in ${WDIRS}; do \
1.47      niklas    127:                echo installing in ${.CURDIR}/$$i; \
1.91      espie     128:                cd ${.CURDIR}/$$i && ${MAKE} -f Makefile.bsd-wrapper includes; \
1.7       deraadt   129:        done
1.1       deraadt   130:
                    131: copies:
                    132:        @echo copies: ${LDIRS}
1.91      espie     133:        @for i in ${LDIRS}; do \
                    134:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.32      downsj    135:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   136:                        ${DESTDIR}/usr/include/$$i ; \
                    137:        done
                    138:        cd ../sys; \
                    139:        pax -rw -pa -L \
1.101     mickey    140:            `find ${LDIRS} -follow -type f -name '*.h' \
                    141:            '!' -path 'dev/microcode/*' -print` ${DESTDIR}/usr/include
1.65      espie     142:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
1.32      downsj    143:        ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.65      espie     144:                ${DESTDIR}/usr/include/${MACHINE}
1.111     itojun    145:        pax -rw -pa -s "|\.\./sys/arch/${MACHINE}/include||" \
                    146:            ../sys/arch/${MACHINE}/include/*.h \
                    147:            ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   148:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    149:            -d ../sys/arch/${MACHINE_ARCH}/include; then \
1.32      downsj    150:                ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
1.1       deraadt   151:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.111     itojun    152:                pax -rw -pa -s "|\.\./sys/arch/${MACHINE_ARCH}/include||" \
                    153:                    ../sys/arch/${MACHINE_ARCH}/include/*.h \
                    154:                    ${DESTDIR}/usr/include/${MACHINE_ARCH}; \
1.1       deraadt   155:        fi
1.65      espie     156:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine; \
1.1       deraadt   157:
                    158: symlinks:
                    159:        @echo symlinks: ${LDIRS}
                    160:        @for i in ${LDIRS}; do \
1.91      espie     161:                rm -rf ${DESTDIR}/usr/include/$$i && \
1.1       deraadt   162:                ln -s /sys/$$i ${DESTDIR}/usr/include/$$i; \
                    163:        done
1.65      espie     164:        cd ${DESTDIR}/usr/include && rm -rf ${MACHINE} ${MACHINE_ARCH} machine
                    165:        ln -s /sys/arch/${MACHINE}/include ${DESTDIR}/usr/include/${MACHINE}
1.1       deraadt   166:        if test ${MACHINE} != ${MACHINE_ARCH} -a \
                    167:            -d ../sys/arch/${MACHINE_ARCH}/include ; then \
                    168:                ln -s /sys/arch/${MACHINE_ARCH}/include \
                    169:                    ${DESTDIR}/usr/include/${MACHINE_ARCH} ; \
                    170:        fi
1.91      espie     171:        ln -sf ${MACHINE} ${DESTDIR}/usr/include/machine
1.1       deraadt   172:
1.6       deraadt   173: includes: ${SYS_INCLUDE}
                    174:
1.91      espie     175: .PHONY: prereq includes copies symlink
1.1       deraadt   176: .include <bsd.prog.mk>