Don't truncate annotated param descriptions at newline. Fixes #613611
[gtk-doc.git] / gtk-doc.notmpl.make
blob2baab5c56cd1502b2dc946e9a39ea4a9f2ba226c
1 # -*- mode: makefile -*-
3 ####################################
4 # Everything below here is generic #
5 ####################################
7 if GTK_DOC_USE_LIBTOOL
8 GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9 GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
10 GTKDOC_RUN = $(LIBTOOL) --mode=execute
11 else
12 GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13 GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
14 GTKDOC_RUN =
15 endif
17 # We set GPATH here; this gives us semantics for GNU make
18 # which are more like other make's VPATH, when it comes to
19 # whether a source that is a target of one rule is then
20 # searched for in VPATH/GPATH.
22 GPATH = $(srcdir)
24 TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
26 EXTRA_DIST = \
27 $(content_files) \
28 $(HTML_IMAGES) \
29 $(DOC_MAIN_SGML_FILE) \
30 $(DOC_MODULE)-sections.txt \
31 $(DOC_MODULE)-overrides.txt
33 DOC_STAMPS=scan-build.stamp sgml-build.stamp html-build.stamp pdf-build.stamp \
34 $(srcdir)/sgml.stamp $(srcdir)/html.stamp \
35 $(srcdir)/pdf.stamp
37 SCANOBJ_FILES = \
38 $(DOC_MODULE).args \
39 $(DOC_MODULE).hierarchy \
40 $(DOC_MODULE).interfaces \
41 $(DOC_MODULE).prerequisites \
42 $(DOC_MODULE).signals
44 REPORT_FILES = \
45 $(DOC_MODULE)-undocumented.txt \
46 $(DOC_MODULE)-undeclared.txt \
47 $(DOC_MODULE)-unused.txt
49 CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
51 if ENABLE_GTK_DOC
52 if GTK_DOC_BUILD_HTML
53 HTML_BUILD_STAMP=html-build.stamp
54 else
55 HTML_BUILD_STAMP=
56 endif
57 if GTK_DOC_BUILD_PDF
58 PDF_BUILD_STAMP=pdf-build.stamp
59 else
60 PDF_BUILD_STAMP=
61 endif
63 all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
64 else
65 all-local:
66 endif
68 docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
70 $(REPORT_FILES): sgml-build.stamp
72 #### scan ####
74 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
75 @echo 'gtk-doc: Scanning header files'
76 @-chmod -R u+w $(srcdir)
77 @cd $(srcdir) && \
78 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
79 @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
80 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
81 else \
82 cd $(srcdir) ; \
83 for i in $(SCANOBJ_FILES) ; do \
84 test -f $$i || touch $$i ; \
85 done \
87 @touch scan-build.stamp
89 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
90 @true
92 #### xml ####
94 sgml-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
95 @echo 'gtk-doc: Building XML'
96 @-chmod -R u+w $(srcdir)
97 @cd $(srcdir) && \
98 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS)
99 @touch sgml-build.stamp
101 sgml.stamp: sgml-build.stamp
102 @true
104 #### html ####
106 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
107 @echo 'gtk-doc: Building HTML'
108 @-chmod -R u+w $(srcdir)
109 @rm -rf $(srcdir)/html
110 @mkdir $(srcdir)/html
111 @mkhtml_options=""; \
112 gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
113 if test "$(?)" = "0"; then \
114 mkhtml_options=--path="$(srcdir)"; \
115 fi; \
116 cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
117 @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
118 @echo 'gtk-doc: Fixing cross-references'
119 @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
120 @touch html-build.stamp
122 #### pdf ####
124 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
125 @echo 'gtk-doc: Building PDF'
126 @-chmod -R u+w $(srcdir)
127 @rm -rf $(srcdir)/$(DOC_MODULE).pdf
128 @mkpdf_imgdirs=""; \
129 if test "x$(HTML_IMAGES)" != "x"; then \
130 for img in $(HTML_IMAGES); do \
131 part=`dirname $$img`; \
132 echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \
133 if test $$? != 0; then \
134 mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \
135 fi; \
136 done; \
137 fi; \
138 cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
139 @touch pdf-build.stamp
141 ##############
143 clean-local:
144 rm -f *~ *.bak
145 rm -rf .libs
147 distclean-local:
148 cd $(srcdir) && \
149 rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
150 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
152 maintainer-clean-local: clean
153 cd $(srcdir) && rm -rf html
155 install-data-local:
156 @installfiles=`echo $(srcdir)/html/*`; \
157 if test "$$installfiles" = '$(srcdir)/html/*'; \
158 then echo '-- Nothing to install' ; \
159 else \
160 if test -n "$(DOC_MODULE_VERSION)"; then \
161 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
162 else \
163 installdir="$(DESTDIR)$(TARGET_DIR)"; \
164 fi; \
165 $(mkinstalldirs) $${installdir} ; \
166 for i in $$installfiles; do \
167 echo '-- Installing '$$i ; \
168 $(INSTALL_DATA) $$i $${installdir}; \
169 done; \
170 if test -n "$(DOC_MODULE_VERSION)"; then \
171 mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
172 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
173 mv -f $${installdir}/$(DOC_MODULE).devhelp \
174 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
175 fi; \
176 $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
179 uninstall-local:
180 @if test -n "$(DOC_MODULE_VERSION)"; then \
181 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
182 else \
183 installdir="$(DESTDIR)$(TARGET_DIR)"; \
184 fi; \
185 rm -rf $${installdir}
188 # Require gtk-doc when making dist
190 if ENABLE_GTK_DOC
191 dist-check-gtkdoc:
192 else
193 dist-check-gtkdoc:
194 @echo "*** gtk-doc must be installed and enabled in order to make dist"
195 @false
196 endif
198 dist-hook: dist-check-gtkdoc dist-hook-local
199 mkdir $(distdir)/html
200 cp $(srcdir)/html/* $(distdir)/html
201 -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/
202 -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
203 -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
204 cd $(distdir) && rm -f $(DISTCLEANFILES)
205 $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
207 .PHONY : dist-hook-local docs