File: Docs.make

package info (click to toggle)
grass 8.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 277,040 kB
  • sloc: ansic: 460,798; python: 227,732; cpp: 42,026; sh: 11,262; makefile: 7,007; xml: 3,637; sql: 968; lex: 520; javascript: 484; yacc: 450; asm: 387; perl: 157; sed: 25; objc: 6; ruby: 4
file content (99 lines) | stat: -rw-r--r-- 2,585 bytes parent folder | download | duplicates (3)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

# This should be "include"d from the top-level Makefile, and nowhere else

# Extra commands
HTML2PDF=		htmldoc --footer d.1
GRASS_PDFDIR=		$(DOCSDIR)/pdf

# generate programmer's manual as single HTML document:

htmldocs-single:
	$(MAKE) -C . htmldox-single
	for dir in lib ; do \
	  $(MAKE) -C $$dir htmldox-single ; \
	done

# generate programmer's manual as multiple HTML documents:
docs_dirs = \
	lib/db \
	lib/raster3d \
	lib/gis \
	lib/gmath \
	lib/gpde \
	lib/proj \
	lib/ogsf \
	lib/segment \
	lib/vector \
	lib/vector/dglib

htmldocs_dirs := $(patsubst %,%/html,$(docs_dirs))
latexdocs_dirs := $(patsubst %,%/latex,$(docs_dirs))

htmldocs:
	$(MAKE) -C . htmldox
	for dir in $(docs_dirs) ; do \
	  $(MAKE) -C $$dir htmldox ; \
	  done

packagehtmldocs: htmldocs
	tar chvfz $(GRASS_NAME)refman_$(DATE)_html.tar.gz $(htmldocs_dirs)

#alternatively, the docs can be generated as single PDF document (see doxygen FAQ for 'TeX capacity exceeded'):
#  (cd lib/ ; make pdfdox)

pdfdocs:
	for dir in $(docs_dirs) ; do \
	  $(MAKE) -C $$dir pdfdox ; \
	  done
	@echo "Written PDF docs in: $(latexdocs_dirs)"

cleandocs:
	$(MAKE) -C . cleandox
	for dir in $(docs_dirs) ; do \
	  $(MAKE) -C $$dir cleandox ; \
	  done

indices = \
	database.html \
	display.html \
	general.html \
	imagery.html \
	miscellaneous.html \
	photo.html \
	postscript.html \
	raster.html \
	raster3d.html \
	vector.html

html_pdf = \
	cd $(ARCH_DISTDIR)/docs/html && \
	$(HTML2PDF) --webpage $(1).html $(2).*.html -f $(GRASS_PDFDIR)/$(GRASS_NAME)$(1).pdf

html2pdfdoc:
	@ echo "Light PDF document from modules' HTML documentation"
	@ # http://www.htmldoc.org
	@test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
	$(call html_pdf commands,--no-links $(indices))

html2pdfdoccomplete:
	@ echo "Complete PDF document from modules' HTML documentation"
	@ # http://www.htmldoc.org
	@test -d $(GRASS_PDFDIR) || mkdir -p $(GRASS_PDFDIR)
	$(call html_pdf database,db.*.html)
	$(call html_pdf display,d.*.html)
	$(call html_pdf general,g.*.html)
	$(call html_pdf imagery,i.*.html)
	$(call html_pdf miscellaneous,m.*.html)
	$(call html_pdf photo,i.ortho*.html photo*.html)
	$(call html_pdf postscript,ps.*.html)
	$(call html_pdf raster,r.*.html)
	$(call html_pdf raster3d,r3.*.html)
	$(call html_pdf vector,v.*.html)

changelog:
	@ echo "creating ChangeLog file (following the 'main' branch only)..."
	@ # utils/gitlog2changelog.py creates a GNU style ChangeLog file:
	python utils/gitlog2changelog.py

.PHONY: htmldocs-single htmldocs packagehtmldocs pdfdocs cleandocs html2pdfdoc
.PHONY: html2pdfdoccomplete changelog