# libguestfs documentation
# Copyright (C) 2010-2025 Red Hat Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

include $(top_srcdir)/subdir-rules.mk

EXTRA_DIST = \
	C_SOURCE_FILES \
	guestfs-building.pod \
	guestfs-faq.pod \
	guestfs-hacking.pod \
	guestfs-internals.pod \
	guestfs-performance.pod \
	guestfs-recipes.pod \
	guestfs-release-notes-1.54.pod \
	guestfs-release-notes-1.52.pod \
	guestfs-release-notes-1.50.pod \
	guestfs-release-notes-1.48.pod \
	guestfs-release-notes-1.46.pod \
	guestfs-release-notes-1.44.pod \
	guestfs-release-notes-1.42.pod \
	guestfs-release-notes-1.40.pod \
	guestfs-release-notes-1.38.pod \
	guestfs-release-notes-1.36.pod \
	guestfs-release-notes-1.34.pod \
	guestfs-release-notes-1.32.pod \
	guestfs-release-notes-1.30.pod \
	guestfs-release-notes-1.28.pod \
	guestfs-release-notes-1.26.pod \
	guestfs-release-notes-1.24.pod \
	guestfs-release-notes-1.22.pod \
	guestfs-release-notes-1.20.pod \
	guestfs-release-notes-1.18.pod \
	guestfs-release-notes-1.16.pod \
	guestfs-release-notes-1.14.pod \
	guestfs-release-notes-1.12.pod \
	guestfs-release-notes-1.10.pod \
	guestfs-release-notes-1.8.pod \
	guestfs-release-notes-1.6.pod \
	guestfs-release-notes-1.4.pod \
	guestfs-release-notes.pod \
	guestfs-security.pod \
	guestfs-testing.pod \
	make-internal-documentation.pl \
	README

CLEANFILES += \
	internal-documentation.pod

man_MANS = \
	guestfs-building.1 \
	guestfs-faq.1 \
	guestfs-hacking.1 \
	guestfs-internals.1 \
	guestfs-performance.1 \
	guestfs-recipes.1 \
	guestfs-release-notes-1.54.1 \
	guestfs-release-notes-1.52.1 \
	guestfs-release-notes-1.50.1 \
	guestfs-release-notes-1.48.1 \
	guestfs-release-notes-1.46.1 \
	guestfs-release-notes-1.44.1 \
	guestfs-release-notes-1.42.1 \
	guestfs-release-notes-1.40.1 \
	guestfs-release-notes-1.38.1 \
	guestfs-release-notes-1.36.1 \
	guestfs-release-notes-1.34.1 \
	guestfs-release-notes-1.32.1 \
	guestfs-release-notes-1.30.1 \
	guestfs-release-notes-1.28.1 \
	guestfs-release-notes-1.26.1 \
	guestfs-release-notes-1.24.1 \
	guestfs-release-notes-1.22.1 \
	guestfs-release-notes-1.20.1 \
	guestfs-release-notes-1.18.1 \
	guestfs-release-notes-1.16.1 \
	guestfs-release-notes-1.14.1 \
	guestfs-release-notes-1.12.1 \
	guestfs-release-notes-1.10.1 \
	guestfs-release-notes-1.8.1 \
	guestfs-release-notes-1.6.1 \
	guestfs-release-notes-1.4.1 \
	guestfs-release-notes.1 \
	guestfs-security.1 \
	guestfs-testing.1
noinst_DATA = \
	$(top_builddir)/website/guestfs-building.1.html \
	$(top_builddir)/website/guestfs-faq.1.html \
	$(top_builddir)/website/guestfs-hacking.1.html \
	$(top_builddir)/website/guestfs-internals.1.html \
	$(top_builddir)/website/guestfs-performance.1.html \
	$(top_builddir)/website/guestfs-recipes.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.54.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.52.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.50.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.48.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.46.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.44.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.42.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.40.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.38.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.36.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.34.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.32.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.30.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.28.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.26.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.24.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.22.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.20.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.18.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.16.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.14.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.12.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.10.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.8.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.6.1.html \
	$(top_builddir)/website/guestfs-release-notes-1.4.1.html \
	$(top_builddir)/website/guestfs-release-notes.1.html \
	$(top_builddir)/website/guestfs-security.1.html \
	$(top_builddir)/website/guestfs-testing.1.html

guestfs-building.1 $(top_builddir)/website/guestfs-building.1.html: stamp-guestfs-building.pod

stamp-guestfs-building.pod: guestfs-building.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-building.1 \
	  --html $(top_builddir)/website/guestfs-building.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@

guestfs-faq.1 $(top_builddir)/website/guestfs-faq.1.html: stamp-guestfs-faq.pod

stamp-guestfs-faq.pod: guestfs-faq.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-faq.1 \
	  --html $(top_builddir)/website/guestfs-faq.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@

guestfs-hacking.1 $(top_builddir)/website/guestfs-hacking.1.html: stamp-guestfs-hacking.pod

stamp-guestfs-hacking.pod: guestfs-hacking.pod internal-documentation.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-hacking.1 \
	  --html $(top_builddir)/website/guestfs-hacking.1.html \
	  --insert internal-documentation.pod:__INTERNAL_DOCUMENTATION__ \
	  --license LGPLv2+ \
	  $<
	touch $@

source_files := $(shell cat $(srcdir)/C_SOURCE_FILES)

internal-documentation.pod: $(source_files:%=$(top_srcdir)/%) $(srcdir)/make-internal-documentation.pl
	rm -f $@ $@-t
	$(srcdir)/make-internal-documentation.pl \
	    --srcdir $(top_srcdir) \
	    -o $@-t \
	    $(source_files)
	mv $@-t $@

guestfs-internals.1 $(top_builddir)/website/guestfs-internals.1.html: stamp-guestfs-internals.pod

stamp-guestfs-internals.pod: guestfs-internals.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-internals.1 \
	  --html $(top_builddir)/website/guestfs-internals.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@

guestfs-performance.1 $(top_builddir)/website/guestfs-performance.1.html: stamp-guestfs-performance.pod

stamp-guestfs-performance.pod: guestfs-performance.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-performance.1 \
	  --html $(top_builddir)/website/guestfs-performance.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@

guestfs-recipes.1 $(top_builddir)/website/guestfs-recipes.1.html: stamp-guestfs-recipes.pod

stamp-guestfs-recipes.pod: guestfs-recipes.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-recipes.1 \
	  --html $(top_builddir)/website/guestfs-recipes.1.html \
	  --license examples \
	  $<
	touch $@

guestfs-release-notes-1.54.1 guestfs-release-notes-1.54.txt $(top_builddir)/website/guestfs-release-notes-1.54.1.html: stamp-guestfs-release-notes-1.54.pod

stamp-guestfs-release-notes-1.54.pod: guestfs-release-notes-1.54.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.54.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.54.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.52.1 guestfs-release-notes-1.52.txt $(top_builddir)/website/guestfs-release-notes-1.52.1.html: stamp-guestfs-release-notes-1.52.pod

stamp-guestfs-release-notes-1.52.pod: guestfs-release-notes-1.52.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.52.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.52.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.50.1 guestfs-release-notes-1.50.txt $(top_builddir)/website/guestfs-release-notes-1.50.1.html: stamp-guestfs-release-notes-1.50.pod

stamp-guestfs-release-notes-1.50.pod: guestfs-release-notes-1.50.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.50.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.50.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.48.1 guestfs-release-notes-1.48.txt $(top_builddir)/website/guestfs-release-notes-1.48.1.html: stamp-guestfs-release-notes-1.48.pod

stamp-guestfs-release-notes-1.48.pod: guestfs-release-notes-1.48.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.48.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.48.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.46.1 guestfs-release-notes-1.46.txt $(top_builddir)/website/guestfs-release-notes-1.46.1.html: stamp-guestfs-release-notes-1.46.pod

stamp-guestfs-release-notes-1.46.pod: guestfs-release-notes-1.46.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.46.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.46.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.44.1 guestfs-release-notes-1.44.txt $(top_builddir)/website/guestfs-release-notes-1.44.1.html: stamp-guestfs-release-notes-1.44.pod

stamp-guestfs-release-notes-1.44.pod: guestfs-release-notes-1.44.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.44.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.44.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.42.1 guestfs-release-notes-1.42.txt $(top_builddir)/website/guestfs-release-notes-1.42.1.html: stamp-guestfs-release-notes-1.42.pod

stamp-guestfs-release-notes-1.42.pod: guestfs-release-notes-1.42.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.42.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.42.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.40.1 guestfs-release-notes-1.40.txt $(top_builddir)/website/guestfs-release-notes-1.40.1.html: stamp-guestfs-release-notes-1.40.pod

stamp-guestfs-release-notes-1.40.pod: guestfs-release-notes-1.40.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.40.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.40.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.38.1 guestfs-release-notes-1.38.txt $(top_builddir)/website/guestfs-release-notes-1.38.1.html: stamp-guestfs-release-notes-1.38.pod

stamp-guestfs-release-notes-1.38.pod: guestfs-release-notes-1.38.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.38.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.38.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.36.1 guestfs-release-notes-1.36.txt $(top_builddir)/website/guestfs-release-notes-1.36.1.html: stamp-guestfs-release-notes-1.36.pod

stamp-guestfs-release-notes-1.36.pod: guestfs-release-notes-1.36.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.36.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.36.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.34.1 guestfs-release-notes-1.34.txt $(top_builddir)/website/guestfs-release-notes-1.34.1.html: stamp-guestfs-release-notes-1.34.pod

stamp-guestfs-release-notes-1.34.pod: guestfs-release-notes-1.34.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.34.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.34.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.32.1 guestfs-release-notes-1.32.txt $(top_builddir)/website/guestfs-release-notes-1.32.1.html: stamp-guestfs-release-notes-1.32.pod

stamp-guestfs-release-notes-1.32.pod: guestfs-release-notes-1.32.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.32.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.32.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.30.1 guestfs-release-notes-1.30.txt $(top_builddir)/website/guestfs-release-notes-1.30.1.html: stamp-guestfs-release-notes-1.30.pod

stamp-guestfs-release-notes-1.30.pod: guestfs-release-notes-1.30.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.30.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.30.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.28.1 guestfs-release-notes-1.28.txt $(top_builddir)/website/guestfs-release-notes-1.28.1.html: stamp-guestfs-release-notes-1.28.pod

stamp-guestfs-release-notes-1.28.pod: guestfs-release-notes-1.28.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.28.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.28.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.26.1 guestfs-release-notes-1.26.txt $(top_builddir)/website/guestfs-release-notes-1.26.1.html: stamp-guestfs-release-notes-1.26.pod

stamp-guestfs-release-notes-1.26.pod: guestfs-release-notes-1.26.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.26.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.26.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.24.1 guestfs-release-notes-1.24.txt $(top_builddir)/website/guestfs-release-notes-1.24.1.html: stamp-guestfs-release-notes-1.24.pod

stamp-guestfs-release-notes-1.24.pod: guestfs-release-notes-1.24.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.24.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.24.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.22.1 guestfs-release-notes-1.22.txt $(top_builddir)/website/guestfs-release-notes-1.22.1.html: stamp-guestfs-release-notes-1.22.pod

stamp-guestfs-release-notes-1.22.pod: guestfs-release-notes-1.22.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.22.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.22.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.20.1 guestfs-release-notes-1.20.txt $(top_builddir)/website/guestfs-release-notes-1.20.1.html: stamp-guestfs-release-notes-1.20.pod

stamp-guestfs-release-notes-1.20.pod: guestfs-release-notes-1.20.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.20.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.20.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.18.1 guestfs-release-notes-1.18.txt $(top_builddir)/website/guestfs-release-notes-1.18.1.html: stamp-guestfs-release-notes-1.18.pod

stamp-guestfs-release-notes-1.18.pod: guestfs-release-notes-1.18.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.18.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.18.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.16.1 guestfs-release-notes-1.16.txt $(top_builddir)/website/guestfs-release-notes-1.16.1.html: stamp-guestfs-release-notes-1.16.pod

stamp-guestfs-release-notes-1.16.pod: guestfs-release-notes-1.16.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.16.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.16.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.14.1 guestfs-release-notes-1.14.txt $(top_builddir)/website/guestfs-release-notes-1.14.1.html: stamp-guestfs-release-notes-1.14.pod

stamp-guestfs-release-notes-1.14.pod: guestfs-release-notes-1.14.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.14.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.14.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.12.1 guestfs-release-notes-1.12.txt $(top_builddir)/website/guestfs-release-notes-1.12.1.html: stamp-guestfs-release-notes-1.12.pod

stamp-guestfs-release-notes-1.12.pod: guestfs-release-notes-1.12.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.12.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.12.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.10.1 guestfs-release-notes-1.10.txt $(top_builddir)/website/guestfs-release-notes-1.10.1.html: stamp-guestfs-release-notes-1.10.pod

stamp-guestfs-release-notes-1.10.pod: guestfs-release-notes-1.10.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.10.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.10.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.8.1 guestfs-release-notes-1.8.txt $(top_builddir)/website/guestfs-release-notes-1.8.1.html: stamp-guestfs-release-notes-1.8.pod

stamp-guestfs-release-notes-1.8.pod: guestfs-release-notes-1.8.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.8.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.8.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.6.1 guestfs-release-notes-1.6.txt $(top_builddir)/website/guestfs-release-notes-1.6.1.html: stamp-guestfs-release-notes-1.6.pod

stamp-guestfs-release-notes-1.6.pod: guestfs-release-notes-1.6.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.6.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.6.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes-1.4.1 guestfs-release-notes-1.4.txt $(top_builddir)/website/guestfs-release-notes-1.4.1.html: stamp-guestfs-release-notes-1.4.pod

stamp-guestfs-release-notes-1.4.pod: guestfs-release-notes-1.4.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes-1.4.1 \
	  --html $(top_builddir)/website/guestfs-release-notes-1.4.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-release-notes.1 guestfs-release-notes.txt $(top_builddir)/website/guestfs-release-notes.1.html: stamp-guestfs-release-notes.pod

stamp-guestfs-release-notes.pod: guestfs-release-notes.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-release-notes.1 \
	  --html $(top_builddir)/website/guestfs-release-notes.1.html \
	  --license GPLv2+ \
	  $<
	touch $@

guestfs-security.1 $(top_builddir)/website/guestfs-security.1.html: stamp-guestfs-security.pod

stamp-guestfs-security.pod: guestfs-security.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-security.1 \
	  --html $(top_builddir)/website/guestfs-security.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@

guestfs-testing.1 $(top_builddir)/website/guestfs-testing.1.html: stamp-guestfs-testing.pod

stamp-guestfs-testing.pod: guestfs-testing.pod
	$(PODWRAPPER) \
	  --section 1 \
	  --man guestfs-testing.1 \
	  --html $(top_builddir)/website/guestfs-testing.1.html \
	  --license LGPLv2+ \
	  $<
	touch $@
