Whamcloud - gitweb
LU-17744 ldiskfs: mballoc stats fixes
[fs/lustre-release.git] / build / Makefile
index d00981f..2f767ae 100644 (file)
@@ -1,17 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0
+
 #
-# There are four ways this Makefile can be called:
+# This file is part of Lustre, http://www.lustre.org/
 #
+# build/Makefile
 #
-# 1.  As a subdirectory from the toplevel, for automake
+# There are four ways this Makefile can be called:
 #
+# 1.  As a subdirectory from the toplevel, for automake
 # 2.  A wrapper around the kernel's makefile when building modules, to
 #     possibly override the .config file
-#
 # 3.  At configure time, as the toplevel module dir for building
 #     kernel tests
 #
-# 4.  At configure time, to determine the kernel's idea of $(ARCH)
-#
 
 ifeq ($(PATCHLEVEL),)
 
@@ -27,22 +28,27 @@ else
 # so "include Makefile" below includes $LINUX/Makefile, not this file
 include $(LUSTRE_LINUX_CONFIG)
 include Makefile
+ifeq ($(DEQUOTE_CC_VERSION_TEXT),yes)
+CONFIG_CC_VERSION_TEXT=$(shell echo ${CONFIG_CC_VERSION_TEXT:1:-1})
+endif
 
 endif # LUSTRE_LINUX_CONFIG
 
 else # PATCHLEVEL
+ifeq ($(DEQUOTE_CC_VERSION_TEXT),yes)
+CONFIG_CC_VERSION_TEXT=$(shell echo ${CONFIG_CC_VERSION_TEXT:1:-1})
+endif
 
-# case 3
-
+# case #3
 ifneq ($(LUSTRE_KERNEL_TEST),)
+# extra-y works prior to 5.10
 extra-y = $(LUSTRE_KERNEL_TEST)
+# always-y works since 5.6
+always-y = $(LUSTRE_KERNEL_TEST)
+# always works for SUSE SP3 LTSS kernel
+always = $(LUSTRE_KERNEL_TEST)
 endif
 
 obj-m := conftest.o
 
 endif # PATCHLEVEL
-
-# case 4
-
-echoarch:
-       echo $(ARCH) >$(ARCHFILE)