tools/ninja: cleanup Makefile
authorMichael Pratt <mcpratt@pm.me>
Mon, 22 Jul 2024 19:51:12 +0000 (15:51 -0400)
committerRobert Marko <robimarko@gmail.com>
Mon, 14 Oct 2024 11:58:44 +0000 (13:58 +0200)
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@pm.me>
Link: https://github.com/openwrt/openwrt/pull/16693
Signed-off-by: Robert Marko <robimarko@gmail.com>
tools/ninja/Makefile

index 4763e759d8a0578120f8c5ba65e9ade8a61d4ecf..16429b73f3ba20a2d46fbf0d6df513c99e4bad21 100644 (file)
@@ -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