From a0aadf5666d5070e55ab1a6fd58eddf06494010c Mon Sep 17 00:00:00 2001 From: behlendo Date: Wed, 27 Feb 2008 20:52:44 +0000 Subject: [PATCH] OK, everything builds now. My initial intent was to place all of the directories at the top level but that proved troublesome. The kernel buildsystem and autoconf were conflicting too much. To resolve the issue I moved the kernel bits in to a modules directory which can then only use the kernel build system. We just pass along the likely make targets to the kernel build system. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@11 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- Makefile.am | 3 ++- cmd/Makefile.am | 2 +- configure.ac | 10 +++++----- modules/Makefile.in | 12 ++++++++++++ {spl => modules/spl}/Makefile.in | 8 ++------ {spl => modules/spl}/linux-generic.c | 0 {spl => modules/spl}/linux-kmem.c | 0 {spl => modules/spl}/linux-rwlock.c | 0 {spl => modules/spl}/linux-taskq.c | 0 {spl => modules/spl}/linux-thread.c | 0 {splat => modules/splat}/Makefile.in | 7 +------ {splat => modules/splat}/splat-condvar.c | 0 {splat => modules/splat}/splat-ctl.c | 0 {splat => modules/splat}/splat-kmem.c | 0 {splat => modules/splat}/splat-mutex.c | 0 {splat => modules/splat}/splat-random.c | 0 {splat => modules/splat}/splat-rwlock.c | 0 {splat => modules/splat}/splat-taskq.c | 0 {splat => modules/splat}/splat-thread.c | 0 {splat => modules/splat}/splat-time.c | 0 src/Makefile.am | 1 - 21 files changed, 23 insertions(+), 20 deletions(-) create mode 100644 modules/Makefile.in rename {spl => modules/spl}/Makefile.in (88%) rename {spl => modules/spl}/linux-generic.c (100%) rename {spl => modules/spl}/linux-kmem.c (100%) rename {spl => modules/spl}/linux-rwlock.c (100%) rename {spl => modules/spl}/linux-taskq.c (100%) rename {spl => modules/spl}/linux-thread.c (100%) rename {splat => modules/splat}/Makefile.in (91%) rename {splat => modules/splat}/splat-condvar.c (100%) rename {splat => modules/splat}/splat-ctl.c (100%) rename {splat => modules/splat}/splat-kmem.c (100%) rename {splat => modules/splat}/splat-mutex.c (100%) rename {splat => modules/splat}/splat-random.c (100%) rename {splat => modules/splat}/splat-rwlock.c (100%) rename {splat => modules/splat}/splat-taskq.c (100%) rename {splat => modules/splat}/splat-thread.c (100%) rename {splat => modules/splat}/splat-time.c (100%) delete mode 100644 src/Makefile.am diff --git a/Makefile.am b/Makefile.am index 7abb6ee39b..1d219cd85a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,10 @@ AUTOMAKE_OPTIONS = foreign dist-zip -SUBDIRS = src include scripts +SUBDIRS = lib cmd modules include scripts CONFIG_CLEAN_FILES = aclocal.m4 config.guess config.sub CONFIG_CLEAN_FILES += depcomp install-sh missing mkinstalldirs EXTRA_DIST = autogen.sh rpms: dist Makefile rpmbuild -ta $(distdir).tar.gz + diff --git a/cmd/Makefile.am b/cmd/Makefile.am index ae3961a977..f211db18f2 100644 --- a/cmd/Makefile.am +++ b/cmd/Makefile.am @@ -2,4 +2,4 @@ AM_CFLAGS = -g -O2 -W -Wall -Wstrict-prototypes -Wshadow INCLUDES = -I$(top_srcdir)/include sbin_PROGRAMS = splat splat_SOURCES = splat.c -splat_LDFLAGS = $(top_builddir)/src/lib/libcommon.la +splat_LDFLAGS = $(top_builddir)/lib/libcommon.la diff --git a/configure.ac b/configure.ac index 215b5091c1..3992520ac8 100644 --- a/configure.ac +++ b/configure.ac @@ -109,11 +109,11 @@ AC_SUBST(KERNELCPPFLAGS) AC_SUBST(KERNELCFLAGS) AC_CONFIG_FILES([ Makefile - src/Makefile - src/lib/Makefile - src/cmd/Makefile - src/spl/Makefile - src/splat/Makefile + lib/Makefile + cmd/Makefile + modules/Makefile + modules/spl/Makefile + modules/splat/Makefile include/Makefile scripts/Makefile scripts/spl.spec diff --git a/modules/Makefile.in b/modules/Makefile.in new file mode 100644 index 0000000000..f1cb0ca46a --- /dev/null +++ b/modules/Makefile.in @@ -0,0 +1,12 @@ +subdir-m += spl +subdir-m += splat + +all: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules + +install uninstall clean distclean maintainer-clean distdir: + $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ + + + + diff --git a/spl/Makefile.in b/modules/spl/Makefile.in similarity index 88% rename from spl/Makefile.in rename to modules/spl/Makefile.in index 82b45a287a..134d88227f 100644 --- a/spl/Makefile.in +++ b/modules/spl/Makefile.in @@ -13,13 +13,12 @@ spl-objs += linux-kmem.o spl-objs += linux-thread.o spl-objs += linux-taskq.o spl-objs += linux-rwlock.o +spl-objs += linux-generic.o splmodule := spl.ko splmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splmoduledir) $(INSTALL) -m 644 $(splmodule) $(DESTDIR)$(splmoduledir)/$(splmodule) -/sbin/depmod -a @@ -39,6 +38,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/spl/linux-generic.c b/modules/spl/linux-generic.c similarity index 100% rename from spl/linux-generic.c rename to modules/spl/linux-generic.c diff --git a/spl/linux-kmem.c b/modules/spl/linux-kmem.c similarity index 100% rename from spl/linux-kmem.c rename to modules/spl/linux-kmem.c diff --git a/spl/linux-rwlock.c b/modules/spl/linux-rwlock.c similarity index 100% rename from spl/linux-rwlock.c rename to modules/spl/linux-rwlock.c diff --git a/spl/linux-taskq.c b/modules/spl/linux-taskq.c similarity index 100% rename from spl/linux-taskq.c rename to modules/spl/linux-taskq.c diff --git a/spl/linux-thread.c b/modules/spl/linux-thread.c similarity index 100% rename from spl/linux-thread.c rename to modules/spl/linux-thread.c diff --git a/splat/Makefile.in b/modules/splat/Makefile.in similarity index 91% rename from splat/Makefile.in rename to modules/splat/Makefile.in index ebc0fb6cf5..54155c8de2 100644 --- a/splat/Makefile.in +++ b/modules/splat/Makefile.in @@ -23,9 +23,7 @@ splat-objs += splat-time.o splatmodule := splat.ko splatmoduledir := @kmoduledir@/kernel/lib/ -all: all-spec - -install: all +install: mkdir -p $(DESTDIR)$(splatmoduledir) $(INSTALL) -m 644 $(splatmodule) $(DESTDIR)$(splatmoduledir)/$(splatmodule) -/sbin/depmod -a @@ -45,6 +43,3 @@ maintainer-clean: distclean distdir: $(DISTFILES) cp -p $(DISTFILES) $(distdir) - -all-spec: - $(MAKE) -C @kernelsrc@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules diff --git a/splat/splat-condvar.c b/modules/splat/splat-condvar.c similarity index 100% rename from splat/splat-condvar.c rename to modules/splat/splat-condvar.c diff --git a/splat/splat-ctl.c b/modules/splat/splat-ctl.c similarity index 100% rename from splat/splat-ctl.c rename to modules/splat/splat-ctl.c diff --git a/splat/splat-kmem.c b/modules/splat/splat-kmem.c similarity index 100% rename from splat/splat-kmem.c rename to modules/splat/splat-kmem.c diff --git a/splat/splat-mutex.c b/modules/splat/splat-mutex.c similarity index 100% rename from splat/splat-mutex.c rename to modules/splat/splat-mutex.c diff --git a/splat/splat-random.c b/modules/splat/splat-random.c similarity index 100% rename from splat/splat-random.c rename to modules/splat/splat-random.c diff --git a/splat/splat-rwlock.c b/modules/splat/splat-rwlock.c similarity index 100% rename from splat/splat-rwlock.c rename to modules/splat/splat-rwlock.c diff --git a/splat/splat-taskq.c b/modules/splat/splat-taskq.c similarity index 100% rename from splat/splat-taskq.c rename to modules/splat/splat-taskq.c diff --git a/splat/splat-thread.c b/modules/splat/splat-thread.c similarity index 100% rename from splat/splat-thread.c rename to modules/splat/splat-thread.c diff --git a/splat/splat-time.c b/modules/splat/splat-time.c similarity index 100% rename from splat/splat-time.c rename to modules/splat/splat-time.c diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 51013b8d12..0000000000 --- a/src/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = lib cmd spl splat