nut-debian/tools/Makefile.am

81 lines
3.1 KiB
Makefile
Raw Normal View History

2012-01-24 12:22:33 +02:00
# TODO: remove redundancies!
2010-03-26 01:20:59 +02:00
2011-09-29 21:14:46 +03:00
# Force build in ./ before nut-scanner, to have nutscan-{usb,snmp}.h
# built before going into the nut-scanner sub-directory
SUBDIRS = . nut-scanner
EXTRA_DIST = nut-usbinfo.pl nut-hclinfo.py device-recorder.sh svn2cl.authors nut-snmpinfo.py
all: nut-scanner-deps
nut-scanner-deps:
@if python -c 1; then \
echo "Regenerating the SNMP helper files."; \
$(top_srcdir)/tools/nut-snmpinfo.py; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping the SNMP helper files regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
@if perl -e 1; then \
echo "Regenerating the USB helper files."; \
$(top_srcdir)/tools/nut-usbinfo.pl; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Perl is not available."; \
echo "Skipping the USB helper files regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
2011-01-26 11:35:08 +02:00
website:
2012-01-24 12:22:33 +02:00
@if python -c "import json,simplejson,lxml"; then \
2011-01-26 11:35:08 +02:00
echo "Regenerating the HTML and JSON formated HCL tables."; \
2011-09-29 21:14:46 +03:00
$(top_srcdir)/tools/nut-hclinfo.py; \
2011-01-26 11:35:08 +02:00
else \
echo "----------------------------------------------------------------------"; \
2012-01-24 12:22:33 +02:00
echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \
echo "is not available."; \
2011-01-26 11:35:08 +02:00
echo "Skipping the HTML and JSON formated HCL tables regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
2010-03-26 01:20:59 +02:00
2011-09-29 21:14:46 +03:00
# call the USB info script upon "make dist", and if Perl is present
# call the SNMP info script upon "make dist", and if Python is present
# and call both for building nut-scanner
2012-01-24 12:22:33 +02:00
# also generate HCL data files
2010-03-26 01:20:59 +02:00
dist-hook:
2011-09-29 21:14:46 +03:00
@if python -c 1; then \
echo "Regenerating the SNMP helper files."; \
$(distdir)/nut-snmpinfo.py; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Python is not available."; \
echo "Skipping the SNMP helper files regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
2011-01-26 11:35:08 +02:00
@if perl -e 1; then \
2010-03-26 01:20:59 +02:00
echo "Regenerating the USB helper files."; \
$(distdir)/nut-usbinfo.pl; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: Perl is not available."; \
echo "Skipping the USB helper files regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
2011-09-29 21:14:46 +03:00
2012-01-24 12:22:33 +02:00
@if python -c "import json,simplejson,lxml"; then \
echo "Regenerating the HTML and JSON formated HCL tables."; \
$(distdir)/nut-hclinfo.py; \
else \
echo "----------------------------------------------------------------------"; \
echo "Warning: either Python, or a required module (json, simplejson, lxml) "; \
echo "is not available."; \
echo "Skipping the HTML and JSON formated HCL tables regeneration."; \
echo "----------------------------------------------------------------------"; \
fi
2011-09-29 21:14:46 +03:00
.PHONY: nut-scanner-deps nut-scanner-snmp-deps nut-scanner-usb-deps