]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
linux-bridge-to-deal-with-redhat71-in-pre-autoconf-days-20010422
authorDerrick Brashear <shadow@dementia.org>
Sun, 22 Apr 2001 20:37:33 +0000 (20:37 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 22 Apr 2001 20:37:33 +0000 (20:37 +0000)
Kinda crappy but it will suffice for now

src/libafs/Makefile.extradefs [new file with mode: 0644]
src/libafs/MakefileProto.LINUX
src/libafs/redhat.sh [new file with mode: 0755]

diff --git a/src/libafs/Makefile.extradefs b/src/libafs/Makefile.extradefs
new file mode 100644 (file)
index 0000000..1830f80
--- /dev/null
@@ -0,0 +1,8 @@
+# Copyright 2000, International Business Machines Corporation and others.
+# All Rights Reserved.
+# 
+# This software has been released under the terms of the IBM Public
+# License.  For details, see the LICENSE file in the top-level source
+# directory or online at http://www.openafs.org/dl/license10.html
+
+#Placeholder for extra definitions
index 10bfdf87aa2abdebe2e6e50eb6319ce88c125c2a..fec7620db09926ae12268ead77f166ab1c18d429 100644 (file)
@@ -40,7 +40,7 @@ LD = ld
 CCFLAGS =   -O2 -fomit-frame-pointer \
        -fno-strength-reduce -pipe -march=i486 -malign-loops=2 -malign-jumps=2 \
        -malign-functions=2
-DEFINES = -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
+DEFINES = -D__KERNEL__  -DCPU=586 -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF} ${KDEFINES}
 <alpha_linux_22 alpha_linux_24>
 CCFLAGS = -O2 -fomit-frame-pointer -fno-strength-reduce -pipe -mno-fp-regs -ffixed-8
 DEFINES = -D__KERNEL__ -DKERNEL -D_KERNEL -DMODULE ${SMP_DEF}
@@ -73,6 +73,9 @@ CFLAGS = $(CCFLAGS) $(DEFINES) $(INCLUDES)
 KOBJ = MODLOAD
 MPS = MP SP
 
+# To pick up anything we might have missed
+include Makefile.extradefs
+
 # COMPDIRS is called in Makefile.common to do the actual builds.
 COMPDIRS=linux_compdirs
 
@@ -88,6 +91,9 @@ setup:
                        mkdir -p $${KDIR}; \
                        ln -fs ../Makefile $${KDIR}/Makefile ; \
                        ln -fs ../Makefile.common $${KDIR}/Makefile.common; \
+<i386_linux22 i386_linux24>
+                       sh ./redhat.sh ${LINUX_VERS} $${KDIR}/Makefile.extradefs; \
+<all>
                done \
        done
        
diff --git a/src/libafs/redhat.sh b/src/libafs/redhat.sh
new file mode 100755 (executable)
index 0000000..0d35c2a
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+# This is a bridge script until we take care of tightly linking Linux inode 
+# internals to AFS vnode internals
+
+IBYTES=""
+SETATTR=""
+
+grep i_bytes /lib/modules/$1/build/include/linux/fs.h > /dev/null
+if [ $? = 0 ]; then
+    IBYTES="-DSTRUCT_INODE_HAS_I_BYTES=1"
+fi
+grep "extern int inode_setattr" /lib/modules/$1/build/include/linux/fs.h > /dev/null
+if [ $? = 0 ]; then
+    SETATTR="-DINODE_SETATTR_NOT_VOID=1"
+fi
+
+/bin/rm $2
+echo "KDEFINES = ${IBYTES} ${SETATTR}" > $2
+exit 0