tools/elfutils: 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 delete itself or libtool.
In order to enable rules for building what is removed,
maintainer mode is required for configuring.
Building from tracked sources only with maintainer mode
requires a lexical analyzer, so add dependency for bison.
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.
The function obstack_printf() is not present on macOS,
so use the available gnulib module and their dependencies.
Many more modules from gnulib are now needed,
and some replacements of some functions must be skipped
to prevent build errors at link time.
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>