[Nut-upsdev] [PATCH 05/36] Document that this Makefile.am is broken by design.
Arnaud Quette
aquette.dev at gmail.com
Fri May 11 11:17:02 UTC 2012
2012/3/9 Greg A. Woods <woods at planix.com>:
> From: "Greg A. Woods" <woods at planix.com>
>
> ---
> tools/Makefile.am | 20 +++++++++++++++++++-
> 1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/tools/Makefile.am b/tools/Makefile.am
> index 0d9828b..88ee285 100644
> --- a/tools/Makefile.am
> +++ b/tools/Makefile.am
> @@ -1,13 +1,31 @@
> # TODO: remove redundancies!
>
> +# XXX this does not work with Automake!!!
> +#
> +# In fact the very concept is entirely antithetical to Automake.
> +#
> +# SUBDIRS are explicitly a listing of all the directories that make
> +# must recurse into BEFORE processing the current directory.
> +#
> +# These python scripts must be moved into a sub-directory, and _only_
> +# executed IFF they need to be, and all the nut-scanner sources need
> +# to be moved out of a sub-directory into this directory.
> +#
> # Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h
> # built before going into the nut-scanner sub-directory
> -SUBDIRS = . nut-scanner
> +#
> +#SUBDIRS = . nut-scanner
> +SUBDIRS = nut-scanner
>
> EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py
>
> all: nut-scanner-deps
>
> +# XXX these rules are all bogus! They cause un-named target files to
> +# always be rebuilt! None of that is ever the right way to use make,
> +# and especially not Automake. Explicit filenames and their exact
> +# dependencies need to be properly listed.
> +
> nut-scanner-deps:
> @if python -c 1; then \
> echo "Regenerating the SNMP helper files."; \
FYI, this is a known (set of) issue(s), that will be addressed part of
the tree revamp (post 2.8.0).
part of the TODO list, there are also cross-directory deps (source and
docs) that will then be possible.
anyway, I've applied it to trunk, r3572, but restored SUBDIRS (with a
complementary comment) to still satisfy the build of tools/Makefile
(force nut-scanner headers generation) before its subdirs:
http://www.gnu.org/software/automake/manual/html_node/Subdirectories.html
thanks.
Arnaud
--
Linux / Unix Expert R&D - Eaton - http://powerquality.eaton.com
Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/
Debian Developer - http://www.debian.org
Free Software Developer - http://arnaud.quette.free.fr/
More information about the Nut-upsdev
mailing list