# This Makefile.am is in the public domain

do_subst = $(SED) -e 's,[@]SYSCONFDIR[@],$(sysconfdir),g'

gnunet.conf.5: gnunet.conf.5.in Makefile
	$(do_subst) < $(srcdir)/gnunet.conf.5.in > gnunet.conf.5

CLEANFILES = gnunet.conf.5 *.html

if TEXI2MDOC_GENERATION
gnunet-c-tutorial.7: Makefile
	@texi2mdoc -I../tutorial:../tutorial/chapters ../tutorial/gnunet-tutorial.texi > gnunet-c-tutorial.7

gnunet-documentation.7: Makefile
	@texi2mdoc -I../handbook:../handbook/chapters ../handbook/gnunet.texi > gnunet-documentation.7

CLEANFILES += gnunet-documentation.7 gnunet-c-tutorial.7
endif


html:
	$(SH) $(srcdir)/produce_html.sh

man_MANS = \
  gnunet.conf.5 \
  gnunet-arm.1 \
  gnunet-ats.1 \
  gnunet-auto-share.1 \
  gnunet-bcd.1 \
  gnunet-config.1 \
  gnunet-core.1 \
  gnunet-conversation.1 \
  gnunet-conversation-test.1 \
  gnunet-directory.1 \
  gnunet-dns2gns.1 \
  gnunet-datastore.1 \
  gnunet-download.1 \
  gnunet-ecc.1 \
  gnunet-fs.1 \
  gnunet-gns.1 \
  gnunet-gns-proxy.1 \
  gnunet-gns-proxy-setup-ca.1 \
  gnunet-identity.1 \
  gnunet-cadet.1 \
  gnunet-namecache.1 \
  gnunet-namestore.1 \
  gnunet-namestore-fcfsd.1 \
  gnunet-nat.1 \
  gnunet-nat-auto.1 \
  gnunet-nat-server.1 \
  gnunet-nse.1 \
  gnunet-peerinfo.1 \
  gnunet-publish.1 \
  gnunet-qr.1 \
  gnunet-reclaim.1 \
  gnunet-resolver.1 \
  gnunet-revocation.1 \
  gnunet-scalarproduct.1 \
  gnunet-scrypt.1 \
  gnunet-search.1 \
  gnunet-statistics.1 \
  gnunet-testbed-profiler.1 \
  gnunet-testing-run-service.1 \
  gnunet-timeout.1 \
  gnunet-transport.1 \
  gnunet-transport-certificate-creation.1 \
  gnunet-unindex.1 \
  gnunet-uri.1 \
  gnunet-vpn.1 \
  gnunet-zoneimport.1

if TEXI2MDOC_GENERATION
man_MANS += gnunet-c-tutorial.7 gnunet-documentation.7
endif

EXTRA_DIST = ${man_MANS} \
 gnunet.conf.5.in \
 README
