diff mbox series

[02/20] package/lantiq: use make -C instead of `cd;`

Message ID b13108024c88aca35681878762c17e16afbb8d6b.1700010289.git.ehem+openwrt@m5p.com
State Not Applicable
Delegated to: Petr Štetiar
Headers show
Series Kernel build fixups, split object directory off (partial WIP) | expand

Commit Message

Elliott Mitchell Nov. 13, 2023, 10:38 p.m. UTC
The effect is the same, but this reduces work by the shell.  This
is generally preferred unless multiple commands need to be run in the
target directory.

Signed-off-by: Elliott Mitchell <ehem+openwrt@m5p.com>
---
 package/kernel/lantiq/ltq-adsl-mei/Makefile | 5 ++---
 package/kernel/lantiq/ltq-atm/Makefile      | 5 ++---
 package/kernel/lantiq/ltq-deu/Makefile      | 5 ++---
 package/kernel/lantiq/ltq-ptm/Makefile      | 5 ++---
 4 files changed, 8 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/package/kernel/lantiq/ltq-adsl-mei/Makefile b/package/kernel/lantiq/ltq-adsl-mei/Makefile
index 31e671e53f..e9db785960 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/Makefile
+++ b/package/kernel/lantiq/ltq-adsl-mei/Makefile
@@ -34,9 +34,8 @@  define Build/Configure
 endef
 
 define Build/Compile
-	cd $(LINUX_DIR); \
-		ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
-		$(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR)/ V=1 modules
+	ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
+	$(MAKE) -C $(LINUX_DIR) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR)/ V=1 modules
 endef
 
 $(eval $(call KernelPackage,ltq-adsl-danube-mei))
diff --git a/package/kernel/lantiq/ltq-atm/Makefile b/package/kernel/lantiq/ltq-atm/Makefile
index b81f3bb293..af852e9a01 100644
--- a/package/kernel/lantiq/ltq-atm/Makefile
+++ b/package/kernel/lantiq/ltq-atm/Makefile
@@ -39,9 +39,8 @@  define Build/Configure
 endef
 
 define Build/Compile
-	cd $(LINUX_DIR); \
-		ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
-		$(MAKE) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
+	ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
+	$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
 endef
 
 $(eval $(call KernelPackage,ltq-atm-danube))
diff --git a/package/kernel/lantiq/ltq-deu/Makefile b/package/kernel/lantiq/ltq-deu/Makefile
index 4e8127afab..4b8fae2766 100644
--- a/package/kernel/lantiq/ltq-deu/Makefile
+++ b/package/kernel/lantiq/ltq-deu/Makefile
@@ -34,9 +34,8 @@  define Build/Configure
 endef
 
 define Build/Compile
-	cd $(LINUX_DIR); \
-		ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
-		$(MAKE) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
+	ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
+	$(MAKE) -C $(LINUX_DIR) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
 endef
 
 $(eval $(call KernelPackage,ltq-deu-danube))
diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile
index b726cb1560..a1fb2250d2 100644
--- a/package/kernel/lantiq/ltq-ptm/Makefile
+++ b/package/kernel/lantiq/ltq-ptm/Makefile
@@ -43,9 +43,8 @@  define Build/Configure
 endef
 
 define Build/Compile
-	cd $(LINUX_DIR); \
-		ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
-		$(MAKE) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
+	ARCH=mips CROSS_COMPILE="$(KERNEL_CROSS)" \
+	$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS) BUILD_VARIANT=$(BUILD_VARIANT) M=$(PKG_BUILD_DIR) V=1 modules
 endef
 
 $(eval $(call KernelPackage,ltq-ptm-danube))