linux-objdir-kernel-builds-20051014
authorJeffrey Hutzelman <jhutz@cmu.edu>
Fri, 14 Oct 2005 22:26:29 +0000 (22:26 +0000)
committerDerrick Brashear <shadow@dementia.org>
Fri, 14 Oct 2005 22:26:29 +0000 (22:26 +0000)
FIXES 22352

allow objdir kernel module builds to work again

src/libafs/MakefileProto.LINUX.in

index e0634a7..5e5f8c4 100644 (file)
@@ -140,15 +140,21 @@ setup:
 
 ${COMPDIRS} ${INSTDIRS} ${DESTDIRS}:
        $(RM) -f h 
-       ln -fs ${LINUX_KERNEL_PATH}/include/linux h 
+       $(RM) -f sys
+       $(RM) -f netinet 
+       if [ -d ${LINUX_KERNEL_PATH}/include2 ] ; then                  \
+           ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux h       ; \
+           ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux sys     ; \
+           ln -fs ${LINUX_KERNEL_PATH}/include2/asm/../linux netinet ; \
+       else                                                            \
+           ln -fs ${LINUX_KERNEL_PATH}/include/linux h               ; \
+           ln -fs ${LINUX_KERNEL_PATH}/include/linux sys             ; \
+           ln -fs ${LINUX_KERNEL_PATH}/include/linux netinet         ; \
+       fi
        $(RM) -f linux 
        ln -fs ${LINUX_KERNEL_PATH}/include/linux linux 
        $(RM) -f net 
        ln -fs ${LINUX_KERNEL_PATH}/include/net net 
-       $(RM) -f netinet 
-       ln -fs ${LINUX_KERNEL_PATH}/include/linux netinet 
-       $(RM) -f sys
-       ln -fs ${LINUX_KERNEL_PATH}/include/linux sys
        $(RM) -f asm-generic
        ln -fs ${LINUX_KERNEL_PATH}/include/asm-generic asm-generic
        $(RM) -f asm