diff --git a/lnet/Rules.linux b/lnet/Rules.linux deleted file mode 100644 index 232a24882f9ee8beba272818c377df98071abe73..0000000000000000000000000000000000000000 --- a/lnet/Rules.linux +++ /dev/null @@ -1,29 +0,0 @@ -# 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 diff --git a/lustre/portals/Rules.linux b/lustre/portals/Rules.linux deleted file mode 100644 index 232a24882f9ee8beba272818c377df98071abe73..0000000000000000000000000000000000000000 --- a/lustre/portals/Rules.linux +++ /dev/null @@ -1,29 +0,0 @@ -# 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 diff --git a/lustre/utils/lconf b/lustre/utils/lconf.in similarity index 99% rename from lustre/utils/lconf rename to lustre/utils/lconf.in index ac22336df1045107801bc24e72ea3c06ca3fa37f..3c7e58857ff32171aaa5ed2e2793bac588dcfe9e 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf.in @@ -35,11 +35,11 @@ if sys.version[0] == '1': 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 @@ -699,13 +699,14 @@ def do_find_file(base, mod): 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? @@ -2352,6 +2353,7 @@ def setupModulePath(cmd, portals_dir = PORTALS_DIR): 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: