linux-make-bridge-script-more-respectful-of-build-environment-20010423
authorDerrick Brashear <shadow@dementia.org>
Tue, 24 Apr 2001 03:48:32 +0000 (03:48 +0000)
committerDerrick Brashear <shadow@dementia.org>
Tue, 24 Apr 2001 03:48:32 +0000 (03:48 +0000)
make it actually use the known path to the kernel source, and check for existance before doing anything

src/libafs/MakefileProto.LINUX
src/libafs/redhat.sh

index fec7620..194dedb 100644 (file)
@@ -92,7 +92,7 @@ setup:
                        ln -fs ../Makefile $${KDIR}/Makefile ; \
                        ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
 <i386_linux22 i386_linux24>
-                       sh ./redhat.sh ${LINUX_VERS} $${KDIR}/Makefile.extradefs; \
+                       sh ./redhat.sh ${LINUX_SRCDIR}$$v $${KDIR}/Makefile.extradefs; \
 <all>
                done \
        done
index 0d35c2a..e213cc9 100755 (executable)
@@ -5,15 +5,20 @@
 IBYTES=""
 SETATTR=""
 
-grep i_bytes /lib/modules/$1/build/include/linux/fs.h > /dev/null
+if [ -e $1/include/linux/fs.h ] ; then
+grep i_bytes $1/include/linux/fs.h > /dev/null
 if [ $? = 0 ]; then
-    IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1"
+IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1"
 fi
-grep "extern int inode_setattr" /lib/modules/$1/build/include/linux/fs.h > /dev/null
+
+grep "extern int inode_setattr" $1/include/linux/fs.h > /dev/null
 if [ $? = 0 ]; then
-    SETATTR="-DINODE_SETATTR_NOT_VOID=1"
+SETATTR="-DINODE_SETATTR_NOT_VOID=1"
 fi
 
+if [ -e $2 ] ; then
 /bin/rm $2
+fi
 echo "KDEFINES = ${IBYTES} ${SETATTR}" > $2
+fi
 exit 0