diff options
author | Brian Behlendorf <[email protected]> | 2009-03-10 21:13:30 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-03-10 21:13:30 -0700 |
commit | c8e569dd1c5c7fdeae0ad8ab149388896bcf5567 (patch) | |
tree | b573132af1b7a7aa4b01e0b0154e7b9f5c615045 /module | |
parent | b1b76c66347a84f9d0147f8a775f0a04cf532de9 (diff) |
Build system and packaging (RPM support) (Part 2)
Complete support for dist install srpm and rpm make targets.
Diffstat (limited to 'module')
-rw-r--r-- | module/Makefile.in | 37 | ||||
-rw-r--r-- | module/avl/Makefile.in | 3 | ||||
-rw-r--r-- | module/avl/include/Makefile.in | 1 | ||||
-rw-r--r-- | module/avl/include/sys/Makefile.in | 1 | ||||
-rw-r--r-- | module/nvpair/Makefile.in | 3 | ||||
-rw-r--r-- | module/nvpair/include/Makefile.in | 2 | ||||
-rw-r--r-- | module/nvpair/include/sys/Makefile.in | 1 | ||||
-rw-r--r-- | module/unicode/Makefile.in | 3 | ||||
-rw-r--r-- | module/unicode/include/Makefile.in | 1 | ||||
-rw-r--r-- | module/unicode/include/sys/Makefile.in | 1 | ||||
-rw-r--r-- | module/zcommon/Makefile.in | 3 | ||||
-rw-r--r-- | module/zcommon/include/Makefile.in | 2 | ||||
-rw-r--r-- | module/zcommon/include/sys/Makefile.in | 14 | ||||
-rw-r--r-- | module/zcommon/include/sys/fm/Makefile.in | 1 | ||||
-rw-r--r-- | module/zcommon/include/sys/fm/fs/Makefile.in | 1 | ||||
-rw-r--r-- | module/zcommon/include/sys/fs/Makefile.in | 1 | ||||
-rw-r--r-- | module/zfs/Makefile.in | 2 |
17 files changed, 29 insertions, 48 deletions
diff --git a/module/Makefile.in b/module/Makefile.in index d470487a9..993b7fc3e 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -1,13 +1,34 @@ -subdir-m = avl nvpair unicode zcommon zfs +subdir-m += avl +subdir-m += nvpair +subdir-m += unicode +subdir-m += zcommon +subdir-m += zfs +subdir-m += zpios -# Make the exported SPL symbols available to these modules. -# Unfortunately there is not a cleaner way to do this, modpost -# does not contain an option to search additional symbol files. -all: +modules clean: + # Make the exported SPL symbols available to these modules. cp @splsymvers@ . - $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ modules - -install uninstall clean distclean maintainer-clean distdir: $(MAKE) -C @LINUX@ SUBDIRS=`pwd` @KERNELMAKE_PARAMS@ $@ +modules_install: + $(MAKE) -C @LINUX@ SUBDIRS=`pwd` INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=addon $@ + # Install the required headers in to the kernel source + (mkdir -p $(DESTDIR)/@LINUX@/include/zfs && \ + find . -mindepth 3 -maxdepth 3 -name '*.h' | \ + xargs cp -t $(DESTDIR)/@LINUX@/include/zfs) || exit 1; \ + (mkdir -p $(DESTDIR)/@LINUX@/include/zfs/sys && \ + find . -mindepth 4 -maxdepth 4 -name '*.h' | \ + xargs cp -t $(DESTDIR)/@LINUX@/include/zfs/sys) || exit 1; + +distdir: + distfiles=`find . -name '*.c' -o -name '*.h'`; \ + for distfile in $$distfiles; do \ + distpath=`dirname $$distdir/$$distfile`; \ + (/bin/mkdir -p $$distpath && \ + /bin/cp $$distfile $$distdir/$$distfile) || exit 1; \ + done + +distclean maintainer-clean: clean +install: modules_install +all: modules check: diff --git a/module/avl/Makefile.in b/module/avl/Makefile.in index 086556c63..941de20f4 100644 --- a/module/avl/Makefile.in +++ b/module/avl/Makefile.in @@ -1,6 +1,3 @@ -subdir-m += include -DISTFILES = *.c - MODULE := zavl EXTRA_CFLAGS = -I@MODDIR@/avl/include diff --git a/module/avl/include/Makefile.in b/module/avl/include/Makefile.in deleted file mode 100644 index 6611e4143..000000000 --- a/module/avl/include/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -subdir-m += sys diff --git a/module/avl/include/sys/Makefile.in b/module/avl/include/sys/Makefile.in deleted file mode 100644 index 8149c3861..000000000 --- a/module/avl/include/sys/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -DISTFILES = avl.h avl_impl.h diff --git a/module/nvpair/Makefile.in b/module/nvpair/Makefile.in index 29aaa327c..acd9ac4f9 100644 --- a/module/nvpair/Makefile.in +++ b/module/nvpair/Makefile.in @@ -1,6 +1,3 @@ -subdir-m += include -DISTFILES = *.c - MODULE := znvpair EXTRA_CFLAGS = -I@MODDIR@/nvpair/include diff --git a/module/nvpair/include/Makefile.in b/module/nvpair/include/Makefile.in deleted file mode 100644 index d92f7114c..000000000 --- a/module/nvpair/include/Makefile.in +++ /dev/null @@ -1,2 +0,0 @@ -subdir-m += sys -DISTFILES = libnvpair.h diff --git a/module/nvpair/include/sys/Makefile.in b/module/nvpair/include/sys/Makefile.in deleted file mode 100644 index 4f970cea5..000000000 --- a/module/nvpair/include/sys/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -DISTFILES = nvpair.h nvpair_impl.h diff --git a/module/unicode/Makefile.in b/module/unicode/Makefile.in index 42caf08a6..1a78fe0b5 100644 --- a/module/unicode/Makefile.in +++ b/module/unicode/Makefile.in @@ -1,6 +1,3 @@ -subdir-m += include -DISTFILES = *.c - MODULE := zunicode EXTRA_CFLAGS = -I@MODDIR@/unicode/include diff --git a/module/unicode/include/Makefile.in b/module/unicode/include/Makefile.in deleted file mode 100644 index 6611e4143..000000000 --- a/module/unicode/include/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -subdir-m += sys diff --git a/module/unicode/include/sys/Makefile.in b/module/unicode/include/sys/Makefile.in deleted file mode 100644 index fb0057c0d..000000000 --- a/module/unicode/include/sys/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -DISTFILES = u8_textprep.h u8_textprep_data.h diff --git a/module/zcommon/Makefile.in b/module/zcommon/Makefile.in index 802543f8d..58e2591f6 100644 --- a/module/zcommon/Makefile.in +++ b/module/zcommon/Makefile.in @@ -1,6 +1,3 @@ -subdir-m += include -DISTFILES = *.c - MODULE := zcommon EXTRA_CFLAGS = -I@MODDIR@/avl/include diff --git a/module/zcommon/include/Makefile.in b/module/zcommon/include/Makefile.in deleted file mode 100644 index 69ab6afa2..000000000 --- a/module/zcommon/include/Makefile.in +++ /dev/null @@ -1,2 +0,0 @@ -subdir-m += sys -DISTFILES = zfs_comutil.h zfs_deleg.h zfs_namecheck.h zfs_prop.h diff --git a/module/zcommon/include/sys/Makefile.in b/module/zcommon/include/sys/Makefile.in deleted file mode 100644 index e73a05fce..000000000 --- a/module/zcommon/include/sys/Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ -subdir-m += fm fs - -DISTFILES = arc.h bplist.h compress.h dbuf.h dmu.h dmu_impl.h -DISTFILES += dmu_objset.h dmu_traverse.h dmu_tx.h dmu_zfetch.h -DISTFILES += dnode.h dsl_dataset.h dsl_deleg.h dsl_dir.h dsl_pool.h -DISTFILES += dsl_prop.h dsl_synctask.h list.h list_impl.h metaslab.h -DISTFILES += metaslab_impl.h refcount.h rprwlock.h rrwlock.h spa.h -DISTFILES += spa_boot.h spa_impl.h space_map.h txg.h txg_impl.h uberblock.h -DISTFILES += uberblock_impl.h unique.h vdev.h vdev_disk.h vdev_file.h -DISTFILES += vdev_impl.h zap.h zap_impl.h zap_leaf.h zfs_acl.h -DISTFILES += zfs_context.h zfs_context_user.h zfs_ctldir.h zfs_debug.h -DISTFILES += zfs_dir.h zfs_fuid.h zfs_i18n.h zfs_ioctl.h zfs_rlock.h -DISTFILES += zfs_vfsops.h zfs_znode.h zil.h zil_impl.h zio.h -DISTFILES += zio_checksum.h zio_compress.h zio_impl.h zvol.h diff --git a/module/zcommon/include/sys/fm/Makefile.in b/module/zcommon/include/sys/fm/Makefile.in deleted file mode 100644 index 0a4dc0223..000000000 --- a/module/zcommon/include/sys/fm/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -subdir-m += fs diff --git a/module/zcommon/include/sys/fm/fs/Makefile.in b/module/zcommon/include/sys/fm/fs/Makefile.in deleted file mode 100644 index cbfbe3c67..000000000 --- a/module/zcommon/include/sys/fm/fs/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -DISTFILES = zfs.h diff --git a/module/zcommon/include/sys/fs/Makefile.in b/module/zcommon/include/sys/fs/Makefile.in deleted file mode 100644 index cbfbe3c67..000000000 --- a/module/zcommon/include/sys/fs/Makefile.in +++ /dev/null @@ -1 +0,0 @@ -DISTFILES = zfs.h diff --git a/module/zfs/Makefile.in b/module/zfs/Makefile.in index 08733a2ad..2bde8a89a 100644 --- a/module/zfs/Makefile.in +++ b/module/zfs/Makefile.in @@ -1,5 +1,3 @@ -DISTFILES = *.c - MODULE := zfs EXTRA_CFLAGS = -I@MODDIR@/zfs/include |