Move the headers to the top-level. This will simplify the
comiler command-line, isolate autotools dependencies to the
headers, and allow for lustre_compat to use plain Makefiles
(similar to Linux).
Test-Parameters: trivial
Fixes:
74faf91f44 ("LU-18687 compat: move xarray to lustre_compat")
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I851fa183c14a2661bb1eca91d94b7d757f9e575a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58694
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
. \
@LUSTREIOKIT_SUBDIR@ \
Documentation \
- lustre_compat \
libcfs \
lnet \
lustre
DIST_SUBDIRS := ldiskfs \
lustre-iokit \
Documentation \
- lustre_compat \
libcfs \
lnet \
lustre \
grep -v config.h.in config.h.in > $@
dist-hook: undef.h
+ find include/ -type f \( -name "*.h" \) \
+ -exec cp --parents {} $(distdir) \;
+ find lustre_compat/ -type f \( -name "*.c" -o -iname "Makefile" \) \
+ -exec cp --parents {} $(distdir) \;
find $(distdir) -name .deps -o \
-name CVS -o \
-name .svn -o \
])
#
-# LB_COMPAT_CONFIG_FILES
-#
-# build-specific config files (lustre_compat)
-#
-AC_DEFUN([LB_COMPAT_CONFIG_FILES], [
- AC_CONFIG_FILES(
- lustre_compat/Makefile
- lustre_compat/lib/Makefile
- lustre_compat/autoMakefile
- lustre_compat/lib/autoMakefile
- lustre_compat/include/Makefile
- lustre_compat/include/lustre_compat/Makefile
- lustre_compat/include/lustre_compat/linux/Makefile
- )
-])
-
-#
# LB_CONFIG_SERVERS
#
AC_DEFUN([LB_CONFIG_SERVERS], [
LPLUG_CONFIGURE
LIBCFS_CONFIG_FILES
LB_CONFIG_FILES
-LB_COMPAT_CONFIG_FILES
LN_CONFIG_FILES
LC_CONFIG_FILES
LPLUG_CONFIG_FILES
AC_SUBST(CCASFLAGS)
# everyone builds against lnet and lustre kernel headers
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/libcfs/include -I$PWD/libcfs/include/libcfs -I$PWD/lnet/include/uapi -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include -I$PWD/lustre_compat/include"
+EXTRA_KCFLAGS="$EXTRA_KCFLAGS -g -I$PWD/libcfs/include -I$PWD/libcfs/include/libcfs -I$PWD/lnet/include/uapi -I$PWD/lnet/include -I$PWD/lustre/include/uapi -I$PWD/lustre/include -I$PWD/include"
AC_SUBST(EXTRA_KCFLAGS)
]) # LTC_PROG_CC
COMPAT := @top_srcdir@/lustre_compat/lib/
libcfs_dir := $(dir $(lastword $(MAKEFILE_LIST)))
--include $(libcfs_dir)/../../lustre_compat/lib/Makefile
+include $(libcfs_dir)/../../lustre_compat/lib/Makefile
libcfs-linux-objs := linux-prim.o
libcfs-linux-objs += linux-hash.o
libcfs-compat-objs += $(patsubst %,$(COMPAT)%,$(compat_objs))
+EXTRA_DIST = $(libcfs-compat-objs:.o=.c)
+
libcfs-crypto-objs := crypto.o fname.o hkdf.o hooks.o keyring.o
libcfs-crypto-objs += keysetup.o keysetup_v1.o policy.o
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-SUBDIRS = lib include
+++ /dev/null
-/Makefile.in
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-SUBDIRS = lustre_compat
-DIST_SUBDIRS = lustre_compat
+++ /dev/null
-/Makefile.in
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-SUBDIRS = linux
-DIST_SUBDIRS = linux
+++ /dev/null
-/Makefile.in
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-EXTRA_DIST = xarray.h glob.h generic-radix-tree.h
# This file is part of Lustre, http://www.lustre.org/
#
-obj-m += lib/
-
-@INCLUDE_RULES@
+compat_objs := xarray.o glob.o generic-radix-tree.o
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-compat_objs := xarray.o glob.o generic-radix-tree.o
-
-EXTRA_DIST = $(compat_objs:.o=.c)
-
-ifneq "$(MODULES)" "libcfs"
-@INCLUDE_RULES@
-endif
+++ /dev/null
-# SPDX-License-Identifier: GPL-2.0
-
-#
-# This file is part of Lustre, http://www.lustre.org/
-#
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@