# Makefile.in generated by automake 1.16.5 from Makefile.am.
# docs/Makefile.  Generated from Makefile.in by configure.

# Copyright (C) 1994-2021 Free Software Foundation, Inc.

# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.



# Network UPS Tools: main docs

am__is_gnu_make = { \
  if test -z '$(MAKELEVEL)'; then \
    false; \
  elif test -n '$(MAKE_HOST)'; then \
    true; \
  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
    true; \
  else \
    false; \
  fi; \
}
am__make_running_with_option = \
  case $${target_option-} in \
      ?) ;; \
      *) echo "am__make_running_with_option: internal error: invalid" \
              "target option '$${target_option-}' specified" >&2; \
         exit 1;; \
  esac; \
  has_opt=no; \
  sane_makeflags=$$MAKEFLAGS; \
  if $(am__is_gnu_make); then \
    sane_makeflags=$$MFLAGS; \
  else \
    case $$MAKEFLAGS in \
      *\\[\ \	]*) \
        bs=\\; \
        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
    esac; \
  fi; \
  skip_next=no; \
  strip_trailopt () \
  { \
    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
  }; \
  for flg in $$sane_makeflags; do \
    test $$skip_next = yes && { skip_next=no; continue; }; \
    case $$flg in \
      *=*|--*) continue;; \
        -*I) strip_trailopt 'I'; skip_next=yes;; \
      -*I?*) strip_trailopt 'I';; \
        -*O) strip_trailopt 'O'; skip_next=yes;; \
      -*O?*) strip_trailopt 'O';; \
        -*l) strip_trailopt 'l'; skip_next=yes;; \
      -*l?*) strip_trailopt 'l';; \
      -[dEDm]) skip_next=yes;; \
      -[JT]) skip_next=yes;; \
    esac; \
    case $$flg in \
      *$$target_option*) has_opt=yes; break;; \
    esac; \
  done; \
  test $$has_opt = yes
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/nut
pkgincludedir = $(includedir)/nut
pkglibdir = $(libdir)/nut
pkglibexecdir = $(libexecdir)/nut
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = x86_64-rosa-linux-gnu
host_triplet = x86_64-rosa-linux-gnu
target_triplet = x86_64-rosa-linux-gnu
#am__append_1 = spellcheck
##am__append_2 = --filter-path="$(ASPELL_FILTER_TEX_PATH)"
subdir = docs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_c___attribute__.m4 \
	$(top_srcdir)/m4/ax_c_pragmas.m4 \
	$(top_srcdir)/m4/ax_check_compile_flag.m4 \
	$(top_srcdir)/m4/ax_compare_version.m4 \
	$(top_srcdir)/m4/ax_realpath.m4 \
	$(top_srcdir)/m4/ax_run_or_link_ifelse.m4 \
	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
	$(top_srcdir)/m4/lt~obsolete.m4 \
	$(top_srcdir)/m4/nut_arg_with.m4 \
	$(top_srcdir)/m4/nut_check_asciidoc.m4 \
	$(top_srcdir)/m4/nut_check_aspell.m4 \
	$(top_srcdir)/m4/nut_check_cppcheck.m4 \
	$(top_srcdir)/m4/nut_check_headers_windows.m4 \
	$(top_srcdir)/m4/nut_check_libavahi.m4 \
	$(top_srcdir)/m4/nut_check_libfreeipmi.m4 \
	$(top_srcdir)/m4/nut_check_libgd.m4 \
	$(top_srcdir)/m4/nut_check_libgpiod.m4 \
	$(top_srcdir)/m4/nut_check_libltdl.m4 \
	$(top_srcdir)/m4/nut_check_libmodbus.m4 \
	$(top_srcdir)/m4/nut_check_libneon.m4 \
	$(top_srcdir)/m4/nut_check_libnetsnmp.m4 \
	$(top_srcdir)/m4/nut_check_libnss.m4 \
	$(top_srcdir)/m4/nut_check_libopenssl.m4 \
	$(top_srcdir)/m4/nut_check_libpowerman.m4 \
	$(top_srcdir)/m4/nut_check_libregex.m4 \
	$(top_srcdir)/m4/nut_check_libsystemd.m4 \
	$(top_srcdir)/m4/nut_check_libusb.m4 \
	$(top_srcdir)/m4/nut_check_libwrap.m4 \
	$(top_srcdir)/m4/nut_check_os.m4 \
	$(top_srcdir)/m4/nut_check_pkgconfig.m4 \
	$(top_srcdir)/m4/nut_check_python.m4 \
	$(top_srcdir)/m4/nut_check_socketlib.m4 \
	$(top_srcdir)/m4/nut_compiler_family.m4 \
	$(top_srcdir)/m4/nut_func_getnameinfo_argtypes.m4 \
	$(top_srcdir)/m4/nut_report_feature.m4 \
	$(top_srcdir)/m4/nut_stash_warnings.m4 \
	$(top_srcdir)/m4/nut_type_socklen_t.m4 \
	$(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
	$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = $(top_builddir)/include/config.h
CONFIG_CLEAN_FILES = docinfo.xml
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_$(V))
am__v_P_ = $(am__v_P_$(AM_DEFAULT_VERBOSITY))
am__v_P_0 = false
am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_$(V))
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
am__v_GEN_0 = @echo "  GEN     " $@;
am__v_GEN_1 = 
AM_V_at = $(am__v_at_$(V))
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
am__v_at_0 = @
am__v_at_1 = 
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
	ctags-recursive dvi-recursive html-recursive info-recursive \
	install-data-recursive install-dvi-recursive \
	install-exec-recursive install-html-recursive \
	install-info-recursive install-pdf-recursive \
	install-ps-recursive install-recursive installcheck-recursive \
	installdirs-recursive pdf-recursive ps-recursive \
	tags-recursive uninstall-recursive
am__can_run_installinfo = \
  case $$AM_UPDATE_INFO_DIR in \
    n|no|NO) false;; \
    *) (install-info --version) >/dev/null 2>&1;; \
  esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
  distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
  $(RECURSIVE_TARGETS) \
  $(RECURSIVE_CLEAN_TARGETS) \
  $(am__extra_recursive_targets)
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
	distdir distdir-am
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates.  Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
  BEGIN { nonempty = 0; } \
  { items[$$0] = 1; nonempty = 1; } \
  END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique.  This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
  list='$(am__tagged_files)'; \
  unique=`for i in $$list; do \
    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
  done | $(am__uniquify_input)`
DIST_SUBDIRS = $(SUBDIRS)
am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/docinfo.xml.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
  dir0=`pwd`; \
  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
  sed_rest='s,^[^/]*/*,,'; \
  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
  sed_butlast='s,/*[^/]*$$,,'; \
  while test -n "$$dir1"; do \
    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
    if test "$$first" != "."; then \
      if test "$$first" = ".."; then \
        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
      else \
        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
        if test "$$first2" = "$$first"; then \
          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
        else \
          dir2="../$$dir2"; \
        fi; \
        dir0="$$dir0"/"$$first"; \
      fi; \
    fi; \
    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
  done; \
  reldir="$$dir2"
A2X = 
ACLOCAL = ${SHELL} '/builddir/build/BUILD/nut-2.8.2/missing' aclocal-1.16
ALTPIDPATH = /var/state/ups
AMTAR = $${TAR-tar}
AM_DEFAULT_VERBOSITY = 1
AR = /usr/bin/ar
ASCIIDOC = 
ASPELL = 
ASPELL_FILTER_LIB_PATH = none
ASPELL_FILTER_SHARE_PATH = none
ASPELL_FILTER_TEX_PATH = none
AUGPARSE = none
AUTOCONF = ${SHELL} '/builddir/build/BUILD/nut-2.8.2/missing' autoconf
AUTOHEADER = ${SHELL} '/builddir/build/BUILD/nut-2.8.2/missing' autoheader
AUTOMAKE = ${SHELL} '/builddir/build/BUILD/nut-2.8.2/missing' automake-1.16
AWK = gawk
BINDIR = /usr/bin
CC = gcc
CCACHE_BASEDIR = 
CCACHE_DIR = 
CCACHE_NAMESPACE = nut:x86_64-rosa-linux-gnu
CCACHE_PATH = 
CCDEPMODE = depmode=none
CFLAGS = -isystem /usr/local/include  -O2 -fomit-frame-pointer -gdwarf-4 -pipe -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu99 -Wno-system-headers -Wall -Wextra -Wsign-compare -pedantic -Wno-error  -Wstrict-aliasing=2 -Wformat -Werror=format-security
CONFIG_FLAGS = --target=x86_64-rosa-linux-gnu --build=x86_64-rosa-linux-gnu --disable-static --disable-silent-rules --disable-dependency-tracking --disable-rpath --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --x-includes=/usr/include --x-libraries=/usr/lib64 --enable-static --enable-shared --sysconfdir=/etc/ups --with-systemdsystemunitdir=/usr/lib/systemd/system --with-serial --with-usb --with-snmp --with-cgi --with-dev --with-ssl --with-neon --with-statepath=/var/state/ups --with-drvpath=/usr/sbin --with-cgipath=/var/www/cgi-bin --with-htmlpath=/var/www/nut --with-pidpath=/var/run/nut --with-port=3493 --with-user=ups --with-group=ups --with-pkgconfig-dir=/usr/lib64/pkgconfig --with-hotplug-dir=/etc/hotplug --with-udev-dir=/etc/udev
CONFPATH = /etc/ups
CPP = gcc -E
CPPCHECK = 
CPPFLAGS = 
CPPUNIT_CFLAGS = 
CPPUNIT_LIBS = 
CPPUNIT_NUT_CXXFLAGS = 
CSCOPE = cscope
CTAGS = ctags
CXX = g++
CXXCPP = g++ -E
CXXDEPMODE = depmode=none
CXXFLAGS = -isystem /usr/local/include  -O2 -fomit-frame-pointer -gdwarf-4 -pipe -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wno-reserved-identifier -Wno-unknown-warning-option -std=gnu++11 -Wno-system-headers -Wall -Wextra -Wno-error  -Wstrict-aliasing=2 -Wformat -Werror=format-security
CYGPATH = 
CYGPATH_W = echo
DBLATEX = 
DEFS = -DHAVE_CONFIG_H
DEPDIR = .deps
DEPLOYED_UPSC = 
DEPLOYED_UPSD = 
DLLTOOL = false
DOC_BUILD_LIST = 
DOC_CHECK_LIST = 
DRIVER_BUILD_LIST = all
DRIVER_INSTALL_TARGET = 
DRIVER_MAN_LIST = all
DRIVER_MAN_LIST_PAGES = 
DRVPATH = /usr/sbin
DSYMUTIL = 
DUMPBIN = 
ECHO_C = 
ECHO_N = -n
ECHO_T = 

# Is "egrep == grep -E" always valid? (maybe all a job for configure.ac)
#EGREP = egrep
EGREP = grep -E
ETAGS = etags
EXEEXT = 
FGREP = /usr/bin/grep -F
FILECMD = file
FORCE_NUT_VERSION = FORCE
GDLIB_CONFIG = 
GREP = /usr/bin/grep
HAVE_SYS_SOCKET_H = 1
HAVE_WINSOCK2_H = 0
HAVE_WS2TCPIP_H = 0
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LD = /usr/x86_64-rosa-linux-gnu/bin/ld -m elf_x86_64
LDFLAGS = -O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-all --param=ssp-buffer-size=4 -m64 -mtune=generic -flto -Wl,-O2  -flto 
LIBAVAHI_CFLAGS = 
LIBAVAHI_LIBS = 
LIBDIR = /usr/lib64
LIBGD_CFLAGS = -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/sysprof-6 -pthread -I/usr/include/webp
LIBGD_LDFLAGS =  -lgd
LIBGPIO_CFLAGS = 
LIBGPIO_LIBS = 
LIBI2C_LIBS = 
LIBIPMI_CFLAGS = 
LIBIPMI_LIBS = 
LIBLTDL_CFLAGS = 
LIBLTDL_LIBS = -lltdl 
LIBMODBUS_CFLAGS = 
LIBMODBUS_LIBS = 
LIBNEON_CFLAGS = -I/usr/include/neon
LIBNEON_LIBS = -lneon
LIBNETSNMP_CFLAGS = 
LIBNETSNMP_LIBS = -lnetsnmp
LIBOBJS = 
LIBPOWERMAN_CFLAGS = 
LIBPOWERMAN_LIBS = -lpowerman
LIBREGEX_LIBS = 
LIBS = 
LIBSSL_CFLAGS = 
LIBSSL_LIBS = -L/usr -lssl -lcrypto
LIBSSL_REQUIRES = openssl
LIBSYSTEMD_CFLAGS = 
LIBSYSTEMD_LIBS = -lsystemd
LIBTOOL = $(SHELL) $(top_builddir)/libtool
LIBTOOL_DEPS = ././/ltmain.sh
LIBUSB_CFLAGS = -I/usr/include/libusb-1.0
LIBUSB_CONFIG = /usr/bin/libusb-config
LIBUSB_LIBS = -lusb-1.0
LIBWRAP_CFLAGS = 
LIBWRAP_LIBS = 
LIPO = 
LN_S = ln -s
LN_S_R = ln -s -r
LTLIBOBJS = 
LT_SYS_LIBRARY_PATH = /usr/lib64:
MAINT = #
MAKEINFO = ${SHELL} '/builddir/build/BUILD/nut-2.8.2/missing' makeinfo
MANIFEST_TOOL = :
MKDIR_P = /usr/bin/mkdir -p
MSGFMT = /usr/bin/msgfmt
NETLIBS = 
NET_SNMP_CONFIG = /usr/bin/net-snmp-config
NM = /usr/bin/nm -B
NMEDIT = 
NUT_AM_EXPORT_CCACHE_BASEDIR = #
NUT_AM_EXPORT_CCACHE_DIR = #
NUT_AM_EXPORT_CCACHE_NAMESPACE = 
NUT_AM_EXPORT_CCACHE_PATH = #
NUT_AM_MAKE_CAN_EXPORT = 
NUT_DATADIR = /usr/share
NUT_LIBEXECDIR = /usr/libexec
NUT_NETVERSION = 1.3
NUT_SOURCE_GITREV = 
NUT_SOURCE_GITREV_NUMERIC = 
OBJDUMP = objdump
OBJEXT = o
OS_NAME = rosa
OTOOL = 
OTOOL64 = 
PACKAGE = nut
PACKAGE_BUGREPORT = https://github.com/networkupstools/nut/issues
PACKAGE_NAME = nut
PACKAGE_STRING = nut 2.8.2
PACKAGE_TARNAME = nut
PACKAGE_URL = 
PACKAGE_VERSION = 2.8.2
PATH_DURING_CONFIGURE = /usr/bin:/bin:/usr/sbin:/sbin
PATH_SEPARATOR = :
PIDPATH = /var/run/nut
PKGCONFIGDIR = /usr/lib64/pkgconfig
PKG_CONFIG = /usr/bin/pkg-config
PKG_CONFIG_LIBDIR = 
PKG_CONFIG_PATH = :/usr/lib64/pkgconfig:/usr/share/pkgconfig
PORT = 3493
POWERDOWNFLAG = /etc/killpower
PREFIX = /usr
PWD = /builddir/build/BUILD/nut-2.8.2
PYTHON = /usr/bin/python
PYTHON2 = 
PYTHON2_SITE_PACKAGES = 
PYTHON3 = /usr/bin/python3.11
PYTHON3_SITE_PACKAGES = /usr/lib64/python3.11/site-packages
PYTHON_SITE_PACKAGES = /usr/lib64/python3.11/site-packages
RANLIB = ranlib
REALPATH = realpath
RUN_AS_GROUP = ups
RUN_AS_USER = ups
SBINDIR = /usr/sbin
SED = /usr/bin/sed
SEMLIBS = -lrt
SERLIBS = 
SET_MAKE = 
SHELL = /bin/sh
SOURCE_HIGHLIGHT = 
STATEPATH = /var/state/ups
STRIP = strip
SUN_LIBUSB = 
SYSTEMD_ANALYZE_PROGRAM = /usr/bin/systemd-analyze
SYSTEMD_DAEMON_ARGS_DRIVER = -FF
SYSTEMD_DAEMON_ARGS_UPSD = -FF
SYSTEMD_DAEMON_ARGS_UPSMON = -F
SYSTEMD_DAEMON_NOTIFYACCESS_DRIVER = NotifyAccess=all
SYSTEMD_DAEMON_NOTIFYACCESS_UPSD = NotifyAccess=main
SYSTEMD_DAEMON_NOTIFYACCESS_UPSMON = NotifyAccess=all
SYSTEMD_DAEMON_TYPE_DRIVER = notify-reload
SYSTEMD_DAEMON_TYPE_UPSD = notify
SYSTEMD_DAEMON_TYPE_UPSMON = notify
SYSTEMD_DAEMON_WATCHDOG_DRIVER = #WatchdogSec=240s
SYSTEMD_DAEMON_WATCHDOG_UPSD = #WatchdogSec=240s
SYSTEMD_DAEMON_WATCHDOG_UPSMON = #WatchdogSec=240s
SYSTEMD_TMPFILES_PROGRAM = /usr/bin/systemd-tmpfiles
TREE_VERSION = 2.8
VALGRIND = none
VERSION = 2.8.2
WINDMC = none
WINDRES = none
WORDS_BIGENDIAN = 
XMLLINT = /usr/bin/xmllint
XSLTPROC = 
abs_builddir = /builddir/build/BUILD/nut-2.8.2/docs
abs_srcdir = /builddir/build/BUILD/nut-2.8.2/docs
abs_top_builddir = /builddir/build/BUILD/nut-2.8.2
abs_top_srcdir = /builddir/build/BUILD/nut-2.8.2
ac_ct_AR = 
ac_ct_CC = gcc
ac_ct_CXX = 
ac_ct_DUMPBIN = 
am__include = include
am__leading_dot = .
am__quote = 
am__tar = $${TAR-tar} chof - "$$tardir"
am__untar = $${TAR-tar} xf -
auglensdir = /usr/share/augeas/lenses
bindir = /usr/bin
build = x86_64-rosa-linux-gnu
build_alias = x86_64-rosa-linux-gnu
build_cpu = x86_64
build_os = linux-gnu
build_vendor = rosa
builddir = .
cgiexecdir = /var/www/cgi-bin
datadir = /usr/share
datarootdir = ${prefix}/share
devddir = 
docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
driverexecdir = /usr/sbin
dummy_PKG_CONFIG = 
dummy_PKG_CONFIG_CFLAGS = 
dummy_PKG_CONFIG_LIBS = 
dvidir = ${docdir}
exec_prefix = /usr
freebsdquirksdir = 
host = x86_64-rosa-linux-gnu
host_alias = 
host_cpu = x86_64
host_os = linux-gnu
host_vendor = rosa
hotplugdir = /etc/hotplug
htmldir = /var/www/nut
includedir = /usr/include
infodir = /usr/share/info
install_sh = ${SHELL} /builddir/build/BUILD/nut-2.8.2/install-sh
libdir = /usr/lib64
libexecdir = /usr/libexec
localedir = ${datarootdir}/locale
localstatedir = /var
mandir = /usr/share/man
mkdir_p = $(MKDIR_P)
now = 2025-02-19
nut_with_nut_monitor = no
nut_with_nut_monitor_desktop = 
nut_with_nut_monitor_dir = ${prefix}/share/nut-monitor
nut_with_nut_monitor_py2gtk2 = 
nut_with_nut_monitor_py3qt5 = 
nut_with_pynut = yes
nut_with_pynut_py = yes
nut_with_pynut_py2 = 
nut_with_pynut_py3 = yes
oldincludedir = /usr/include
pdfdir = ${docdir}
pkgconfigdir = /usr/lib64/pkgconfig
prefix = /usr
program_transform_name = s&^&&
psdir = ${docdir}
runstatedir = ${localstatedir}/run
sbindir = /usr/sbin
sharedstatedir = /var/lib
srcdir = .
sysconfdir = /etc/ups
systemdshutdowndir = /usr/lib/systemd/system-shutdown
systemdsystemunitdir = /usr/lib/systemd/system
systemdtmpfilesdir = /usr/lib/tmpfiles.d
target = x86_64-rosa-linux-gnu
target_alias = x86_64-rosa-linux-gnu
target_cpu = x86_64
target_os = linux-gnu
target_vendor = rosa
top_build_prefix = ../
top_builddir = ..
top_srcdir = ..
udevdir = /etc/udev
MAINTAINERCLEANFILES = Makefile.in .dirstamp
EXTRA_DIST = $(ALL_TXT_SRC) $(SHARED_DEPS) $(IMAGE_FILES) \
	$(IMAGE_LOGO_FILES) $(IMAGE_LOGO_FILES_JENKINS_NUT) \
	$(CABLES_IMAGES) $(NUT_SPELL_DICT) docinfo.xml common.xsl \
	xhtml.xsl chunked.xsl asciidoc.txt asciidoc-vars.conf
IMAGE_FILES = images/asciidoc.png \
	images/hostedby.png \
	images/nut_layering.png \
	images/nut-logo.png \
	images/note.png \
	images/warning.png \
	images/blue-arrow.png \
	images/simple.png \
	images/advanced.png \
	images/bigbox.png \
	images/bizarre.png \
	images/old-cgi.png


# Logos which pop up in README.adoc acknowledgements and maybe other places:
IMAGE_LOGO_FILES = \
	images/ci/AppVeyor_logo-2x.png \
	images/ci/AppVeyor_logo-ar21.png \
	images/ci/CircleCI_vertical_black_logo.png \
	images/ci/DO_Powered_by_Badge_blue.png \
	images/ci/DO_Powered_by_Badge_blue_140pxW.png \
	images/ci/fosshost_org_Host_Dark_56px.png \
	images/ci/fosshost_org_Host_Light_309px.png \
	images/ci/fosshost_org_Host_Light_38px.png \
	images/ci/gandi-ar21.png \
	images/ci/gandi-ar21.svg \
	images/ci/GitHub-Mark-140pxW.png \
	images/ci/GitHub-Mark-ea2971cee799.png \
	images/ci/OC_logotype.png \
	images/ci/OC_logo-watercolor-256.png \
	images/ci/OC_logo_merged_171x32.png \
	images/ci/OC_logo_merged_140x26.png

IMAGE_LOGO_FILES_JENKINS_NUT = \
	images/ci/jenkins-nut-large-256px.png \
	images/ci/jenkins-nut-large-squared.png \
	images/ci/jenkins-nut-large.pdn \
	images/ci/jenkins-nut-large.png \
	images/ci/jenkins-nut-small-256px.png \
	images/ci/jenkins-nut-small.pdn \
	images/ci/jenkins-nut-small.png \
	images/ci/jenkins-nut-squared.png \
	images/ci/jenkins-nut-transparent-bg-140pxW.png \
	images/ci/jenkins-nut-transparent-bg-40px.png \
	images/ci/jenkins-nut-transparent-bg.png \
	images/ci/jenkins-nut.css \
	images/ci/jenkins-nut.png \
	images/ci/jenkins-nut.txt


# Only track here the local deps
SHARED_DEPS = nut-names.txt daisychain.txt asciidoc.conf asciidoc.txt
USER_MANUAL_DEPS = acknowledgements.txt cables.txt config-notes.txt	\
 config-prereqs.txt ci-farm-lxc-setup.txt	\
 configure.txt download.txt documentation.txt features.txt history.txt	\
 outlets.txt scheduling.txt security.txt support.txt user-manual.txt

DEVELOPER_GUIDE_DEPS = contact-closure.txt design.txt developers.txt	\
 developer-guide.txt hid-subdrivers.txt macros.txt new-clients.txt	\
 new-drivers.txt net-protocol.txt nutdrv_qx-subdrivers.txt	\
 snmp-subdrivers.txt sock-protocol.txt

CABLES_DEPS = cables/apc-rs500-serial.txt	\
 cables/apc.txt cables/ge-imv-victron.txt cables/imv.txt		\
 cables/mgeups.txt cables/powerware.txt cables/repotec.txt		\
 cables/sms.txt

CABLES_IMAGES = images/cables/73-0724.png images/cables/940-0024C.jpg \
 images/cables/belkin-f6cx-rkm-xu-cable.jpg images/cables/Lansafecable.jpg \
 images/cables/mac-940-0024C.png images/cables/mge-66049.png \
 images/cables/mge-db9-rj12.jpg images/cables/mge-db9-rj45.jpg \
 images/cables/mge-usb-rj45.jpg \
 images/cables/SOLA-330.png

ALL_TXT_SRC = nut-names.txt daisychain.txt \
 $(USER_MANUAL_DEPS) $(DEVELOPER_GUIDE_DEPS) \
 $(CABLES_DEPS) FAQ.txt nut-qa.txt packager-guide.txt snmp.txt \
 release-notes.txt ChangeLog.txt solaris-usb.txt

ASPELL_FILTER_PATH = @ASPELL_FILTER_PATH@
NUT_SPELL_DICT = nut.dict
ASCIIDOC_HTML_SINGLE = user-manual.html \
	developer-guide.html \
	packager-guide.html \
	release-notes.html \
	ChangeLog.html \
	solaris-usb.html \
	cables.html \
	FAQ.html

ASCIIDOC_HTML_CHUNKED = user-manual.chunked \
	developer-guide.chunked \
	packager-guide.chunked \
	release-notes.chunked \
	ChangeLog.chunked \
	solaris-usb.chunked \
	cables.chunked \
	FAQ.chunked

ASCIIDOC_PDF = user-manual.pdf \
	developer-guide.pdf \
	packager-guide.pdf \
	release-notes.pdf \
	ChangeLog.pdf \
	solaris-usb.pdf \
	cables.pdf \
	FAQ.pdf

SUBDIRS = man cables
SUFFIXES = .txt .html .pdf -spellchecked .txt-prepped

# This list is defined by configure script choices and options:
CHECK_LOCAL_TARGETS =  $(am__append_1)
CLEANFILES = *.xml *.html *.pdf *-spellchecked docbook-xsl.css \
	docinfo.xml.in.tmp $(top_builddir)/INSTALL.nut \
	$(top_builddir)/UPGRADING $(top_builddir)/NEWS \
	$(top_builddir)/ChangeLog.adoc $(top_builddir)/README \
	$(top_builddir)/*.adoc-parsed *.adoc-parsed

### TODO: general automatic dependency generation

# Prepare text files (currently a manually tracked list)
# with known presence of GitHub links to convert them from
# short <hash><number> notation into asciidoc link markup
# before rendering into HTML/PDF.
# Work around some documents that have originally included
# the asciidoc markup (use double-hash to avoid conversion).
DOCBUILD_FILTER_GITHUB_LINKS = { \
    $(SED) \
        -e 's%\(link:https*://github.com/networkupstools/[a-zA-Z0-9./-]*/[1-9][0-9]*/*\[[^]]*\)\#\([1-9][0-9]*\)%\1\#\#\2%g' \
        -e 's%\(issue\) *\#\([1-9][0-9]*\)\([^0-9]\|$$\)%link:https://github.com/networkupstools/nut/issues/\2[\1 \#\#\2]\3%g' \
        -e 's%\(PR\|pull request\) *\#\([1-9][0-9]*\)\([^0-9]\|$$\)%link:https://github.com/networkupstools/nut/pull/\2[\1 \#\#\2]\3%g' \
        -e 's%\([[ ,]\)\#\([1-9][0-9]*\)\([^0-9]\|$$\)%\1link:https://github.com/networkupstools/nut/issues/\2[\#\#\2]\3%g' \
        -e 's%\(issue\) networkupstools/\([^ ][^ ]*\)\#\([1-9][0-9]*\)\([^0-9]\|$$\)%link:https://github.com/networkupstools/\2/issues/\3[\1 \2\#\#\3]\4%g' \
        -e 's%\(PR\|pull request\) *networkupstools/\([^ ][^ ]*\)\#\([1-9][0-9]*\)\([^0-9]\|$$\)%link:https://github.com/networkupstools/\2/pull/\3[\1 \2\#\#\3]\4%g' \
        -e 's%\([[ ,]\)networkupstools/\([^ ][^ ]*\)\#\([1-9][0-9]*\)\([^0-9]\|$$\)%\1link:https://github.com/networkupstools/\2/issues/\3[\2\#\#\3]\4%g' \
        -e 's%\#\(\#[1-9][0-9]*\)%\1%g' \
; }


# The $< is okay here, it is used in a suffix rule below
DOCBUILD_CONVERT_GITHUB_LINKS = { \
    echo "  DOC-ASCIIDOC-GITHUB-LINKS    Parsing GitHub link patterns $< => $@"; \
    cat "$<" | $(DOCBUILD_FILTER_GITHUB_LINKS) > "$@.tmp" \
    && mv -f "$@.tmp" "$@" \
; }

A2X_ASCII_IDS = ":ascii-ids:\n"

# BSD Make dislikes the path resolution here and does not always populate "$<"
# (and claims why: "Using $< in a non-suffix rule context is a GNUmake idiom"),
# but it has a "$?" for "list of dependencies that are newer than the target".
# For more details see https://man.freebsd.org/cgi/man.cgi
#A2X_ASCII_IDS = 

# Add other directory deps (not for local EXTRA_DIST) and generated contents
FULL_USER_MANUAL_DEPS = $(USER_MANUAL_DEPS) $(SHARED_DEPS) \
	$(top_builddir)/README.adoc-parsed \
	$(top_builddir)/INSTALL.nut.adoc-parsed \
	$(top_builddir)/UPGRADING.adoc-parsed \
	../TODO.adoc ../scripts/ufw/README.adoc

FULL_DEVELOPER_GUIDE_DEPS = $(DEVELOPER_GUIDE_DEPS) $(SHARED_DEPS) \
	../scripts/augeas/README.adoc ../TODO.adoc \
	../lib/README.adoc \
	../tools/nut-scanner/README.adoc


# Note: without the "-v", asciidoc (circa 8.6.2) sometimes hangs when
# generating the chunked HTML. In this case, export the environment
# variable ASCIIDOC_VERBOSE to "-v", ie:
#   $ ASCIIDOC_VERBOSE=-v make
# Note: `(top_)srcdir` and `(top_)builddir` must end with a path
# separator, or be empty -- so in all cases letting the resulting
# string resolve meaningfully in the filesystem during docs build.
A2X_COMMON_OPTS = $(ASCIIDOC_VERBOSE) \
    --attribute=icons \
    --xsltproc-opts="--nonet" \
    --xsltproc-opts="--stringparam nut.localdate \"`TZ=UTC date +%Y-%m-%d`\"" \
    --xsltproc-opts="--stringparam nut.localtime \"`TZ=UTC date +%H:%M:%S`\"" \
    --xsltproc-opts="--stringparam nut.nutversion \"2.8.2\"" \
    --attribute=docinfodir="$(builddir)" \
    --attribute=iconsdir="$(srcdir)/images" \
    --attribute=badges \
    --attribute=external_title \
    --attribute=tree_version="2.8" \
    --attribute=srcdir="$(abs_srcdir)/" \
    --attribute=builddir="$(abs_builddir)/" \
    --attribute=top_srcdir="$(abs_top_srcdir)/" \
    --attribute=top_builddir="$(abs_top_builddir)/" \
    -a toc -a numbered --destination-dir=$${A2X_OUTDIR}

# NOTE: a2x newer than 8.6.8 says "--destination-dir" is only valid for HTML.
# As of version 8.6.9 it lies, and the argument is required for our distcheck
# (and does affect PDF builds, as found during work on collision-avoidance -
# true with at least asciidoc/a2x versions 9.0.0rc2).
# For more details see issues https://github.com/asciidoc/asciidoc/issues/44
# and https://github.com/networkupstools/nut/pull/281 (in short, attempts
# to "fix" this warning broke NUT build). If this is to be retried later, see
# https://github.com/networkupstools/nut/pull/281/commits/fe17861c4ea12679b3ebfefa8a6d692d79d99f2d
# and do not forget to fix up docs/man/Makefile.am too ;)

# NOTE: a2x tends to copy some files into its working area, preserving original
# permissions. If those files are read-only in origin (e.g. packaged stylesheet
# or our resources coming from EXTRA_DIST) the next a2x can not overwrite it.
# Also note that such hoarding of files has potential to break parallel builds
# (or cause them to produce undefined results if some bad timing happens).
# As a brutal workaround for the former problem, we chmod. For second one we
# might try magic with .SEQUENTIAL recipe hints, but that is gmake-dependent.

# Note that empirically it treats "destination-dir" as the source root for
# PDF generation (even though it claims the argument is ignored for non-HTML
# targets) so we have to provide the "images/" in this case. ONLY for PDF!

# Note we only remove the original target (if present), if it is a directory -
# e.g. created by "html-chunked" targets.
DOCBUILD_BEGIN = { \
    if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \
        rm -rf "./$${A2X_OUTDIR}" || true ; \
        test -d "$@" && rm -rf "$@" || true ; \
        $(MKDIR_P) "./$${A2X_OUTDIR}" || exit ; \
        case "$${A2X_OUTDIR}" in \
            tmp/pdf.*) ln -s ../../images "./$${A2X_OUTDIR}" ;; \
        esac; \
    else A2X_OUTDIR='.' ; fi; \
    if test -s "${builddir}/docbook-xsl.css" \
    && test -r "${builddir}/docbook-xsl.css" \
    && ! test -w "${builddir}/docbook-xsl.css" \
    ; then chmod u+w "${builddir}/docbook-xsl.css" ; fi ; \
    chmod -R u+w "./$${A2X_OUTDIR}" || true; \
}


# When moving "*" hope a2x did not make any "hidden" files
# like ".*" that would be required for resulting documents.
# Leave the "images/" dir there, though.
# Otherwise, we would have to `find` them all.
DOCBUILD_END = { \
    if test -n "$${A2X_OUTDIR}" && test "$${A2X_OUTDIR}" != '.' ; then \
        chmod -R u+w "./$${A2X_OUTDIR}" || true; \
        test -d "$@" && rm -rf "$@" || true ; \
        mv -f "./$${A2X_OUTDIR}/$(@F)" ./ || exit ; \
        mv -f "./$${A2X_OUTDIR}/"*.* ./ 2>/dev/null || true ; \
        rm -rf "./$${A2X_OUTDIR}" ; \
    fi ; \
}


# Used below for spellcheck and for .prep-src-docs
SPELLCHECK_SRC_DEFAULT = $(ALL_TXT_SRC) \
	asciidoc-vars.conf \
	../README.adoc ../NEWS.adoc \
	../INSTALL.nut.adoc ../UPGRADING.adoc \
	../TODO.adoc ../scripts/ufw/README.adoc \
	../scripts/augeas/README.adoc ../lib/README.adoc \
	../tools/nut-scanner/README.adoc \
	../AUTHORS ../COPYING ../LICENSE-GPL2 ../LICENSE-GPL3 ../LICENSE-DCO


# Non-interactively spell check all documentation source files.
# This is useful for Buildbot and automated QA processing
# FIXME: how to present output (std{out,err}, single file or per target)?
# NOTE: ../ChangeLog is nowadays generated from commit messages, so
# its spelling (or errors in that) are not fixable and thus irrelevant.
# Similarly for the ../INSTALL file that is prepared by autoconf and not
# tracked as a source file by NUT Git repository.
# Note that `docs/asciidoc-vars.conf` is included into docs and so impacts
# their resulting spellcheck verdicts.
#SPELLCHECK_SRC = $(SPELLCHECK_SRC_DEFAULT)

# Directory SPELLCHECK_SRC files are relative to. Overriden by other Makefiles.
#SPELLCHECK_SRCDIR = $(srcdir)
#SPELLCHECK_BUILDDIR = $(builddir)

# Note: de-facto our documentation is beyond ASCII (at least in names of
# international committers). The grep tests below look if the aspell output
# contained something other than the OK lines (tagged with asterisk) and
# aspell's version (tagged with @) and if it did - those lines must be the
# spellcheck complaints. Empty OUT is ok.
# We also must indent the input, because certain piped-in characters are
# interpreted as commands, and seems this feature can not be turned off.
# See also http://aspell.net/man-html/Through-A-Pipe.html
# TODO: Is "grep -a" or "grep -b" (treat input as ascii/bin) portable enough?
# Set SPELLCHECK_ERROR_FATAL=no if there are some unavoidable issues
# due to spellchecking, to temporarily not fail builds due to this.
# For Travis CI in particular, see ci_build.sh in NUT codebase root.
#SPELLCHECK_ERROR_FATAL = yes
#SPELLCHECK_ENV_DEBUG = no
#ASPELL_NUT_COMMON_ARGS = -p \
#	$(abs_srcdir)/$(NUT_SPELL_DICT) -d en \
#	--lang=en --ignore-accents --encoding=utf-8
# Note: If there is a need to use filter path (e.g. in mingw/msys2 builds),
# it must be before --mode=tex (-t) option!
#ASPELL_NUT_TEXMODE_ARGS = $(am__append_2) -t
#ASPELL_ENV_LANG = en.UTF-8
#ASPELL_OUT_NOTERRORS = (^[ \t]*[\*\@]|^$$)

# WARNING: The percent wildcard is a GNU extension; otherwise we need
# a ".txt.txt-spellchecked" type of rule and files like "README" all
# renamed to *.txt, or lots of rules for files without the extensions.
# Maybe this will get simplified with renaming to *.adoc though ;)
#
# Other Makefiles have a relatively simple life, dealing with just a
# few texts and name/extension patterns in their directories.
#?#.txt.txt-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
#%-spellchecked: % Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
#*-spellchecked */*-spellchecked: $(@:-spellchecked=) $(top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
#
# NOTE: For some reason, at least GNU make insists on bogus calls:
#   update target 'asciidoc-vars.conf' due to: asciidoc-vars.conf-spellchecked
# when we e.g. `make dist` after a `make spellcheck` and ended up
# with removed and touched (emptied) file, only this one so far.
#
# NOTE: This portable rule RELIES on just one SPELLCHECK_SRC defined
# at a time, with an outer Makefile caller ensuring the looping:
#SPELLCHECK_RECIPE_DEBUG_STREAM = /dev/null
#DISTCLEANFILES = $(NUT_SPELL_DICT).bak-pre-sorting .$(NUT_SPELL_DICT).sorted $(NUT_SPELL_DICT).sorted

# When building out-of-tree, be sure to have all asciidoc resources
# under the same dir structure (tool limitation)
PREP_SRC = $(EXTRA_DIST) $(SPELLCHECK_SRC_DEFAULT)
all: all-recursive

.SUFFIXES:
.SUFFIXES: .txt .html .pdf -spellchecked .txt-prepped .adoc .adoc-parsed .chunked
$(srcdir)/Makefile.in: # $(srcdir)/Makefile.am  $(am__configure_deps)
	@for dep in $?; do \
	  case '$(am__configure_deps)' in \
	    *$$dep*) \
	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
	        && { if test -f $@; then exit 0; else break; fi; }; \
	      exit 1;; \
	  esac; \
	done; \
	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
	$(am__cd) $(top_srcdir) && \
	  $(AUTOMAKE) --foreign docs/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
	@case '$?' in \
	  *config.status*) \
	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
	  *) \
	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \
	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \
	esac;

$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh

$(top_srcdir)/configure: # $(am__configure_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): # $(am__aclocal_m4_deps)
	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
docinfo.xml: $(top_builddir)/config.status $(srcdir)/docinfo.xml.in
	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@

mostlyclean-libtool:
	-rm -f *.lo

clean-libtool:
	-rm -rf .libs _libs

# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
#     (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
	@fail=; \
	if $(am__make_keepgoing); then \
	  failcom='fail=yes'; \
	else \
	  failcom='exit 1'; \
	fi; \
	dot_seen=no; \
	target=`echo $@ | sed s/-recursive//`; \
	case "$@" in \
	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
	  *) list='$(SUBDIRS)' ;; \
	esac; \
	for subdir in $$list; do \
	  echo "Making $$target in $$subdir"; \
	  if test "$$subdir" = "."; then \
	    dot_seen=yes; \
	    local_target="$$target-am"; \
	  else \
	    local_target="$$target"; \
	  fi; \
	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
	  || eval $$failcom; \
	done; \
	if test "$$dot_seen" = "no"; then \
	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
	fi; test -z "$$fail"

ID: $(am__tagged_files)
	$(am__define_uniq_tagged_files); mkid -fID $$unique
tags: tags-recursive
TAGS: tags

tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	set x; \
	here=`pwd`; \
	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
	  include_option=--etags-include; \
	  empty_fix=.; \
	else \
	  include_option=--include; \
	  empty_fix=; \
	fi; \
	list='$(SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    test ! -f $$subdir/TAGS || \
	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
	  fi; \
	done; \
	$(am__define_uniq_tagged_files); \
	shift; \
	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
	  test -n "$$unique" || unique=$$empty_fix; \
	  if test $$# -gt 0; then \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      "$$@" $$unique; \
	  else \
	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
	      $$unique; \
	  fi; \
	fi
ctags: ctags-recursive

CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
	$(am__define_uniq_tagged_files); \
	test -z "$(CTAGS_ARGS)$$unique" \
	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
	     $$unique

GTAGS:
	here=`$(am__cd) $(top_builddir) && pwd` \
	  && $(am__cd) $(top_srcdir) \
	  && gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: cscopelist-recursive

cscopelist-am: $(am__tagged_files)
	list='$(am__tagged_files)'; \
	case "$(srcdir)" in \
	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
	  *) sdir=$(subdir)/$(srcdir) ;; \
	esac; \
	for i in $$list; do \
	  if test -f "$$i"; then \
	    echo "$(subdir)/$$i"; \
	  else \
	    echo "$$sdir/$$i"; \
	  fi; \
	done >> $(top_builddir)/cscope.files

distclean-tags:
	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(BUILT_SOURCES)
	$(MAKE) $(AM_MAKEFLAGS) distdir-am

distdir-am: $(DISTFILES)
	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
	list='$(DISTFILES)'; \
	  dist_files=`for file in $$list; do echo $$file; done | \
	  sed -e "s|^$$srcdirstrip/||;t" \
	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
	case $$dist_files in \
	  */*) $(MKDIR_P) `echo "$$dist_files" | \
			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
			   sort -u` ;; \
	esac; \
	for file in $$dist_files; do \
	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
	  if test -d $$d/$$file; then \
	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
	    if test -d "$(distdir)/$$file"; then \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
	    fi; \
	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
	  else \
	    test -f "$(distdir)/$$file" \
	    || cp -p $$d/$$file "$(distdir)/$$file" \
	    || exit 1; \
	  fi; \
	done
	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" = .; then :; else \
	    $(am__make_dryrun) \
	      || test -d "$(distdir)/$$subdir" \
	      || $(MKDIR_P) "$(distdir)/$$subdir" \
	      || exit 1; \
	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
	    $(am__relativize); \
	    new_distdir=$$reldir; \
	    dir1=$$subdir; dir2="$(top_distdir)"; \
	    $(am__relativize); \
	    new_top_distdir=$$reldir; \
	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
	    ($(am__cd) $$subdir && \
	      $(MAKE) $(AM_MAKEFLAGS) \
	        top_distdir="$$new_top_distdir" \
	        distdir="$$new_distdir" \
		am__remove_distdir=: \
		am__skip_length_check=: \
		am__skip_mode_fix=: \
	        distdir) \
	      || exit 1; \
	  fi; \
	done
check-am: all-am
	$(MAKE) $(AM_MAKEFLAGS) check-local
check: check-recursive
all-am: Makefile
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive

install-am: all-am
	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am

installcheck: installcheck-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:
	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive

clean-am: clean-generic clean-libtool clean-local mostlyclean-am

distclean: distclean-recursive
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

html-am:

info: info-recursive

info-am:

install-data-am:

install-dvi: install-dvi-recursive

install-dvi-am:

install-exec-am:

install-html: install-html-recursive

install-html-am:

install-info: install-info-recursive

install-info-am:

install-man:

install-pdf: install-pdf-recursive

install-pdf-am:

install-ps: install-ps-recursive

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am:

.MAKE: $(am__recursive_targets) check-am install-am install-strip

.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
	check-am check-local clean clean-generic clean-libtool \
	clean-local cscopelist-am ctags ctags-am distclean \
	distclean-generic distclean-libtool distclean-tags distdir dvi \
	dvi-am html html-am info info-am install install-am \
	install-data install-data-am install-dvi install-dvi-am \
	install-exec install-exec-am install-html install-html-am \
	install-info install-info-am install-man install-pdf \
	install-pdf-am install-ps install-ps-am install-strip \
	installcheck installcheck-am installdirs installdirs-am \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am

.PRECIOUS: Makefile


all: doc
check-local: $(CHECK_LOCAL_TARGETS)

# Make sure sources are there for out-of-tree builds:
all-local all-am-local \
 $(ASCIIDOC_PDF) $(ASCIIDOC_HTML_SINGLE) $(ASCIIDOC_HTML_CHUNKED): $(abs_top_builddir)/docs/.prep-src-docs

# This list is defined by configure script choices and options:
doc: $(abs_top_builddir)/docs/.prep-src-docs 

# This target can be called by developers to go around the configure
# script choices at their risk (e.g. missing tools are possible):
docs: pdf html-single html-chunked man-man html-man

all-docs: docs

check-docs: check-pdf check-html-single check-html-chunked check-man

pdf: $(ASCIIDOC_PDF)
# also build the HTML manpages with these targets
html-single: $(ASCIIDOC_HTML_SINGLE)
html-chunked: $(ASCIIDOC_HTML_CHUNKED)

# the "for" loops might better use $^ but it might be not portable
check-pdf: $(ASCIIDOC_PDF)
	@FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \
	for F in $(ASCIIDOC_PDF) ; do \
	    test -s "$$F" && { file "$$F" | $(EGREP) -i 'PDF document' > /dev/null ; } || FAILED="$$FAILED $$F" ; \
	done; if test -n "$$FAILED" ; then \
	    echo "FAILED PDF sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \
	fi; echo "PASSED PDF sanity check"; exit 0

check-html-single: $(ASCIIDOC_HTML_SINGLE)
	@FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \
	for F in $(ASCIIDOC_HTML_SINGLE) ; do \
	    test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \
	done; if test -n "$$FAILED" ; then \
	    echo "FAILED HTML-single sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \
	fi; echo "PASSED HTML-single sanity check"; exit 0

check-html-chunked: $(ASCIIDOC_HTML_CHUNKED)
	@FAILED=""; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \
	for D in $(ASCIIDOC_HTML_CHUNKED); do \
	    for F in "$$D"/*.html ; do \
	        test -s "$$F" && { file "$$F" | $(EGREP) -i '(XML|HTML.*document)' > /dev/null ; } || FAILED="$$FAILED $$F" ; \
	    done; \
	    for F in "$$D"/*.css ; do \
	        test -s "$$F" && { $(EGREP) -i 'CSS stylesheet' "$$F" > /dev/null ; } || FAILED="$$FAILED $$F" ; \
	    done; \
	done; if test -n "$$FAILED" ; then \
	    echo "FAILED HTML-chunked sanity check for:$$FAILED" >&2 ; file $$FAILED >&2 ; exit 1; \
	fi; echo "PASSED HTML-chunked sanity check"; exit 0

# Note: usually the results from man-page check will be reported twice:
# once as a SUBDIRS child makefile, and once via DOC_CHECK_LIST expansion
# Note: default `make all` in the man directory caters to drivers etc.
# chosen during configure script execution. The "all-man" and "all-html"
# rules build everything documented.
check-man all-man man-man all-html html-man:
	+cd $(abs_top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile $@

man:
	+cd $(abs_top_builddir)/docs/man/ && $(MAKE) $(AM_MAKEFLAGS) -f Makefile all

.adoc.adoc-parsed:
	@$(DOCBUILD_CONVERT_GITHUB_LINKS)

$(top_builddir)/ChangeLog:
	+@echo "  DOC-CHANGELOG-GENERATE	$@" \
	 && cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) $(@F)

$(top_builddir)/ChangeLog.adoc: $(top_builddir)/ChangeLog
	@INPUT="$?"; \
	 test -n "$${INPUT}" || INPUT="$$(top_builddir)/ChangeLog" ; \
	 test -n "$${INPUT}" && test -n "$@" && test -s "$${INPUT}" \
	 || { \
	     MSG="FAILED to resolve input or output filename with this make implementation, or input was not generated!"; \
	     echo "  DOC-CHANGELOG-ASCIIDOC	SKIP: $${MSG}" >&2; \
	     test -n "$@" && { printf '=== Failed to generate the ChangeLog\n\n%s\n\nNOTE: See https://github.com/networkupstools/nut/commits/master for change history.\n\n' "$${MSG}" > "$@" ; } ; \
	     exit ; \
	 } ; \
	 echo "  DOC-CHANGELOG-ASCIIDOC	$${INPUT} => $@" \
	 && printf "ifdef::txt[]\n== Very detailed Change Log\n"$(A2X_ASCII_IDS)"endif::txt[]\n\n" > "$@.tmp" \
	 && TABCHAR="`printf '\t'`" \
	 && $(SED) \
	        -e 's,^\([0-9a-zA-Z]\),=== \1,' \
	        -e 's,^=== \(NOTE: \),\1,' \
	        -e 's,/[+],/\\\\\+,g' \
	        -e 's,[+][+],\\\+\\\+,g' \
	        -e 's,^\([ '"$${TABCHAR}"'][^+]*\)\([^+/\]\)[+],\1\2\\\+,g' \
	        -e 's,^\([ '"$${TABCHAR}"'].*\)\([~|^]\),\1\\\2,g' \
	        -e 's,\[\[\([^]]*\)\]\],[\1],g' \
	        -e 's,^\(\s\s*\)\([0-9]\),\1{empty}\2,g' \
	   < "$${INPUT}" >> "$@.tmp" \
	 && mv -f "$@.tmp" "$@"

user-manual.html user-manual.chunked user-manual.pdf: $(FULL_USER_MANUAL_DEPS)
developer-guide.html developer-guide.chunked developer-guide.pdf: $(FULL_DEVELOPER_GUIDE_DEPS)
packager-guide.html packager-guide.chunked packager-guide.pdf: packager-guide.txt asciidoc.conf
release-notes.html release-notes.chunked release-notes.pdf: release-notes.txt $(top_builddir)/NEWS.adoc-parsed $(top_builddir)/UPGRADING.adoc-parsed asciidoc.conf
ChangeLog.html ChangeLog.chunked ChangeLog.pdf: ChangeLog.txt $(top_builddir)/ChangeLog.adoc-parsed asciidoc.conf
solaris-usb.html solaris-usb.chunked solaris-usb.pdf: solaris-usb.txt asciidoc.conf

### Call the prep step consistently to create symlinks (out-of-tree)
### or just touch-files for peace of mind (in-tree builds). Then we
### use these path names (truncated "-prepped") now surely located
### in the builddir as the sources for rendered docs.
*.txt-prepped: $(abs_top_builddir)/docs/.prep-src-docs

# PORTABILITY NOTE: POSIX Make forbids the suffix rule definitions with
# prerequisites like done below, and GNU Make of some versions complains;
# https://www.gnu.org/software/make/manual/html_node/Error-Messages.html
# says the prerequisites were ignored while a suffix rule was created;
# eventually the POSIX stance would be taken to define a rule for a weird
# verbatim target file name with prerequisites:
# ../docs/Makefile:936: warning: ignoring prerequisites on suffix rule definition
# Changes from ".txt.pdf: docinfo.xml" to "*.pdf: docinfo.xml" = ".txt.pdf:"
# as done below may be pointless in the end (with regard to a portable way
# to trigger builds by a changed dependency), but at least predictable and
# not toxic.
###.txt.txt-prepped: $(abs_top_builddir)/docs/.prep-src-docs

*.html: common.xsl xhtml.xsl
.txt-prepped.html:
	@A2X_OUTDIR="tmp/html-single.$(@F).$$$$" ; \
	 echo "  DOC-HTML Generating $@"; \
	 $(DOCBUILD_BEGIN) ; RES=0; \
	 $(A2X) $(A2X_COMMON_OPTS) --attribute=xhtml11_format --format=xhtml --xsl-file=$(srcdir)/xhtml.xsl "$(<D)/`basename "$(<F)" -prepped`" || RES=$$? ; \
	 $(DOCBUILD_END) ; exit $$RES

*.chunked: common.xsl chunked.xsl
.txt-prepped.chunked:
	@A2X_OUTDIR="tmp/html-chunked.$(@F).$$$$" ; \
	 echo "  DOC-HTML-CHUNKED Generating $@"; \
	 $(DOCBUILD_BEGIN) ; RES=0; \
	 $(A2X) $(A2X_COMMON_OPTS) --attribute=chunked_format --format=chunked --xsl-file=$(srcdir)/chunked.xsl "$(<D)/`basename "$(<F)" -prepped`" || RES=$$? ; \
	 $(DOCBUILD_END) ; exit $$RES

# Note: non-HTML a2x modes may ignore the destination directory
*.pdf: docinfo.xml
.txt-prepped.pdf:
	@A2X_OUTDIR="tmp/pdf.$(@F).$$$$" ; \
	 echo "  DOC-PDF  Generating $@"; \
	 $(DOCBUILD_BEGIN) ; RES=0; \
	 $(A2X) $(A2X_COMMON_OPTS) --attribute=pdf_format --format=pdf -a docinfo1 "$(<D)/`basename "$(<F)" -prepped`" || RES=$$? ; \
	 $(DOCBUILD_END) ; exit $$RES
#SPELLCHECK_RECIPE_DEBUG_STREAM = &2

#$(SPELLCHECK_BUILDDIR)/$(SPELLCHECK_SRC_ONE)-spellchecked: $(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE) $(abs_top_srcdir)/docs/Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
#	@LANG=C; LC_ALL=C; export LANG; export LC_ALL; \
#	 if test x"$(SPELLCHECK_SRC_ONE)" = x ; then echo "SKIP: Bogus spellcheck call for empty target filename (with make target $@ from `pwd`)" >&2 ; exit 0; fi; \
#	 case "$@" in *-spellchecked) ;; *) echo "SKIP: Bogus spellcheck call for non '*-spellchecked' target filename (with make target $@ from `pwd`)" >&2 ; exit 0;; esac; \
#	 rm -f "$@" || true ; \
#	 $(MKDIR_P) "$(@D)" || exit ; \
#	 REPORT_SRCDIR="$(SPELLCHECK_SRCDIR)"; \
#	 REPORT_SRC_ONE="$(SPELLCHECK_SRC_ONE)"; \
#	 REPORT_PREFIX="" ; \
#	 case "$(SPELLCHECK_SRC_ONE)" in \
#		/*) ;; \
#		*/*)	if [ x"$${REPORT_SRCDIR}" = x ] ; then \
#				echo EMPTY >$(SPELLCHECK_RECIPE_DEBUG_STREAM) ; \
#				REPORT_SRCDIR="`dirname "$(SPELLCHECK_SRC_ONE)"`"; \
#			else \
#				echo "APPEND: SPELLCHECK_SRCDIR='$(SPELLCHECK_SRCDIR)' SPELLCHECK_SRC_ONE='$(SPELLCHECK_SRC_ONE)' dirname='`dirname "$(SPELLCHECK_SRC_ONE)"`'" >$(SPELLCHECK_RECIPE_DEBUG_STREAM) ; \
#				REPORT_SRCDIR="$${REPORT_SRCDIR}/`dirname "$(SPELLCHECK_SRC_ONE)"`"; \
#			fi ; \
#			REPORT_SRC_ONE="`basename "$(SPELLCHECK_SRC_ONE)"`"; \
#			;; \
#		*) ;; \
#	 esac; \
#	 if [ x"$${REPORT_SRCDIR}" != x ] ; then \
#		tmpREPORT_PREFIX="NUT source root :: $${REPORT_SRCDIR} :: " ; \
#		REPORT_SRCDIR="`cd "$${REPORT_SRCDIR}" && { pwd >$(SPELLCHECK_RECIPE_DEBUG_STREAM) ; pwd | sed 's|^'"$(abs_top_srcdir)"'/*||' ; }`" \
#		|| { REPORT_SRCDIR="$(SPELLCHECK_SRCDIR)" ; REPORT_SRC_ONE="$(SPELLCHECK_SRC_ONE)" ; REPORT_PREFIX="" ; } ; \
#	 fi ; \
#	 echo "=== Got REPORT_SRCDIR='$${REPORT_SRCDIR}'" >$(SPELLCHECK_RECIPE_DEBUG_STREAM) ; \
#	 case "$${REPORT_SRCDIR}" in \
#		"") ;; \
#		*/) ;; \
#		*)  REPORT_SRCDIR="$${REPORT_SRCDIR}/" ;; \
#	 esac ; \
#	 echo "  ASPELL   Spell checking on $${REPORT_PREFIX}$${REPORT_SRCDIR}$${REPORT_SRC_ONE}"; \
#	 OUT="`(sed 's,^\(.*\)$$, \1,' | $(ASPELL) -a $(ASPELL_NUT_TEXMODE_ARGS) $(ASPELL_NUT_COMMON_ARGS) 2>&1) < "$(SPELLCHECK_SRCDIR)/$(SPELLCHECK_SRC_ONE)"`" \
#		&& { if test -n "$$OUT" ; then OUT="`echo "$$OUT" | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' `" ; fi; \
#		     test -z "$$OUT" ; } \
#		|| { RES=$$? ; \
#		     echo "FAILED : Aspell reported errors here:" >&2 \
#		     && echo "----- vvv" >&2 \
#		     && echo "$$OUT" >&2 \
#		     && echo "----- ^^^" >&2 ; \
#		     exit $$RES; } ; \
#	 touch "$@"

#spellcheck:
#	@if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \
#		echo "ASPELL DEBUG : information about the setup follows:"; \
#		LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; \
#		$(ASPELL) --help || true; \
#		(command -v dpkg) && ( dpkg -l | grep -i aspell ) || true ; \
#		echo "ASPELL automatic execution line is : ( sed 's,^\(.*\)$$, \1,' < docfile.txt | $(ASPELL) -a $(ASPELL_NUT_TEXMODE_ARGS) $(ASPELL_NUT_COMMON_ARGS) | $(EGREP) -b -v '$(ASPELL_OUT_NOTERRORS)' )" ; \
#		echo "ASPELL proceeding to spellchecking job..."; \
#	 else true; fi
#	+@FAILED="" ; LANG=C; LC_ALL=C; export LANG; export LC_ALL; \
#	 for docsrc in $(SPELLCHECK_SRC); do \
#		if test "$(SPELLCHECK_ENV_DEBUG)" != no ; then \
#			echo "ASPELL MAKEFILE DEBUG: Will see from `pwd` if '$(SPELLCHECK_SRCDIR)/$${docsrc}-spellchecked' is up to date" >&2; \
#		else true ; fi ; \
#		$(MAKE) $(AM_MAKEFLAGS) -s -f "$(abs_top_builddir)/docs/Makefile" SPELLCHECK_SRC="" SPELLCHECK_SRC_ONE="$${docsrc}" SPELLCHECK_BUILDDIR="$(SPELLCHECK_BUILDDIR)" SPELLCHECK_SRCDIR="$(SPELLCHECK_SRCDIR)" "$(SPELLCHECK_BUILDDIR)/$${docsrc}-spellchecked" \
#		|| FAILED="$$FAILED $(SPELLCHECK_SRCDIR)/$$docsrc"; \
#	 done ; \
#	 if test -n "$$FAILED" ; then \
#		echo "=====================================================================" ; \
#		echo "FAILED automatic spellcheck for the following sources (relative to `pwd`): $$FAILED" ; \
#		echo "=====================================================================" ; \
#		echo "Please 'cd $(abs_top_builddir) && make spellcheck-interactive'"; \
#		echo "to either fix document sources or update the dictionary of accepted"; \
#		echo "words and spellings listed in the '$(NUT_SPELL_DICT)' file there."; \
#		echo "Either way, please follow up by posting a pull request or a patch"; \
#		echo "to integrate your fixes into the common NUT codebase."; \
#		echo "=====================================================================" ; \
#		test x"$(SPELLCHECK_ERROR_FATAL)" = xno || exit 1; \
#		echo "NOTE: SPELLCHECK_ERROR_FATAL == no so this make does not break the build!"; \
#		echo "=====================================================================" ; \
#	 fi >&2 ; exit 0

# Interactively spell check all documentation source files below (so a human
# can edit the documentation errors and/or add words to custom dictionary).
# Note that here we do not restrain reported issues, so this might catch more
# than the automated test above.
#spellcheck-sortdict: $(abs_builddir)/$(NUT_SPELL_DICT).sorted

# Note that the source file may be not overwritable (distcheck, cdrom, ...),
# so we'd ignore that failure. But the practical use-case is a developer's
# in-tree workspace, so we want the working copy of the dictionary fixed up
# for easy `git diff`ing if possible.
# Note also that "$(<F)" is not POSIX portable, so we spell out the name var :(
#$(abs_builddir)/$(NUT_SPELL_DICT).sorted: $(abs_srcdir)/$(NUT_SPELL_DICT)
#	@cp -pf $(abs_srcdir)/$(NUT_SPELL_DICT) $(abs_builddir)/$(NUT_SPELL_DICT).bak-pre-sorting
#	@LANG=$(ASPELL_ENV_LANG); LC_ALL=$(ASPELL_ENV_LANG); export LANG; export LC_ALL; ( \
#	    WORDLIST="`tail -n +2 < "$?" | sort | uniq`"; \
#	    WORDCOUNT="`echo "$$WORDLIST" | wc -l`"; \
#	    head -1 < "$?" | while read P L C E ; do echo "$$P $$L $$WORDCOUNT $$E"; break; done ; \
#	    echo "$$WORDLIST"; \
#	 ) > "$@"
#	@cp -f "$@" "$(abs_builddir)/$(NUT_SPELL_DICT)"
#	@if [ "$(abs_builddir)" != "$(abs_srcdir)" ] ; then \
#	    cp -f "$@" "$?" || true ; \
#	    cp -f "$(abs_builddir)/$(NUT_SPELL_DICT).bak-pre-sorting" "$(abs_srcdir)/" || true ; \
#	 fi

#spellcheck-interactive: 
#	@FAILED="" ; for docsrc in $(SPELLCHECK_SRC); do \
#		echo "Spell checking on $(SPELLCHECK_SRCDIR)/$$docsrc"; \
#		LANG=$(ASPELL_ENV_LANG) LC_ALL=$(ASPELL_ENV_LANG) $(ASPELL) check $(ASPELL_NUT_COMMON_ARGS) $(SPELLCHECK_SRCDIR)/$$docsrc || \
#			FAILED="$$FAILED $(SPELLCHECK_SRCDIR)/$$docsrc"; \
#	done ; \
#	if test -n "$$FAILED" ; then \
#		echo "FAILED interactive spellcheck for the following sources (relative to `pwd`): $$FAILED" >&2 ; \
#		exit 1; \
#	fi ; exit 0
#	+$(MAKE) $(AM_MAKEFLAGS) spellcheck-sortdict
#	@echo "------------------------------------------------------------------------"; \
#	 echo "Custom dictionary file $(NUT_SPELL_DICT) may have been updated now."; \
#	 echo "Use 'git add -p docs/$(NUT_SPELL_DICT) && git checkout -- docs/$(NUT_SPELL_DICT) && make spellcheck-sortdict && git add -p docs/$(NUT_SPELL_DICT)'"; \
#	 echo "to review changes (please DO NOT REMOVE LINES that aspell chose to drop,"; \
#	 echo "because other systems might not know these words in their system dictionaries)"; \
#	 echo "------------------------------------------------------------------------"

# This rule would probably just fail; normally with no ASPELL there are no callers for it
*/*-spellchecked *-spellchecked: Makefile.am $(abs_srcdir)/$(NUT_SPELL_DICT)
	@echo "  SKIP-ASPELL   $@ : Documentation spell check not available since 'aspell' was not found (or missing its English dictionary)." >&2
spellcheck:
	@echo "Documentation spell check not available since 'aspell' was not found (or missing its English dictionary)."
spellcheck-interactive:
	@echo "Documentation spell check not available since 'aspell' was not found (or missing its English dictionary)."

# NOTE: Some "make" implementations prefix a relative or absent path to
# the filenames in PREP_SRC, others (e.g. Sun make) prepend the absolute
# path to locate the sources, so we end up with bogus trees under docs/.
# Code below tries to detect and truncate this mess, including possible
# source texts located in/under parent dirs.
$(abs_top_builddir)/docs/.prep-src-docs: $(PREP_SRC)
	@cd "$(@D)" || exit ; \
	 linkroot="$(abs_builddir)" ; \
	 if test x"$(abs_srcdir)" = x"$(abs_builddir)" ; then \
	    COUNT=0; \
	    for F in $(PREP_SRC) ; do \
	        case "$$F" in \
	            /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \
	                if test x"$${linkroot}" = x"$(abs_builddir)" ; then \
	                    linkroot="$(abs_top_builddir)" ; \
	                    cd "$(abs_top_builddir)" ; \
	                fi ;; \
	        esac ; \
	        if ! test -e "$${F}-prepped" ; then \
	            touch "$${F}-prepped" || exit ; \
	            COUNT="`expr $$COUNT + 1`" ; \
	        fi ; \
	    done ; \
	    if ! test -e "$@" ; then touch "$@" ; fi ; \
	 else \
	    COUNT=30 ; \
	    touch "$@.$$$$" ; \
	    while test -e "$@.working" -a "$$COUNT" -gt 0 ; do sleep 1; COUNT="`expr $$COUNT - 1`"; done ; \
	    touch "$@.working" ; \
	    if test -n "`find "$@" -newer "$@.$$$$" 2>/dev/null`" ; then \
	        rm -f "$@.$$$$" "$@.working" ; \
	        exit 0; \
	    fi ; \
	    rm -f "$@.$$$$" ; \
	    COUNT=0; \
	    linksrcroot="$(abs_srcdir)" ; \
	    for F in `echo $(PREP_SRC) | tr ' ' '\n' | sort -n | uniq` ; do \
	        case "$$F" in \
	            /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; \
	                if test x"$${linkroot}" = x"$(abs_builddir)" ; then \
	                    linkroot="$(abs_top_builddir)" ; \
	                    linksrcroot="$(abs_top_srcdir)" ; \
	                    cd "$(abs_top_builddir)" ; \
	                fi ;; \
	            "$(srcdir)"/*) F="`echo "$$F" | sed 's#^$(srcdir)/*#./#'`" ;; \
	        esac ; \
	        D="`dirname "$$F"`" ; \
	        $(MKDIR_P) "$${linkroot}/$$D" || { rm -f "$@.working" ; exit 1 ; } ; \
	        if ! test -s "$${linkroot}/$$F" && test -s "$${linksrcroot}/$$F" ; then \
	            echo "  LN     '$${linksrcroot}/$$F' => '$${linkroot}/$$F' (PWD = '`pwd`')" >&2 ; \
	            ln -fs "$${linksrcroot}/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \
	            COUNT="`expr $$COUNT + 1`" ; \
	        fi ; \
	        if ! test -e "$${linkroot}/$${F}-prepped" ; then \
	            touch "$${linkroot}/$${F}-prepped" || { rm -f "$@.working" ; exit 1 ; } ; \
	            COUNT="`expr $$COUNT + 1`" ; \
	        fi ; \
	    done ; \
	 fi ; \
	 if test "$$COUNT" -gt 0 -o ! -e "$@" ; then touch "$@" ; fi
	@rm -f "$@.working"

# Dirs to clean, etc.
clean-local:
	$(AM_V_at)rm -rf *.chunked *.bak tmp
	$(AM_V_at)for F in $(PREP_SRC) ; do \
	        case "$$F" in \
	            /*) F="`echo "$$F" | sed "s#^$(abs_top_srcdir)/*#./#"`"; cd "$(abs_top_builddir)" ;; \
	        esac ; \
	        if test x"$(abs_srcdir)" != x"$(abs_builddir)" ; then \
	            if test -L "$$F" || test -h "$$F" ; then \
	                rm -f "$$F" ; \
	            fi ; \
	        fi ; \
	        rm -f "$${F}-prepped" ; \
	    done ; \
	    rm -f "$(abs_top_builddir)/docs/.prep-src-docs"*

.PHONY: html html-chunked html-single pdf man

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
