nut/scripts/augeas/Makefile.am

50 lines
1.8 KiB
Makefile
Raw Normal View History

2011-01-26 09:35:08 +00:00
2022-06-29 10:37:36 +00:00
EXTRA_DIST = gen-nutupsconf-aug.py.in nutupsconf.aug.tpl \
2011-01-26 09:35:08 +00:00
README tests/test_nut.aug
2022-06-29 10:37:36 +00:00
PYTHON = @PYTHON@
2011-01-26 09:35:08 +00:00
# only call the script to generate Augeas ups.conf lens upon "make dist",
2022-06-29 10:37:36 +00:00
# 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.
2011-01-26 09:35:08 +00:00
dist-hook:
2022-06-29 10:37:36 +00:00
@if [ -n "$(PYTHON)" ] && $(PYTHON) -c "import re,glob,codecs"; then \
echo "Regenerating Augeas ups.conf lens with '$(PYTHON)'."; \
$(PYTHON) $(distdir)/gen-nutupsconf-aug.py.in $(distdir)/; \
2011-01-26 09:35:08 +00:00
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
2022-06-29 10:37:36 +00:00
echo "Skipping regeneration of Augeas lens for ups.conf parsing." ; \
2011-01-26 09:35:08 +00:00
echo "----------------------------------------------------------------------"; \
fi
2022-06-29 10:37:36 +00:00
# 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"
endif
# FIXME
# augparse -I $(srcdir)/ $(srcdir)/tests/test_nut.aug
if WITH_AUGLENS
# Now "make install" should cover delivery of Augeas lenses...
# The "auglensdir" value 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
endif
MAINTAINERCLEANFILES = Makefile.in .dirstamp
CLEANFILES = *-spellchecked
# 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
DISTCLEANFILES += *.aug