From 2c6d007fc0c165d9da3bc39b48d2f2b07ce0aaf0 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 5 Aug 2022 09:23:37 +0200 Subject: [PATCH] package/lshw: reformat lshw was introduced in early 2012, and since then our coding standards have evolved substancially, and so lshw is lagging way behind nowadays. Reformat it with the current styles: - mandatory dependencies go before build variables - one item per line in multi-line assignments - space after the last item in a multi-line assignment - don't hard-code the build target 'all' in the common make opts - split long command lines - format build and install command lines similarly for ease of comparison Signed-off-by: Yann E. MORIN Signed-off-by: Thomas Petazzoni --- package/lshw/lshw.mk | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/package/lshw/lshw.mk b/package/lshw/lshw.mk index 9f1ff8938a..45b22e88e3 100644 --- a/package/lshw/lshw.mk +++ b/package/lshw/lshw.mk @@ -10,20 +10,29 @@ LSHW_SOURCE = lshw-B.$(LSHW_VERSION).tar.gz LSHW_LICENSE = GPL-2.0 LSHW_LICENSE_FILES = COPYING -LSHW_MAKE_OPTS = CC="$(TARGET_CC)" CXX="$(TARGET_CXX)" AR="$(TARGET_AR)" \ - RPM_OPT_FLAGS="$(TARGET_CFLAGS)" all +LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) + +LSHW_MAKE_OPTS = \ + CC="$(TARGET_CC)" \ + CXX="$(TARGET_CXX)" \ + AR="$(TARGET_AR)" \ + RPM_OPT_FLAGS="$(TARGET_CFLAGS)" + LSHW_MAKE_ENV = \ $(TARGET_MAKE_ENV) \ LIBS=$(TARGET_NLS_LIBS) -LSHW_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) define LSHW_BUILD_CMDS - $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src $(LSHW_MAKE_OPTS) + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src \ + $(LSHW_MAKE_OPTS) \ + all endef define LSHW_INSTALL_TARGET_CMDS - $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src DESTDIR=$(TARGET_DIR) \ - $(LSHW_MAKE_OPTS) install + $(LSHW_MAKE_ENV) $(MAKE) -C $(@D)/src \ + $(LSHW_MAKE_OPTS) \ + DESTDIR=$(TARGET_DIR) \ + install $(RM) -rf $(TARGET_DIR)/usr/share/lshw endef