[openwrt/openwrt] tools/ninja: cleanup Makefile

LEDE Commits lede-commits at lists.infradead.org
Mon Oct 14 04:58:48 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3efedda1daa8c8fd048b0df926a04086e054c365

commit 3efedda1daa8c8fd048b0df926a04086e054c365
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Jul 22 15:51:12 2024 -0400

    tools/ninja: cleanup Makefile
    
    Use default CXXFLAGS and LDFLAGS variables.
    
    Directly add --verbose flag without a variable.
    
    Split up lines for script arguments.
    
    Delete unnecessary lines.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/16693
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/ninja/Makefile | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/tools/ninja/Makefile b/tools/ninja/Makefile
index 4763e759d8..16429b73f3 100644
--- a/tools/ninja/Makefile
+++ b/tools/ninja/Makefile
@@ -10,29 +10,23 @@ PKG_HASH:=31747ae633213f1eda3842686f83c2aa1412e0f5691d1c14dbbcc67fe7400cea
 
 include $(INCLUDE_DIR)/host-build.mk
 
-CONFIGURE_ARGS:=
-ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
-  CONFIGURE_ARGS+=--verbose
-endif
-
 define Host/Configure
 endef
 
 define Host/Compile
 	cd $(HOST_BUILD_DIR) && \
+		$(HOST_MAKE_VARS) \
 		CXX="$(HOSTCXX_NOCACHE)" \
-		CXXFLAGS="$(HOST_CXXFLAGS) $(HOST_CPPFLAGS)" \
-		LDFLAGS="$(HOST_LDFLAGS)" \
-		$(STAGING_DIR_HOST)/bin/$(PYTHON) configure.py --bootstrap $(CONFIGURE_ARGS)
+		$(STAGING_DIR_HOST)/bin/$(PYTHON) configure.py \
+			--bootstrap \
+			--verbose
 endef
 
 define Host/Install
-	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
 	$(INSTALL_BIN) $(HOST_BUILD_DIR)/ninja $(STAGING_DIR_HOST)/bin/
 endef
 
 define Host/Clean
-	$(call Host/Clean/Default)
 	rm -f $(STAGING_DIR_HOST)/bin/ninja
 endef
 




More information about the lede-commits mailing list