[openwrt/openwrt] tools/libtool: add maintainer-clean to clean target
LEDE Commits
lede-commits at lists.infradead.org
Sat Jul 26 05:38:32 PDT 2025
robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c7554019ddf0d597cb4921788b04b843ab05e2a4
commit c7554019ddf0d597cb4921788b04b843ab05e2a4
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sun Sep 22 23:38:21 2024 -0400
tools/libtool: add maintainer-clean to clean target
Use the clean recipe during build, so that files already
generated by the bootstrapping within the release are removed
before the bootstrap script is run again.
Override an automake variable "am__CONFIG_DISTCLEAN_FILES"
and related variables for their dependencies
in order to prevent removing config.status and other configure files
so that configure stage does not need to be ran twice.
Automake with modified rules must be ran
in order to generate a Makefile that does not delete itself.
Signed-off-by: Michael Pratt <mcpratt at pm.me>
Link: https://github.com/openwrt/openwrt/pull/16522
Signed-off-by: Robert Marko <robimarko at gmail.com>
---
tools/libtool/Makefile | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile
index 761f7dc06b..4992fa7710 100644
--- a/tools/libtool/Makefile
+++ b/tools/libtool/Makefile
@@ -23,6 +23,10 @@ export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
HOST_CONFIGURE_VARS += \
lt_cv_sys_dlsearch_path=""
+HOST_MAKE_FLAGS += \
+ am__CONFIG_DISTCLEAN_FILES= \
+ CONFIG_STATUS_DEPENDENCIES=
+
define Host/Bootstrap
( \
cd $(HOST_BUILD_DIR); \
@@ -45,6 +49,7 @@ endef
define Host/Configure
$(if $(QUILT),$(call Host/Bootstrap))
$(call Host/Configure/Default)
+ $(call Host/Uninstall)
endef
define Host/Install
@@ -54,6 +59,7 @@ endef
define Host/Uninstall
-$(call Host/Compile/Default,uninstall)
+ -$(call Host/Compile/Default,maintainer-clean) # Clean bootstrap files from the release
(cd $(STAGING_DIR_HOST)/share/aclocal/ && rm -f libtool.m4 ltdl.m4 lt~obsolete.m4 ltoptions.m4 ltsugar.m4 ltversion.m4)
endef
More information about the lede-commits
mailing list