File: Makefile

package info (click to toggle)
pdfedit 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 15,032 kB
  • ctags: 21,708
  • sloc: cpp: 185,471; xml: 8,824; yacc: 1,178; ansic: 666; perl: 664; makefile: 636; sh: 371; lisp: 51
file content (80 lines) | stat: -rw-r--r-- 2,808 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Makefile for documentation

# root of doc/ directory
TOP_DIR=..

TOOL_DIR=$(TOP_DIR)/tools

# html docs get built here as PDF, XHTML and also in "online help" as HTML
# html_docs=scripts/scripting.html pdfedit.html
html_docs= keyboard.html cs/keyboard.html qsa-util.html qsa-inputdialog.html scripting.html

# html docs that won't get into online help
html_docs_all=user_doc.html appendix.html

# directory in which to place generated html help files
html_help_dir=../../src/gui/help

# PDF documents to generate
pdf_docs_all=$(html_docs_all:.html=.pdf)

# generated documentation
html_help_docs=$(addprefix $(html_help_dir)/,$(html_docs)) $(html_help_dir)/pdfedit.html
docs_no_pdf=$(html_docs_all)
docs=$(docs_no_pdf) $(pdf_docs_all)
help_docs=$(html_help_docs)

all: $(all_no_pdf) 

all_no_pdf: $(docs_no_pdf)

# Generates online help
online_help: $(help_docs)

clean:
	rm -f $(docs) scripts/scripting.xml keyboard.xml cs/keyboard.xml pdfedit.xml qsa-inputdialog.xml qsa-util.xml scripts/qsa-util.xml scripts/qsa-inputdialog.xml appendix.xml

# generate by parsing header files and adding scripting API documentation
scripts/scripting.xml: scripts/scripting-src.xml $(TOOL_DIR)/scripting.gen.pl
	$(TOOL_DIR)/scripting.gen.pl $< >$@

scripting.xml: scripts/scripting.xml version.xml

appendix.xml: appendix-src.xml version.xml $(TOOL_DIR)/scripting.gen.pl
	$(TOOL_DIR)/scripting.gen.pl $< >$@

# dependencies

install_deps=install/compiling.xml \
install/install.xml \
install/platforms.xml \
install/requiredlib.xml

scripting_deps=scripts/scripting_nodoc.xml \
scripts/qsa-util.xml scripts/qsa-inputdialog.xml version.xml

user_doc.html: $(scripting_deps) $(install_deps) qsa-inputdialog.xml qsa-util.xml version.xml

# generate from template by adding table of keyboard shortcuts parsed from pdfeditrc
keyboard.xml: $(TOOL_DIR)/kbd_gen.pl ../../src/gui/pdfeditrc keyboard-src.xml
	$(TOOL_DIR)/kbd_gen.pl <../../src/gui/pdfeditrc keyboard-src.xml >keyboard.xml

cs/keyboard.xml: $(TOOL_DIR)/kbd_gen.pl ../../src/gui/pdfeditrc cs/keyboard-src.xml
	$(TOOL_DIR)/kbd_gen.pl <../../src/gui/pdfeditrc cs/keyboard-src.xml ../../src/gui/lang/pdfedit_cs.ts >cs/keyboard.xml

pdfedit.xml: cmdline/pdfedit.head cmdline/description.xml cmdline/localization.xml cmdline/pdfedit.tail
	cat $+ >$@

# special rules rule for generating docbook XML from .leaf files (some tex-like Trolltech format)
scripts/qsa-inputdialog.xml: qsa-inputdialog.leaf $(TOP_DIR)/tools/leaf2xml.pl
	$(TOP_DIR)/tools/leaf2xml.pl <$< >$@ no

scripts/qsa-util.xml: qsa-util.leaf $(TOP_DIR)/tools/leaf2xml.pl
	$(TOP_DIR)/tools/leaf2xml.pl <$< >$@ no

# refresh version number
version.xml: ../../src/gui/version.h
	cd ../.. && ./getversion >doc/user/$@

# include rules to generate various documentation formats
include $(TOP_DIR)/Makefile.rules