diff options
author | Matthew Macy <[email protected]> | 2019-09-06 11:26:26 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-09-06 11:26:26 -0700 |
commit | bced7e3aaa3cf54d5e8e4f94e067144b27cb744b (patch) | |
tree | 729dac6996f4f11b88bc3a831b2b8d6852e6fbb6 /Makefile.am | |
parent | 870e7a52c105f26ef4254b90230d396f4ce39ea7 (diff) |
OpenZFS restructuring - move platform specific sources
Move platform specific Linux source under module/os/linux/
and update the build system accordingly. Additional code
restructuring will follow to make the common code fully
portable.
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matthew Macy <[email protected]>
Closes #9206
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 44 |
1 files changed, 32 insertions, 12 deletions
diff --git a/Makefile.am b/Makefile.am index 3992fe9ad..8266ca300 100644 --- a/Makefile.am +++ b/Makefile.am @@ -4,9 +4,16 @@ include config/rpm.am include config/deb.am include config/tgz.am -SUBDIRS = include rpm +SUBDIRS = include +if BUILD_LINUX +SUBDIRS += rpm +endif + if CONFIG_USER -SUBDIRS += udev etc man scripts lib tests cmd contrib +SUBDIRS += etc man scripts lib tests cmd contrib +if BUILD_LINUX +SUBDIRS += udev +endif endif if CONFIG_KERNEL SUBDIRS += module @@ -14,9 +21,11 @@ SUBDIRS += module extradir = $(prefix)/src/zfs-$(VERSION) extra_HEADERS = zfs.release.in zfs_config.h.in +if BUILD_LINUX kerneldir = $(prefix)/src/zfs-$(VERSION)/$(LINUX_VERSION) nodist_kernel_HEADERS = zfs.release zfs_config.h module/$(LINUX_SYMBOLS) endif +endif AUTOMAKE_OPTIONS = foreign EXTRA_DIST = autogen.sh copy-builtin @@ -31,8 +40,8 @@ EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.gladman.descrip EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl EXTRA_DIST += module/icp/asm-x86_64/aes/THIRDPARTYLICENSE.openssl.descrip -EXTRA_DIST += module/spl/THIRDPARTYLICENSE.gplv2 -EXTRA_DIST += module/spl/THIRDPARTYLICENSE.gplv2.descrip +EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2 +EXTRA_DIST += module/os/linux/spl/THIRDPARTYLICENSE.gplv2.descrip EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash EXTRA_DIST += module/zfs/THIRDPARTYLICENSE.cityhash.descrip @@ -63,9 +72,10 @@ all-local: dist-hook: gitrev cp ${top_srcdir}/include/zfs_gitrev.h $(distdir)/include; \ - sed -i 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ + sed ${ac_inplace} -e 's/Release:[[:print:]]*/Release: $(RELEASE)/' \ $(distdir)/META +if BUILD_LINUX # For compatibility, create a matching spl-x.y.z directly which contains # symlinks to the updated header and object file locations. These # compatibility links will be removed in the next major release. @@ -82,6 +92,7 @@ install-data-hook: ln -fs zfs_config.h spl_config.h && \ ln -fs zfs.release spl.release endif +endif codecheck: cstyle shellcheck flake8 mancheck testscheck vcscheck @@ -97,12 +108,15 @@ cstyle: ! -name '*.mod.c' -type f \ -exec ${top_srcdir}/scripts/cstyle.pl -cpP {} \+ +filter_executable = -exec test -x '{}' \; -print + shellcheck: @if type shellcheck > /dev/null 2>&1; then \ - shellcheck --exclude=SC1090 --format=gcc \ + shellcheck --exclude=SC1090 --exclude=SC1117 --format=gcc \ $$(find ${top_srcdir}/scripts/*.sh -type f) \ $$(find ${top_srcdir}/cmd/zed/zed.d/*.sh -type f) \ - $$(find ${top_srcdir}/cmd/zpool/zpool.d/* -executable); \ + $$(find ${top_srcdir}/cmd/zpool/zpool.d/* \ + -type f ${filter_executable}); \ else \ echo "skipping shellcheck because shellcheck is not installed"; \ fi @@ -117,13 +131,19 @@ mancheck: echo "skipping mancheck because mandoc is not installed"; \ fi +if BUILD_LINUX +stat_fmt = -c '%A %n' +else +stat_fmt = -f '%Sp %N' +endif + testscheck: @find ${top_srcdir}/tests/zfs-tests -type f \ - \( -name '*.ksh' -not -executable \) -o \ - \( -name '*.kshlib' -executable \) -o \ - \( -name '*.shlib' -executable \) -o \ - \( -name '*.cfg' -executable \) | \ - xargs -r stat -c '%A %n' | \ + \( -name '*.ksh' -not ${filter_executable} \) -o \ + \( -name '*.kshlib' ${filter_executable} \) -o \ + \( -name '*.shlib' ${filter_executable} \) -o \ + \( -name '*.cfg' ${filter_executable} \) | \ + xargs -r stat ${stat_fmt} | \ awk '{c++; print} END {if(c>0) exit 1}' vcscheck: |