+++ /dev/null
-# included in Linux kernel directories
-# Rules for module building
-
-if LINUX25
-
-basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
-AM_CPPFLAGS= -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
-
-$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
- $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
- rm -f $(MODULE)_tmp.c
- $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
- $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
- $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
-
-else
-
-$(MODULE).o: $($(MODULE)_OBJECTS)
- $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $($(MODULE)_OBJECTS)
-
-endif
-
-tags:
- rm -f $(top_srcdir)/TAGS
- rm -f $(top_srcdir)/tags
- find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs etags -a
- find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
- find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs ctags -a
- find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a
+++ /dev/null
-# included in Linux kernel directories
-# Rules for module building
-
-if LINUX25
-
-basename=$(shell echo $< | sed -e 's/\.c//g' | sed -e 's/-//g' | sed -e 's/\.o//g' | sed -e 's/^.*\///g')
-AM_CPPFLAGS= -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -DKBUILD_MODNAME=$(MODULE) -DKBUILD_BASENAME=$(basename)
-
-$(MODULE).o: $($(MODULE)_OBJECTS) $($(MODULE)_DEPENDENCIES)
- $(LD) -m $(MOD_LINK) -r -o $(MODULE)_tmp.o $($(MODULE)_OBJECTS)
- rm -f $(MODULE)_tmp.c
- $(LINUX)/scripts/modpost $(LINUX)/vmlinux $(MODULE)_tmp.o
- $(COMPILE) -UKBUILD_BASENAME -DKBUILD_BASENAME=$(MODULE) -c $(MODULE)_tmp.mod.c
- $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $(MODULE)_tmp.o $(MODULE)_tmp.mod.o
-
-else
-
-$(MODULE).o: $($(MODULE)_OBJECTS)
- $(LD) -m $(MOD_LINK) -r -o $(MODULE).o $($(MODULE)_OBJECTS)
-
-endif
-
-tags:
- rm -f $(top_srcdir)/TAGS
- rm -f $(top_srcdir)/tags
- find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs etags -a
- find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs etags -a
- find $(top_srcdir)/../portals/ -name '*.[hc]' | xargs ctags -a
- find $(top_srcdir) -name '*.[hc]' | grep -v ".orig" | xargs ctags -a
else:
from fcntl import F_GETFL, F_SETFL
-PYMOD_DIR = "/usr/lib/lustre/python"
+PYMOD_DIR = "@PYMOD_DIR@"
def development_mode():
base = os.path.dirname(sys.argv[0])
- if os.access(base+"/Makefile.am", os.R_OK):
+ if os.access(base+"/Makefile", os.R_OK):
return 1
return 0
return module
def find_module(src_dir, dev_dir, modname):
- mod = '%s.o' % (modname)
- module = src_dir +'/'+ dev_dir +'/'+ mod
- try:
- if os.access(module, os.R_OK):
- return module
- except OSError:
- pass
+ modbase = src_dir +'/'+ dev_dir +'/'+ modname
+ for modext in '.ko', '.o':
+ module = modbase + modext
+ try:
+ if os.access(module, os.R_OK):
+ return module
+ except OSError:
+ pass
return None
# is the path a block device?
base = os.path.dirname(cmd)
if development_mode():
if not config.lustre:
+ debug('using objdir module paths')
config.lustre = (os.path.join(base, ".."))
# normalize the portals dir, using command line arg if set
if config.portals: