1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# Network UPS Tools: scripts/augeas
EXTRA_DIST = gen-nutupsconf-aug.py.in nutupsconf.aug.tpl \
README.adoc tests/test_nut.aug
# Note: spellchecking is currently ensured by docs/Makefile.am
# due to inclusion into docs/developer-guide.txt, and the heading
# level may be also dictated by that.
PYTHON = @PYTHON@
# only call the script to generate Augeas ups.conf lens upon "make dist",
# and if Python is present; the distributed gen-nutupsconf-aug.py.in template
# is assumed to only differ from a generated gen-nutupsconf-aug.py by the
# @PYTHON@ shebang.
dist-hook:
@if [ -n "$(PYTHON)" ] && [ x"no" != x"$(PYTHON)" ] && $(PYTHON) -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens with '$(PYTHON)'."; \
$(PYTHON) $(distdir)/gen-nutupsconf-aug.py.in $(distdir)/; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping regeneration of Augeas lens for ups.conf parsing." ; \
echo "----------------------------------------------------------------------"; \
fi
# This needs augparse from augeas-tools
if HAVE_AUGPARSE
check-local:
@echo "augparse proceeding to lenses verification job..."; \
echo "DISABLED for now due to https://github.com/networkupstools/nut/issues/657 -" ; \
echo "as a developer, you can run the tests below manually but not automatically:" ; \
echo " $(AUGPARSE) -I $(builddir)/ -I $(srcdir)/ $(srcdir)/tests/test_nut.aug" ; \
echo "or 'make check-augeas' or 'make check-augeas-all' in `pwd`"
check-augeas:
$(AUGPARSE) -I $(builddir)/ -I $(srcdir)/ $(srcdir)/tests/test_nut.aug
check-augeas-all: check-augeas
$(AUGPARSE) -I $(builddir)/ -I $(srcdir)/ $(srcdir)/tests/test_nut_flaky.aug
$(AUGPARSE) -I $(builddir)/ -I $(srcdir)/ $(srcdir)/tests/test_nut_fixme.aug
endif
if WITH_AUGLENS
# Now "make install" should cover delivery of Augeas lenses...
# The "auglensdir" and "auglenstestsdir" values should be set up by configure
# The *.aug files are generated by rule above or by autogen.sh and/or configure
auglens_DATA = \
nuthostsconf.aug nutupsconf.aug nutupsdusers.aug nutupsschedconf.aug \
nutnutconf.aug nutupsdconf.aug nutupsmonconf.aug nutupssetconf.aug
auglenstests_DATA = \
tests/test_nut.aug
else
EXTRA_DIST += \
nuthostsconf.aug.in nutupsconf.aug.in nutupsdusers.aug.in nutupsschedconf.aug.in \
nutnutconf.aug.in nutupsdconf.aug.in nutupsmonconf.aug.in nutupssetconf.aug.in
endif
MAINTAINERCLEANFILES = Makefile.in .dirstamp
CLEANFILES = *-spellchecked README
# Can be re-generated by configure script and/or make:
DISTCLEANFILES = gen-nutupsconf-aug.py
# Generated by autogen.sh and needed to run the configure script:
MAINTAINERCLEANFILES += nutupsconf.aug.in nutupsconf.aug.in.AUTOGEN_WITHOUT
# Part of dist tarball, regardless of use for current build:
EXTRA_DIST += nutupsconf.aug.in
DISTCLEANFILES += *.aug
|