From: jacob Date: Thu, 1 Apr 2004 03:34:59 +0000 (+0000) Subject: b=3041 X-Git-Tag: 1.2.2~114 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b85db26c96e64fbd2926564ffa644b79f44f9272;p=fs%2Flustre-release.git b=3041 b=3058 Clean up the autoconf and automake bits: * now liblustre and kernel modules can be built in the same tree use --disable-modules, --disable-liblustre to disable those bits * 2.6 modules are now built as .ko, and lconf can deal with them * fixes for builddir != srcdir --- diff --git a/lnet/Rules.linux b/lnet/Rules.linux deleted file mode 100644 index 232a248..0000000 --- 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 232a248..0000000 --- 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 ac22336..3c7e588 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: