diff --git a/include/Makefile b/include/Makefile index 6513565cf06d..4f2b4fb5a6f5 100644 --- a/include/Makefile +++ b/include/Makefile @@ -49,6 +49,9 @@ LSUBDIRS= cam/scsi dev/ppbus dev/usb dev/wi \ fs/fdescfs fs/fifofs fs/nullfs fs/portalfs fs/procfs fs/smbfs \ fs/umapfs fs/unionfs isofs/cd9660 ufs/ffs ufs/mfs ufs/ufs +# For SHARED=symlinks, cam is a symlink, so cam/scsi is taken care of +LSYMSUBDIRS= ${LSUBDIRS:Ncam/scsi} + # Define SHARED to indicate whether you want symbolic links to the system # source (``symlinks''), or a separate copy (``copies''). ``symlinks'' is # probably only useful for developers and should be avoided if you do not @@ -96,7 +99,7 @@ beforeinstall: ${SHARED} .endfor copies: -.for i in ${LDIRS} ${LNOHEADERDIRS} machine +.for i in ${LDIRS} ${LSYMSUBDIRS} machine if [ -h ${DESTDIR}/usr/include/$i ]; then \ rm -f ${DESTDIR}/usr/include/$i; \ fi @@ -125,7 +128,10 @@ symlinks: .endfor .for i in ${LNOHEADERDIRS} rm -rf ${DESTDIR}/usr/include/$i - ln -s ../../sys/$i ${DESTDIR}/usr/include/$i + mkdir ${DESTDIR}/usr/include/$i +.endfor +.for i in ${LSYMSUBDIRS} + ln -s ../../../sys/$i ${DESTDIR}/usr/include/$i .endfor rm -rf ${DESTDIR}/usr/include/machine ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine