Let scdaemon call a script on status changes
[gnupg.git] / doc / Makefile.am
1 # Copyright (C) 2002, 2004 Free Software Foundation, Inc.
2 #
3 # This file is part of GnuPG.
4 #
5 # GnuPG is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
9
10 # GnuPG is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 # USA.
19
20 ## Process this file with automake to produce Makefile.in
21
22 examples=examples/scd-event
23
24 EXTRA_DIST = DETAILS HACKING TRANSLATE OpenPGP KEYSERVER samplekeys.asc \
25              gnupg-badge-openpgp.eps gnupg-badge-openpgp.jpg \
26              gnupg-badge-openpgp.pdf \
27              gnupg-card-architecture.eps gnupg-card-architecture.png \
28              gnupg-card-architecture.pdf \
29              faq.raw FAQ faq.html gnupg7.texi \
30              opt-homedir.texi see-also-note.texi \
31              $(examples)
32
33 BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \
34                 gnupg-card-architecture.pdf FAQ faq.html
35
36 noinst_PROGRAMS = yat2m
37
38 info_TEXINFOS = gnupg.texi
39
40 dist_pkgdata_DATA = qualified.txt FAQ faq.html
41
42 gnupg_TEXINFOS = \
43         gpg.texi gpgsm.texi gpg-agent.texi scdaemon.texi assuan.texi \
44         tools.texi debugging.texi glossary.texi contrib.texi gpl.texi \
45         sysnotes.texi gnupg-card-architecture.fig
46
47 AM_MAKEFINFOFLAGS = -I $(srcdir)
48
49 YAT2M_OPTIONS = -I $(srcdir) \
50         --release "GnuPG @PACKAGE_VERSION@" --source "GNU Privacy Guard"
51
52 myman_sources = gnupg7.texi gpg.texi gpgsm.texi gpg-agent.texi \
53                 scdaemon.texi tools.texi
54 myman_pages   = gnupg.7 gpg2.1 gpgsm.1 gpg-agent.1 scdaemon.1 gpgv2.1 \
55                 watchgnupg.1 gpgconf.1 addgnupghome.8 gpg-preset-passphrase.1 \
56                 gpg-connect-agent.1 gpgparsemail.1 symcryptrun.1 \
57                 gpgsm-gencert.sh.1
58
59 man_MANS = $(myman_pages)
60
61
62 watchgnupg_SOURCE = gnupg.texi
63
64
65 CLEANFILES = faq.raw.xref
66
67 DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
68                  $(myman_pages)
69
70 yat2m_SOURCES = yat2m.c
71
72
73 .fig.png:
74         fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
75
76 .fig.jpg:
77         fig2dev -L jpg `test -f '$<' || echo '$(srcdir)/'`$< $@
78
79 .fig.eps:
80         fig2dev -L eps `test -f '$<' || echo '$(srcdir)/'`$< $@
81
82 .fig.pdf:
83         fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
84
85
86 FAQ : faq.raw
87 if WORKING_FAQPROG
88         $(FAQPROG) -f $<  $@ || $(FAQPROG) -f $< $@
89 else
90         : Warning: missing faqprog.pl, cannot make $@
91         echo "No $@ due to missing faqprog.pl" > $@
92         echo "See ftp://ftp.gnupg.org/gcrypt/contrib/faqprog.pl" >> $@
93 endif
94
95 faq.html : faq.raw
96 if WORKING_FAQPROG
97         $(FAQPROG) -h -f $< $@ 2>&1 || $(FAQPROG) -h -f $< $@
98 else
99         : Warning: missing faqprog.pl, cannot make $@
100         echo "No $@ due to missing faqprog.pl" > $@
101         echo "See ftp://ftp.gnupg.org/gcrypt/contrib/faqprog.pl" >> $@
102 endif
103
104
105 yat2m-stamp: $(myman_sources)
106         @rm -f yat2m-stamp.tmp
107         @touch yat2m-stamp.tmp
108         for file in $(myman_sources) ; do \
109               ./yat2m $(YAT2M_OPTIONS) --store \
110                   `test -f '$$file' || echo '$(srcdir)/'`$$file ; done
111         @mv -f yat2m-stamp.tmp $@
112
113 yat2m-stamp: yat2m
114
115 $(myman_pages) : yat2m-stamp
116         @if test -f $@; then :; else \
117             trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
118                if mkdir yat2m-lock 2>/dev/null; then \
119                  rm -f yat2m-stamp; \
120                  $(MAKE) $(AM_MAKEFLAGS) yat2m-stamp; \
121                  rmdir yat2m-lock; \
122                else \
123                  while test -d yat2m-lock; do sleep 1; done; \
124                  test -f yat2m-stamp; exit $$?; \
125                fi; \
126              fi
127