Debian Codegraph @

doc/Makefile.am

raw
1 # Makefile.am for libgpg-error documentation
2 # Copyright (C) 2014 g10 Code GmbH
3 #
4 # This file is part of libgpg-error.
5 #
6 # libgpg-error is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU Lesser General Public License as
8 # published by the Free Software Foundation; either version 2.1 of the
9 # License, or (at your option) any later version.
10 #
11 # libgpg-error is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Lesser General Public License for more details.
15 #
16 # You should have received a copy of the GNU Lesser General Public
17 # License along with this program; if not, see <https://www.gnu.org/licenses/>.
18
19
20 EXTRA_DIST = HACKING errorref.txt
21
22 bin_PROGRAMS = yat2m
23 yat2m_SOURCES = yat2m.c
24 yat2m_CFLAGS= -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\""
25
26 DISTCLEANFILES = gpgrt.cps yat2m-stamp.tmp yat2m-stamp $(myman_pages)
27 CLEANFILES = errorref.txt.x
28
29 info_TEXINFOS = gpgrt.texi
30 gpgrt_TEXINFOS = lgpl.texi gpl.texi
31
32 YAT2M_OPTIONS = -I $(srcdir) \
33 --release "Libgpg-error @PACKAGE_VERSION@" --source "GnuPG"
34
35 myman_sources = gpgrt.texi
36 if INSTALL_GPG_ERROR_CONFIG
37 myman_pages = gpg-error-config.1 gpgrt-config.1
38 else
39 myman_pages = gpgrt-config.1
40 endif
41
42 man_MANS = $(myman_pages)
43
44 if CROSS_COMPILING
45 YAT2M_CMD = ./yat2m-for-build$(EXEEXT_FOR_BUILD)
46 YAT2M_DEP = yat2m-for-build$(EXEEXT_FOR_BUILD)
47 CLEANFILES += yat2m-for-build$(EXEEXT_FOR_BUILD)
48
49 yat2m-for-build$(EXEEXT_FOR_BUILD): yat2m.c
50 $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) \
51 $(CPPFLAGS_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
52 else
53 YAT2M_CMD = ./yat2m$(EXEEXT)
54 YAT2M_DEP = yat2m$(EXEEXT)
55 endif
56
57 yat2m-stamp: $(myman_sources) $(srcdir)/version.texi
58 @rm -f yat2m-stamp.tmp
59 @touch yat2m-stamp.tmp
60 for file in $(myman_sources) ; do \
61 $(YAT2M_CMD) $(YAT2M_OPTIONS) --store \
62 `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
63 @mv -f yat2m-stamp.tmp $@
64
65 yat2m-stamp: $(YAT2M_DEP)
66
67 $(myman_pages) : yat2m-stamp
68 @if test -f $@; then :; else \
69 trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
70 if mkdir yat2m-lock 2>/dev/null; then \
71 rm -f yat2m-stamp; \
72 $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
73 rmdir yat2m-lock; \
74 else \
75 while test -d yat2m-lock; do sleep 1; done; \
76 test -f yat2m-stamp; exit $$?; \
77 fi; \
78 fi
79
80 # Make sure that gpgrt.texi is touched if any other texi file has
81 # been modified. This is required so that the version.texi magic
82 # updates the release date.
83 gpgrt.texi : $(gpgrt_TEXINFOS)
84 touch $(srcdir)/gpgrt.texi
85
86 errorref.txt.x : errorref.txt
87 sed '/^##/ d' $(srcdir)/errorref.txt >$@
88 echo "# Installed by $(PACKAGE_NAME) $(PACKAGE_VERSION)" >>$@
89
90 install-data-local: errorref.txt.x
91 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
92 $(INSTALL_DATA) errorref.txt.x $(DESTDIR)$(pkgdatadir)/errorref.txt
93
94 uninstall-local:
95 -@rm $(DESTDIR)$(pkgdatadir)/errorref.txt