summaryrefslogtreecommitdiffstats
path: root/doc/Makefile.am
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-06-09 21:29:15 +0200
committerWerner Koch <wk@gnupg.org>2015-06-09 21:29:15 +0200
commit25331bba5554a39d226d32433add7784b2e170b8 (patch)
tree4c8e4d1335407bdab98c4a7584fa2b95375457ca /doc/Makefile.am
parentdirmngr: Avoid crash due to an empty crls.d/DIR.txt. (diff)
downloadgnupg2-25331bba5554a39d226d32433add7784b2e170b8.tar.xz
gnupg2-25331bba5554a39d226d32433add7784b2e170b8.zip
doc: Do not used fixed file names in the manuals.
* doc/mkdefsinc.c: New. * doc/Makefile.am: Include cmacros.am. (EXTRA_DIST): Add mkdefsinc.c defsincdate. (BUILT_SOURCES): Add defsincdate (CLEANFILES): Add mkdefsinc and defs.inc. (mkdefsinc): New rule. (yat2m-stamp): Depend on defs.inc. ($(myman_pages) gnupg.7): Ditto. (gnupg.texi): Remove rule to touch itself. (dist-hook): New. (defsincdate): New. (defs.inc): New. * doc/gnupg.texi: Remove inclusion of version.texi. Include defs.inc. Also include defs.inc in all files used to build man files. Change fixed directory names to those from defs.inc. -- GnuPG-bug-id: 1661 Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'doc/Makefile.am')
-rw-r--r--doc/Makefile.am37
1 files changed, 27 insertions, 10 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 6d66679f3..ee8bca2ad 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -17,6 +17,10 @@
## Process this file with automake to produce Makefile.in
+AM_CPPFLAGS =
+
+include $(top_srcdir)/am/cmacros.am
+
examples = examples/README examples/scd-event examples/trustlist.txt \
examples/gpgconf.conf examples/pwpattern.list
@@ -32,12 +36,12 @@ EXTRA_DIST = samplekeys.asc mksamplekeys \
gnupg-logo.eps gnupg-logo.pdf gnupg-logo.png gnupg-logo-tr.png\
gnupg-card-architecture.eps gnupg-card-architecture.png \
gnupg-card-architecture.pdf \
- FAQ gnupg7.texi \
+ FAQ gnupg7.texi mkdefsinc.c defsincdate \
opt-homedir.texi see-also-note.texi specify-user-id.texi \
gpgv.texi yat2m.c ChangeLog-2011 whats-new-in-2.1.txt
BUILT_SOURCES = gnupg-card-architecture.eps gnupg-card-architecture.png \
- gnupg-card-architecture.pdf
+ gnupg-card-architecture.pdf defsincdate
info_TEXINFOS = gnupg.texi
@@ -75,7 +79,7 @@ man_MANS = $(myman_pages) gnupg.7
watchgnupg_SOURCE = gnupg.texi
-CLEANFILES = yat2m
+CLEANFILES = yat2m mkdefsinc defs.inc
DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
$(myman_pages) gnupg.7
@@ -83,6 +87,10 @@ DISTCLEANFILES = gnupg.tmp gnupg.ops yat2m-stamp.tmp yat2m-stamp \
yat2m: yat2m.c
$(CC_FOR_BUILD) -o $@ $(srcdir)/yat2m.c
+mkdefsinc: mkdefsinc.c Makefile ../config.h
+ $(CC_FOR_BUILD) -I. -I.. -I$(srcdir) $(AM_CPPFLAGS) \
+ -o $@ $(srcdir)/mkdefsinc.c
+
.fig.png:
fig2dev -L png `test -f '$<' || echo '$(srcdir)/'`$< $@
@@ -97,7 +105,7 @@ yat2m: yat2m.c
fig2dev -L pdf `test -f '$<' || echo '$(srcdir)/'`$< $@
-yat2m-stamp: $(myman_sources)
+yat2m-stamp: $(myman_sources) defs.inc
@rm -f yat2m-stamp.tmp
@touch yat2m-stamp.tmp
for file in $(myman_sources) ; do \
@@ -107,7 +115,7 @@ yat2m-stamp: $(myman_sources)
yat2m-stamp: yat2m
-$(myman_pages) gnupg.7 : yat2m-stamp
+$(myman_pages) gnupg.7 : yat2m-stamp defs.inc
@if test -f $@; then :; else \
trap 'rm -rf yat2m-stamp yat2m-lock' 1 2 13 15; \
if mkdir yat2m-lock 2>/dev/null; then \
@@ -120,11 +128,20 @@ $(myman_pages) gnupg.7 : yat2m-stamp
fi; \
fi
-# Make sure that gnupg.texi is touched if any other source file has
-# been modified. This is required so that the version.texi magic
-# updates the release date.
-gnupg.texi : $(gnupg_TEXINFOS)
- touch $(srcdir)/gnupg.texi
+dist-hook: defsincdate
+
+defsincdate: $(gnupg_TEXINFOS)
+ : >defsincdate ; \
+ if test -d $(top_srcdir)/.git; then \
+ (cd $(srcdir) && git log -1 --format='%ct' \
+ -- $(gnupg_TEXINFOS) 2>/dev/null) >>defsincdate; \
+ fi
+
+defs.inc : defsincdate Makefile mkdefsinc
+ incd="`test -f defsincdate || echo '$(srcdir)/'`defsincdate"; \
+ ./mkdefsinc -C $(srcdir) --date "`cat $$incd 2>/dev/null`" \
+ $(gnupg_TEXINFOS) >$@
+
online: gnupg.html gnupg.pdf
set -e; \