[PATCH 13/20] [WIP] build: point user_headers at $(LINUX_OBJ_DIR)
Elliott Mitchell
ehem+openwrt at m5p.com
Sat Nov 11 22:51:08 PST 2023
These may be regenerated with every build. As such they seem
appropriate for the object directory, rather than source.
Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
---
include/kernel-defaults.mk | 6 +++---
package/devel/strace/Makefile | 2 +-
package/network/config/swconfig/Makefile | 2 +-
package/network/utils/iptables/Makefile | 8 ++++----
package/network/utils/linux-atm/Makefile | 2 +-
5 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 0b421d2cc3..10cd83712a 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -35,8 +35,8 @@ else
rmdir $(LINUX_DIR); \
fi
ln -s $(CONFIG_EXTERNAL_KERNEL_TREE) $(LINUX_DIR)
- if [ -d $(LINUX_DIR)/user_headers ]; then \
- rm -rf $(LINUX_DIR)/user_headers; \
+ if [ -d $(LINUX_OBJ_DIR)/user_headers ]; then \
+ rm -rf $(LINUX_OBJ_DIR)/user_headers; \
fi
endef
endif
@@ -111,7 +111,7 @@ define Kernel/Configure/Default
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config; \
cp $(LINUX_DIR)/.config.set $(LINUX_DIR)/.config.prev; \
}
- $(_SINGLE) [ -d $(LINUX_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_DIR)/user_headers headers_install
+ $(_SINGLE) [ -d $(LINUX_OBJ_DIR)/user_headers ] || $(KERNEL_MAKE) $(if $(findstring uml,$(BOARD)),ARCH=$(ARCH)) INSTALL_HDR_PATH=$(LINUX_OBJ_DIR)/user_headers headers_install
grep '=[ym]' $(LINUX_DIR)/.config.set | LC_ALL=C sort | $(MKHASH) md5 > $(LINUX_DIR)/.vermagic
endef
diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile
index 3343177c3e..fa5e5c0492 100644
--- a/package/devel/strace/Makefile
+++ b/package/devel/strace/Makefile
@@ -31,7 +31,7 @@ PKG_CONFIG_DEPENDS := \
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/nls.mk
-HOST_CFLAGS += -I$(LINUX_DIR)/user_headers/include
+HOST_CFLAGS += -I$(LINUX_OBJ_DIR)/user_headers/include
CONFIGURE_VARS+= \
LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
diff --git a/package/network/config/swconfig/Makefile b/package/network/config/swconfig/Makefile
index 6549075e5c..69f795ce1e 100644
--- a/package/network/config/swconfig/Makefile
+++ b/package/network/config/swconfig/Makefile
@@ -30,7 +30,7 @@ TARGET_CPPFLAGS := \
-I$(STAGING_DIR)/usr/include/libnl-tiny \
-I$(PKG_BUILD_DIR) \
$(TARGET_CPPFLAGS) \
- -I$(LINUX_DIR)/user_headers/include
+ -I$(LINUX_OBJ_DIR)/user_headers/include
define Build/Compile
CFLAGS="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" \
diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index 45a2b49070..f9e8d619fa 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -586,19 +586,19 @@ endef
TARGET_CPPFLAGS := \
-I$(PKG_BUILD_DIR)/include \
- -I$(LINUX_DIR)/user_headers/include \
+ -I$(LINUX_OBJ_DIR)/user_headers/include \
$(TARGET_CPPFLAGS)
TARGET_CFLAGS += \
-I$(PKG_BUILD_DIR)/include \
- -I$(LINUX_DIR)/user_headers/include \
+ -I$(LINUX_OBJ_DIR)/user_headers/include \
-DNO_LEGACY
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
--enable-devel \
- --with-kernel="$(LINUX_DIR)/user_headers" \
+ --with-kernel="$(LINUX_OBJ_DIR)/user_headers" \
--with-xtlibdir=/usr/lib/iptables \
--with-xt-lock-name=/var/run/xtables.lock \
$(if $(CONFIG_IPTABLES_CONNLABEL),,--disable-connlabel) \
@@ -607,7 +607,7 @@ CONFIGURE_ARGS += \
MAKE_FLAGS := \
$(TARGET_CONFIGURE_OPTS) \
COPT_FLAGS="$(TARGET_CFLAGS)" \
- KERNEL_DIR="$(LINUX_DIR)/user_headers/" PREFIX=/usr \
+ KERNEL_DIR="$(LINUX_OBJ_DIR)/user_headers/" PREFIX=/usr \
KBUILD_OUTPUT="$(LINUX_DIR)" \
BUILTIN_MODULES="$(patsubst ip6t_%,%,$(patsubst ipt_%,%,$(patsubst xt_%,%,$(IPT_BUILTIN) $(IPT_CONNTRACK-m) $(IPT_NAT-m))))"
diff --git a/package/network/utils/linux-atm/Makefile b/package/network/utils/linux-atm/Makefile
index 43f4b6556b..0bed1d6e6d 100644
--- a/package/network/utils/linux-atm/Makefile
+++ b/package/network/utils/linux-atm/Makefile
@@ -99,7 +99,7 @@ endef
$(foreach t,$(ATM_DEBUG_TOOLS),$(eval $(call GenAtmPlugin,atm-$(t),$(t))))
-TARGET_CFLAGS += -I$(LINUX_DIR)/user_headers/include
+TARGET_CFLAGS += -I$(LINUX_OBJ_DIR)/user_headers/include
define Build/Configure
$(call Build/Configure/Default)
--
(\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/)
\BS ( | ehem+openwrt at m5p.com PGP 87145445 | ) /
\_CS\ | _____ -O #include <stddisclaimer.h> O- _____ | / _/
8A19\___\_|_/58D2 7E3D DDF4 7BA6 <-PGP-> 41D1 B375 37D0 8714\_|_/___/5445
More information about the openwrt-devel
mailing list