aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-28 06:17:08 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-28 06:20:23 +0200
commit5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf (patch)
treed2dedd186cad15c3983ea3af33fbaacc6f58ba3c /Makefile
parentnamespace some definitions (diff)
downloadlibgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.gz
libgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.bz2
libgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.xz
info: errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 19 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 8870cfe..377d98e 100644
--- a/Makefile
+++ b/Makefile
@@ -28,6 +28,9 @@ LICENSEDIR ?= $(DATADIR)/licenses
# The name of the package as it should be installed.
PKGNAME ?= libgamma
+# General-preprocess command. (https://github.com/maandree/gpp)
+GPP ?= gpp
+
# Enabled warnings.
WARN = -Wall -Wextra -pedantic -Wdouble-promotion -Wformat=2 -Winit-self \
@@ -53,8 +56,11 @@ LIBS_C =
# Object files for the library.
LIBOBJ = libgamma-facade libgamma-method libgamma-error gamma-helper edid
+# Header files for the library are parsed for the info manual.
+HEADERS_INFO = libgamma-error libgamma-facade libgamma-method
+
# Header files for the library, as installed.
-HEADERS = libgamma libgamma-config libgamma-error libgamma-facade libgamma-method
+HEADERS = libgamma libgamma-config $(HEADERS_INFO)
# Object files for the test.
TESTOBJ = test
@@ -134,29 +140,34 @@ obj/%.o: test/%.c
.PHONY: doc
doc: info pdf dvi ps
+obj/libgamma.texinfo: info/libgamma.texinfo $(foreach H,$(HEADERS_INFO),src/$(H).h)
+ mkdir -p obj
+ $(GPP) --symbol '£' --input $< --output $@
+
+obj/%.texinfo: info/%.texinfo
+ mkdir -p obj
+ cp $< $@
+
.PHONY: info
info: libgamma.info
-%.info: info/%.texinfo info/fdl.texinfo
+%.info: obj/%.texinfo obj/fdl.texinfo
makeinfo $<
.PHONY: pdf
pdf: libgamma.pdf
-%.pdf: info/%.texinfo info/fdl.texinfo
- mkdir -p obj
+%.pdf: obj/%.texinfo obj/fdl.texinfo
cd obj ; yes X | texi2pdf ../$<
mv obj/$@ $@
.PHONY: dvi
dvi: libgamma.dvi
-%.dvi: info/%.texinfo info/fdl.texinfo
- mkdir -p obj
+%.dvi: obj/%.texinfo obj/fdl.texinfo
cd obj ; yes X | $(TEXI2DVI) ../$<
mv obj/$@ $@
.PHONY: ps
ps: libgamma.ps
-%.ps: info/%.texinfo info/fdl.texinfo
- mkdir -p obj
+%.ps: obj/%.texinfo obj/fdl.texinfo
cd obj ; yes X | texi2pdf --ps ../$<
mv obj/$@ $@