summaryrefslogtreecommitdiff
path: root/Build/source/utils/chktex/Makefile.am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-07 16:10:20 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2010-05-07 16:10:20 +0000
commit4a0e95f1014b13c4e182b923d2f0e046499ecdbf (patch)
treec99f2c5433e4e6409370ee6385c9596c57f81774 /Build/source/utils/chktex/Makefile.am
parentc86e94c1b5dc658db3ab0062cbe95e69bafc32d4 (diff)
chktex doc
git-svn-id: svn://tug.org/texlive/trunk@18145 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/chktex/Makefile.am')
-rw-r--r--Build/source/utils/chktex/Makefile.am28
1 files changed, 25 insertions, 3 deletions
diff --git a/Build/source/utils/chktex/Makefile.am b/Build/source/utils/chktex/Makefile.am
index ce5efdb938e..10225a5e956 100644
--- a/Build/source/utils/chktex/Makefile.am
+++ b/Build/source/utils/chktex/Makefile.am
@@ -22,9 +22,10 @@ EXTRA_DIST = $(CHKTEX_TREE)
##
EXTRA_DIST += $(CHKTEX_TREE)-PATCHES
-# in case of an SVN repository
+# in case of an SVN repository, remove a generated file.
dist-hook:
rm -rf `find $(distdir) -name .svn`
+ rm -f $(distdir)/$(CHKTEX_TREE)/ChkTeX.tex
AM_CFLAGS = $(WARNING_CFLAGS)
@@ -56,7 +57,28 @@ config_DATA = $(CHKTEX_TREE)/chktexrc
# documentation
pdfdocdir = ${prefix}/texmf/doc/chktex
-pdfdoc_DATA =
+dist_pdfdoc_DATA = ChkTeX.pdf
+
+ChkTeX.pdf: $(PDF_DEPEND)
+ $(PDFLATEX) -interaction batchmode $(srcdir)/ChkTeX.tex
+ $(PDFLATEX) -interaction batchmode $(srcdir)/ChkTeX.tex
+CLEANFILES = ChkTeX.aux ChkTeX.log
+
+## We distribute ChkTeX.tex (generated from $(CHKTEX_TREE)/ChkTeX.tex.in)
+## and ChkTeX.pdf, but also need rules to create them if missing or
+## (in maintainer-mode) to update them if required.
+.PHONY: build-tex
+all-local: stamp-tex
+stamp-tex: $(CHKTEX_TREE)/ChkTeX.tex
+ $(MAKE) $(AM_MAKEFLAGS) build-tex
+ $(MAKE) $(AM_MAKEFLAGS) ChkTeX.pdf
+ echo timestamp >$@
+DISTCLEANFILES = stamp-tex
+build-tex:
+ cmp -s $(CHKTEX_TREE)/ChkTeX.tex $(srcdir)/ChkTeX.tex \
+ || cp $(CHKTEX_TREE)/ChkTeX.tex $(srcdir)/ChkTeX.tex
+
+EXTRA_DIST += ChkTeX.tex
# chktex tests
TESTS = chktex.test
@@ -65,5 +87,5 @@ TESTS_ENVIRONMENT = CHKTEX_TREE=$(CHKTEX_TREE)
EXTRA_DIST += chktex.test
-CLEANFILES = chktest
+CLEANFILES += chktest