Skip to content

Commit 978cba3

Browse files
committed
Add Makefile for documentation
1 parent ad19bb5 commit 978cba3

File tree

4 files changed

+45
-5
lines changed

4 files changed

+45
-5
lines changed

Makefile.am

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
AUTOMAKE_OPTIONS = dist-bzip2 dist-zip
1212
man_MANS = doc/cheops.6
1313
EXTRA_DIST = doc/cheops.tex $(man_MANS)
14-
SUBDIRS = src
14+
SUBDIRS = src doc
15+
doc_DATA = COPYING NEWS README
1516

17+
README: README.md
18+
cp $< $@
1619

20+
ChangeLog: FORCE
21+
gitlog-to-changelog >$@
22+
23+
FORCE:

configure.ac

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@
44

55
AC_PREREQ(2.57)
66
AC_INIT(CHEOPS, 1.3, psychonaut@nothingisreal.com, cheops)
7-
AM_INIT_AUTOMAKE([foreign]) # Suppress error about missing ChangeLog
7+
AM_INIT_AUTOMAKE()
88
AC_CONFIG_SRCDIR([src/ChessTypes.h])
99
AC_CONFIG_HEADER([config.h])
1010

1111
# Checks for programs.
1212
AC_PROG_CXX
13+
AC_CHECK_PROG(PDFLATEX, pdflatex, pdflatex)
14+
if test -z "$PDFLATEX"; then
15+
AC_MSG_WARN([Unable to create PDF version of the user manual.])
16+
fi
17+
18+
AM_CONDITIONAL([HAVE_PDFLATEX], test -n "$PDFLATEX")
1319

1420
# Checks for libraries.
1521

@@ -19,5 +25,5 @@ AC_PROG_CXX
1925

2026
# Checks for library functions.
2127

22-
AC_CONFIG_FILES([Makefile src/Makefile])
28+
AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile])
2329
AC_OUTPUT

doc/Makefile.am

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Copyright (C) 2016 Tristan Miller <psychonaut@nothingisreal.com>
2+
#
3+
# This file is free software; the author gives unlimited permission to
4+
# copy and/or distribute it, with or without modifications.
5+
#
6+
# This program is distributed in the hope that it will be useful, but
7+
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even
8+
# the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9+
# PURPOSE.
10+
11+
docfiles = cheops.tex
12+
13+
if HAVE_PDFLATEX
14+
doc_DATA = cheops.pdf
15+
docfiles += cheops.pdf
16+
MANNAME = cheops
17+
MANTEXSRC = $(MANNAME).tex
18+
MANAUX = $(MANNAME).aux
19+
MANPDF = $(MANNAME).pdf
20+
21+
CLEANFILES = $(MANPDF) $(MANNAME).log $(MANNAME).idx $(MANAUX)
22+
23+
$(MANPDF): $(srcdir)/$(MANTEXSRC)
24+
$(PDFLATEX) $<
25+
$(PDFLATEX) $<
26+
endif
27+
28+
dist_doc_DATA = $(docfiles)

src/Makefile.am

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#
2-
# Copyright (C) 2003 Tristan Miller <psychonaut@nothingisreal.com>
1+
# Copyright (C) 2003-2016 Tristan Miller <psychonaut@nothingisreal.com>
32
#
43
# This file is free software; the author gives unlimited permission to
54
# copy and/or distribute it, with or without modifications.

0 commit comments

Comments
 (0)