Blame doc/Makefile.am

Packit fc043f
# Makefile.am for libgpg-error documentation
Packit fc043f
# Copyright (C) 2014 g10 Code GmbH
Packit fc043f
#
Packit fc043f
# This file is part of libgpg-error.
Packit fc043f
#
Packit fc043f
# libgpg-error is free software; you can redistribute it and/or modify
Packit fc043f
# it under the terms of the GNU Lesser General Public License as
Packit fc043f
# published by the Free Software Foundation; either version 2.1 of the
Packit fc043f
# License, or (at your option) any later version.
Packit fc043f
#
Packit fc043f
# libgpg-error is distributed in the hope that it will be useful,
Packit fc043f
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit fc043f
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit fc043f
# GNU Lesser General Public License for more details.
Packit fc043f
#
Packit fc043f
# You should have received a copy of the GNU Lesser General Public
Packit fc043f
# License along with this program; if not, see <https://www.gnu.org/licenses/>.
Packit fc043f
Packit fc043f
Packit fc043f
EXTRA_DIST = HACKING errorref.txt
Packit fc043f
Packit fc043f
bin_PROGRAMS = yat2m
Packit fc043f
yat2m_SOURCES = yat2m.c
Packit fc043f
yat2m_CFLAGS= -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\""
Packit fc043f
Packit fc043f
DISTCLEANFILES = gpgrt.cps yat2m-stamp.tmp yat2m-stamp $(myman_pages)
Packit fc043f
CLEANFILES = errorref.txt.x
Packit fc043f
Packit fc043f
info_TEXINFOS = gpgrt.texi
Packit fc043f
gpgrt_TEXINFOS = lgpl.texi gpl.texi
Packit fc043f
Packit fc043f
YAT2M_OPTIONS = -I $(srcdir) \
Packit fc043f
	--release "Libgpg-error @PACKAGE_VERSION@" --source "GnuPG"
Packit fc043f
Packit fc043f
myman_sources = gpgrt.texi
Packit fc043f
myman_pages   = gpg-error-config.1
Packit fc043f
Packit fc043f
man_MANS = $(myman_pages)
Packit fc043f
Packit fc043f
if HAVE_YAT2M
Packit fc043f
YAT2M_CMD = $(YAT2M)
Packit fc043f
YAT2M_DEP = $(YAT2M)
Packit fc043f
else
Packit fc043f
if CROSS_COMPILING
Packit fc043f
YAT2M_CMD = ./yat2m-for-build
Packit fc043f
YAT2M_DEP = yat2m-for-build
Packit fc043f
CLEANFILES += yat2m-for-build
Packit fc043f
Packit fc043f
yat2m-for-build: yat2m.c
Packit fc043f
	$(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
Packit fc043f
else
Packit fc043f
YAT2M_CMD = ./yat2m
Packit fc043f
YAT2M_DEP = yat2m
Packit fc043f
endif
Packit fc043f
endif
Packit fc043f
Packit fc043f
yat2m-stamp: $(myman_sources) $(srcdir)/version.texi
Packit fc043f
	@rm -f yat2m-stamp.tmp
Packit fc043f
	@touch yat2m-stamp.tmp
Packit fc043f
	for file in $(myman_sources) ; do \
Packit fc043f
              $(YAT2M_CMD) $(YAT2M_OPTIONS) --store \
Packit fc043f
	          `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
Packit fc043f
	@mv -f yat2m-stamp.tmp $@
Packit fc043f
Packit fc043f
yat2m-stamp: $(YAT2M_DEP)
Packit fc043f
Packit fc043f
$(myman_pages) : yat2m-stamp
Packit fc043f
	@if test -f $@; then :; else \
Packit fc043f
            trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
Packit fc043f
               if mkdir yat2m-lock 2>/dev/null; then \
Packit fc043f
                 rm -f yat2m-stamp; \
Packit fc043f
                 $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
Packit fc043f
                 rmdir yat2m-lock; \
Packit fc043f
               else \
Packit fc043f
                 while test -d yat2m-lock; do sleep 1; done; \
Packit fc043f
                 test -f yat2m-stamp; exit $$?; \
Packit fc043f
               fi; \
Packit fc043f
             fi
Packit fc043f
Packit fc043f
# Make sure that gpgrt.texi is touched if any other texi file has
Packit fc043f
# been modified.  This is required so that the version.texi magic
Packit fc043f
# updates the release date.
Packit fc043f
gpgrt.texi : $(gpgrt_TEXINFOS)
Packit fc043f
	touch $(srcdir)/gpgrt.texi
Packit fc043f
Packit fc043f
errorref.txt.x : errorref.txt
Packit fc043f
	sed '/^##/ d' $< >$@
Packit fc043f
	echo "# Installed by $(PACKAGE_NAME) $(PACKAGE_VERSION)" >>$@
Packit fc043f
Packit fc043f
install-data-local: errorref.txt.x
Packit fc043f
	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
Packit fc043f
	$(INSTALL_DATA) errorref.txt.x $(DESTDIR)$(pkgdatadir)/errorref.txt
Packit fc043f
Packit fc043f
uninstall-local:
Packit fc043f
	-@rm $(DESTDIR)$(pkgdatadir)/errorref.txt