diff options
author | imp <imp@FreeBSD.org> | 2005-04-01 23:22:01 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-04-01 23:22:01 +0000 |
commit | 6a96427b3329824f3a00197abad014c5e20e1596 (patch) | |
tree | a2803a00921868da3cbf22c25033bea4fc1e5a36 /include | |
parent | 35414c889448765b282e4b0b1b70ad61d1f66522 (diff) | |
download | FreeBSD-src-6a96427b3329824f3a00197abad014c5e20e1596.zip FreeBSD-src-6a96427b3329824f3a00197abad014c5e20e1596.tar.gz |
When $MACHINE != $MACHINE_ARCH, install $MACHINE_ARCH/include into
/usr/include/$MACHINE_ARCH in addition to installing $MACHINE/include
into /usr/include/machine.
Diffstat (limited to 'include')
-rw-r--r-- | include/Makefile | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/include/Makefile b/include/Makefile index 28d25cc..215f1b7 100644 --- a/include/Makefile +++ b/include/Makefile @@ -92,6 +92,10 @@ INCSLINKS+= machine/$i ${INCLUDEDIR}/$i INCSLINKS+= posix4/$i ${INCLUDEDIR}/$i .endfor +.if ${MACHINE} != ${MACHINE_ARCH} +_MARCH=${MACHINE_ARCH} +.endif + .include <bsd.prog.mk> installincludes: ${SHARED} @@ -99,7 +103,7 @@ ${SHARED}: compat # Take care of stale directory-level symlinks. compat: -.for i in ${LDIRS} ${LSUBDIRS} machine crypto +.for i in ${LDIRS} ${LSUBDIRS} machine ${_MARCH} crypto if [ -L ${DESTDIR}${INCLUDEDIR}/$i ]; then \ rm -f ${DESTDIR}${INCLUDEDIR}/$i; \ fi @@ -114,7 +118,8 @@ compat: .endif copies: -.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} altq crypto machine machine/pc +.for i in ${LDIRS} ${LSUBDIRS} ${LSUBSUBDIRS} altq crypto machine machine/pc \ + ${_MARCH} .if exists(${DESTDIR}${INCLUDEDIR}/$i) cd ${DESTDIR}${INCLUDEDIR}/$i; \ for h in *.h; do \ @@ -148,14 +153,24 @@ copies: cd ${.CURDIR}/../sys/opencrypto; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/crypto - cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ + cd ${.CURDIR}/../sys/${MACHINE}/include; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine -.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) - cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ +.if exists(${.CURDIR}/../sys/${MACHINE}/include/pc) + cd ${.CURDIR}/../sys/${MACHINE}/include/pc; \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${DESTDIR}${INCLUDEDIR}/machine/pc .endif +.if defined(_MARCH) + cd ${.CURDIR}/../sys/${_MARCH}/include; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/${_MARCH} +.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc) + cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \ + ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ + ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc +.endif +.endif symlinks: @${ECHO} "Setting up symlinks to kernel source tree..." @@ -212,15 +227,29 @@ symlinks: ln -fs ../../../sys/opencrypto/$$h \ ${DESTDIR}${INCLUDEDIR}/crypto; \ done - cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include; \ + cd ${.CURDIR}/../sys/${MACHINE}/include; \ for h in *.h; do \ - ln -fs ../../../sys/${MACHINE_ARCH}/include/$$h \ + ln -fs ../../../sys/${MACHINE}/include/$$h \ ${DESTDIR}${INCLUDEDIR}/machine; \ done -.if exists(${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc) - cd ${.CURDIR}/../sys/${MACHINE_ARCH}/include/pc; \ +.if exists(${.CURDIR}/../sys/${MACHINE}/include/pc) + cd ${.CURDIR}/../sys/${MACHINE}/include/pc; \ for h in *.h; do \ - ln -fs ../../../../sys/${MACHINE_ARCH}/include/pc/$$h \ + ln -fs ../../../../sys/${MACHINE}/include/pc/$$h \ ${DESTDIR}${INCLUDEDIR}/machine/pc; \ done .endif +.if defined(_MARCH) + cd ${.CURDIR}/../sys/${_MARCH}/include; \ + for h in *.h; do \ + ln -fs ../../../sys/${_MARCH}/include/$$h \ + ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ + done +.if exists(${.CURDIR}/../sys/${_MARCH}/include/pc) + cd ${.CURDIR}/../sys/${_MARCH}/include/pc; \ + for h in *.h; do \ + ln -fs ../../../../sys/${_MARCH}/include/pc/$$h \ + ${DESTDIR}${INCLUDEDIR}/${_MARCH}/pc; \ + done +.endif +.endif |