1
# Network UPS Tools: man
5
# - sources (.txt) and groff formats are both distributed,
6
# - only sources are versioned ; groff files are generated at worst
8
# - HTML files are built upon request, if AsciiDoc is available,
9
# - groff update will only happen if AsciiDoc is available too,
10
# - all this can probably (and hopefully) be improved, but I've not
11
# found a way to do pattern replacement on the fly for target deps!
12
# FIXME: investigate an autogen.sh hook
13
# - Ref: http://www.gnu.org/software/hello/manual/automake/Man-pages.html
15
# Base configuration and client manpages, always installed
32
man5_MANS = $(MAN_CONF_PAGES)
64
man8_MANS = $(MAN_CLIENT_PAGES)
77
SRC_TOOL_PAGES = nut-scanner.txt nut-recorder.txt
79
MAN_TOOL_PAGES = nut-scanner.8 nut-recorder.8
81
man8_MANS += $(MAN_TOOL_PAGES)
83
HTML_TOOL_MANS = nut-scanner.html nut-recorder.html
85
# CGI (--with-cgi) related manpages
105
man5_MANS += $(MAN5_CGI_PAGES)
107
man8_MANS += $(MAN8_CGI_PAGES)
119
# Development (--with-dev) related manpages
122
upscli_add_host_cert.txt \
125
upscli_disconnect.txt \
129
upscli_list_next.txt \
130
upscli_list_start.txt \
131
upscli_readline.txt \
132
upscli_sendline.txt \
133
upscli_splitaddr.txt \
134
upscli_splitname.txt \
136
upscli_strerror.txt \
137
upscli_upserror.txt \
139
libnutclient_commands.txt \
140
libnutclient_devices.txt \
141
libnutclient_general.txt \
142
libnutclient_misc.txt \
143
libnutclient_tcp.txt \
144
libnutclient_variables.txt \
146
nutscan_scan_snmp.txt \
147
nutscan_scan_usb.txt \
148
nutscan_scan_xml_http.txt \
149
nutscan_scan_nut.txt \
150
nutscan_scan_avahi.txt \
151
nutscan_scan_ipmi.txt \
152
nutscan_scan_eaton_serial.txt \
153
nutscan_display_ups_conf.txt \
154
nutscan_display_parsable.txt \
155
nutscan_cidr_to_ip.txt \
156
nutscan_new_device.txt \
157
nutscan_free_device.txt \
158
nutscan_add_option_to_device.txt \
159
nutscan_add_device_to_device.txt \
161
nutscan_get_serial_ports_list.txt \
162
libupsclient-config.txt \
165
# NOTE: nutclient_*.3 has no source counterpart (libnutclient_*.txt)
168
upscli_add_host_cert.3 \
171
upscli_disconnect.3 \
176
upscli_list_start.3 \
185
libnutclient_commands.3 \
186
libnutclient_devices.3 \
187
libnutclient_general.3 \
188
libnutclient_misc.3 \
190
libnutclient_variables.3 \
191
nutclient_authenticate.3 \
192
nutclient_destroy.3 \
193
nutclient_device_forced_shutdown.3 \
194
nutclient_device_login.3 \
195
nutclient_device_master.3 \
196
nutclient_execute_device_command.3 \
197
nutclient_get_device_command_description.3 \
198
nutclient_get_device_commands.3 \
199
nutclient_get_device_description.3 \
200
nutclient_get_device_num_logins.3 \
201
nutclient_get_device_rw_variables.3 \
202
nutclient_get_devices.3 \
203
nutclient_get_device_variable_description.3 \
204
nutclient_get_device_variables.3 \
205
nutclient_get_device_variable_values.3 \
206
nutclient_has_device.3 \
207
nutclient_has_device_command.3 \
208
nutclient_has_device_variable.3 \
210
nutclient_set_device_variable_value.3 \
211
nutclient_set_device_variable_values.3 \
212
nutclient_tcp_create_client.3 \
213
nutclient_tcp_disconnect.3 \
214
nutclient_tcp_get_timeout.3 \
215
nutclient_tcp_is_connected.3 \
216
nutclient_tcp_reconnect.3 \
217
nutclient_tcp_set_timeout.3 \
219
nutscan_scan_snmp.3 \
221
nutscan_scan_xml_http.3 \
223
nutscan_scan_avahi.3 \
224
nutscan_scan_ipmi.3 \
225
nutscan_scan_eaton_serial.3 \
226
nutscan_display_ups_conf.3 \
227
nutscan_display_parsable.3 \
228
nutscan_cidr_to_ip.3 \
229
nutscan_new_device.3 \
230
nutscan_free_device.3 \
231
nutscan_add_option_to_device.3 \
232
nutscan_add_device_to_device.3 \
233
nutscan_get_serial_ports_list.3 \
237
libupsclient-config.1
240
man3_MANS = $(MAN3_DEV_PAGES)
243
man1_MANS = $(MAN1_DEV_PAGES)
250
upscli_add_host_cert.html \
251
upscli_cleanup.html \
252
upscli_connect.html \
253
upscli_disconnect.html \
257
upscli_list_next.html \
258
upscli_list_start.html \
259
upscli_readline.html \
260
upscli_sendline.html \
261
upscli_splitaddr.html \
262
upscli_splitname.html \
264
upscli_strerror.html \
265
upscli_upserror.html \
267
libnutclient_commands.html \
268
libnutclient_devices.html \
269
libnutclient_general.html \
270
libnutclient_misc.html \
271
libnutclient_tcp.html \
272
libnutclient_variables.html \
274
nutscan_scan_snmp.html \
275
nutscan_scan_usb.html \
276
nutscan_scan_xml_http.html \
277
nutscan_scan_nut.html \
278
nutscan_scan_avahi.html \
279
nutscan_scan_ipmi.html \
280
nutscan_scan_eaton_serial.html \
281
nutscan_display_ups_conf.html \
282
nutscan_display_parsable.html \
283
nutscan_cidr_to_ip.html \
284
nutscan_new_device.html \
285
nutscan_free_device.html \
286
nutscan_add_option_to_device.html \
287
nutscan_add_device_to_device.html \
288
nutscan_get_serial_ports_list.html \
290
libupsclient-config.html \
294
# Drivers related manpages
296
# (--with-drivers=...)
298
man8_MANS += $(DRIVER_MAN_LIST)
389
man8_MANS += $(MAN_SERIAL_PAGES)
435
SRC_SNMP_PAGES = snmp-ups.txt
436
MAN_SNMP_PAGES = snmp-ups.8
439
man8_MANS += $(MAN_SNMP_PAGES)
442
HTML_SNMP_MANS = snmp-ups.html
445
SRC_USB_LIBUSB_PAGES = \
449
nutdrv_atcl_usb.txt \
456
MAN_USB_LIBUSB_PAGES = \
467
man8_MANS += $(MAN_USB_LIBUSB_PAGES)
470
HTML_USB_LIBUSB_MANS = \
474
nutdrv_atcl_usb.html \
481
SRC_NETXML_PAGES = netxml-ups.txt
482
MAN_NETXML_PAGES = netxml-ups.8
485
man8_MANS += $(MAN_NETXML_PAGES)
488
HTML_NETXML_MANS = netxml-ups.html
491
SRC_POWERMAN_PAGES = powerman-pdu.txt
492
MAN_POWERMAN_PAGES = powerman-pdu.8
495
man8_MANS += $(MAN_POWERMAN_PAGES)
498
HTML_POWERMAN_MANS = powerman-pdu.html
501
SRC_IPMIPSU_PAGES = nut-ipmipsu.txt
502
MAN_IPMIPSU_PAGES = nut-ipmipsu.8
505
man8_MANS += $(MAN_IPMIPSU_PAGES)
508
HTML_IPMIPSU_MANS = nut-ipmipsu.html
510
SRC_MACOSX_PAGES = macosx-ups.txt
511
MAN_MACOSX_PAGES = macosx-ups.8
514
man8_MANS += $(MAN_MACOSX_PAGES)
517
HTML_MACOSX_MANS = macosx-ups.html
524
$(MAN_CLIENT_PAGES) \
530
$(MAN_SERIAL_PAGES) \
532
$(MAN_USB_LIBUSB_PAGES) \
533
$(MAN_NETXML_PAGES) \
534
$(MAN_POWERMAN_PAGES) \
535
$(MAN_IPMIPSU_PAGES) \
538
# distribute everything, even those not installed by default
539
# Note that 'dist' target requires AsciiDoc!
542
$(SRC_CLIENT_PAGES) \
546
$(SRC_SERIAL_PAGES) \
548
$(SRC_USB_LIBUSB_PAGES) \
549
$(SRC_NETXML_PAGES) \
550
$(SRC_POWERMAN_PAGES) \
551
$(SRC_IPMIPSU_PAGES) \
552
$(SRC_MACOSX_PAGES) \
558
$(HTML_CLIENT_MANS) \
562
$(HTML_SERIAL_MANS) \
564
$(HTML_USB_LIBUSB_MANS) \
565
$(HTML_NETXML_MANS) \
566
$(HTML_POWERMAN_MANS) \
567
$(HTML_IPMIPSU_MANS) \
572
html-man: $(HTML_MANS) index.html
574
CLEANFILES = *.xml *.html
576
SUFFIXES = .txt .html .1 .3 .5 .8
581
$(ASCIIDOC) --backend=xhtml11 \
582
--attribute localdate=`TZ=UTC date +%Y-%m-%d` \
583
--attribute localtime=`TZ=UTC date +%H:%M:%S` \
586
### Prior to Asciidoc ~8.6.8, the --destination-dir flag didn't seem to affect the location of the intermediate .xml file.
587
A2X_MANPAGE_OPTS = --doctype manpage --format manpage \
588
--attribute mansource="Network UPS Tools" \
589
--attribute manversion="@PACKAGE_VERSION@" \
590
--attribute manmanual="NUT Manual" \
594
$(A2X) $(A2X_MANPAGE_OPTS) $<
597
$(A2X) $(A2X_MANPAGE_OPTS) $<
600
$(A2X) $(A2X_MANPAGE_OPTS) $<
603
$(A2X) $(A2X_MANPAGE_OPTS) $<
608
@echo "Not (re)building $@ manual page, since 'asciidoc' was not found."
611
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
614
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
617
@echo "Using existing $@ manual page, since 'asciidoc' was not found."
620
@echo "Using existing $@ manual page, since 'asciidoc' was not found."