tools/coreutils: 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. Automake with modified rules must be ran in order to generate a Makefile that does not delete itself. Override an automake variable "am__CONFIG_DISTCLEAN_FILES" in order to prevent removing config.status and other configure files so that configure stage does not need to be ran twice. Redefine MAINTAINERCLEANFILES with Make functions to avoid deleting the targets of gettext and gperf rules. In order to prevent an inconsistent state of `install` since this utility must always be available as a prerequisite, do not allow it to be removed. Instead of preventing the removal of the config.h header, the Makefile supports regenerating it quickly. Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
26f8a3874b
commit
6a3cfeb4a6
|
@ -35,6 +35,8 @@ HOST_CONFIGURE_ARGS += \
|
||||||
|
|
||||||
HOST_MAKE_FLAGS += \
|
HOST_MAKE_FLAGS += \
|
||||||
$(AM_TOOL_PATHS) AUTOPOINT="$(TRUE)" GTKDOCIZE="$(TRUE)" \
|
$(AM_TOOL_PATHS) AUTOPOINT="$(TRUE)" GTKDOCIZE="$(TRUE)" \
|
||||||
|
am__CONFIG_DISTCLEAN_FILES= \
|
||||||
|
MAINTAINERCLEANFILES='$$$$(filter-out lib/iconv_open% %.texi,$$$$(BUILT_SOURCES))' \
|
||||||
PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
|
PROGRAMS="$(patsubst %,src/%,$(PKG_PROGRAMS))" \
|
||||||
LIBRARIES= MANS= SUBDIRS=.
|
LIBRARIES= MANS= SUBDIRS=.
|
||||||
|
|
||||||
|
@ -60,6 +62,8 @@ define Host/Configure
|
||||||
$(if $(QUILT),$(call Host/Bootstrap))
|
$(if $(QUILT),$(call Host/Bootstrap))
|
||||||
$(foreach src,$(HOST_GNULIB_SKIP),mv -f $(HOST_BUILD_DIR)/$(src)~ $(HOST_BUILD_DIR)/$(src) || true; )
|
$(foreach src,$(HOST_GNULIB_SKIP),mv -f $(HOST_BUILD_DIR)/$(src)~ $(HOST_BUILD_DIR)/$(src) || true; )
|
||||||
$(call Host/Configure/Default)
|
$(call Host/Configure/Default)
|
||||||
|
$(call Host/Uninstall)
|
||||||
|
$(call Host/Compile/Default,lib/config.h)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Install
|
define Host/Install
|
||||||
|
@ -69,8 +73,8 @@ define Host/Install
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Host/Uninstall
|
define Host/Uninstall
|
||||||
rm -f $(STAGING_DIR_HOST)/bin/install
|
|
||||||
-$(call Host/Compile/Default,uninstall)
|
-$(call Host/Compile/Default,uninstall)
|
||||||
|
-$(call Host/Compile/Default,maintainer-clean) # Clean bootstrap files from the release
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call HostBuild))
|
$(eval $(call HostBuild))
|
||||||
|
|
Loading…
Reference in New Issue