Updated Greek translation
[gtk-doc.git] / tests / gtk-doc.notmpl.make
blobf9a834396dc4d8809cd7a6fbc2d4c954675cc437
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) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9 GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(GTKDOC_DEPS_LIBS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
10 GTKDOC_RUN = $(LIBTOOL) --mode=execute
11 else
12 GTKDOC_CC = $(CC) $(INCLUDES) $(GTKDOC_DEPS_CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13 GTKDOC_LD = $(CC) $(GTKDOC_DEPS_LIBS) $(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 # we don't install anything in tests
25 #TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
27 SETUP_FILES = \
28 $(content_files) \
29 $(DOC_MAIN_SGML_FILE) \
30 $(DOC_MODULE)-sections.txt \
31 $(DOC_MODULE)-overrides.txt
33 EXTRA_DIST = \
34 $(HTML_IMAGES) \
35 $(SETUP_FILES)
37 DOC_STAMPS=setup-build.stamp scan-build.stamp sgml-build.stamp \
38 html-build.stamp pdf-build.stamp \
39 sgml.stamp html.stamp pdf.stamp
41 SCANOBJ_FILES = \
42 $(DOC_MODULE).args \
43 $(DOC_MODULE).hierarchy \
44 $(DOC_MODULE).interfaces \
45 $(DOC_MODULE).prerequisites \
46 $(DOC_MODULE).signals
48 REPORT_FILES = \
49 $(DOC_MODULE)-undocumented.txt \
50 $(DOC_MODULE)-undeclared.txt \
51 $(DOC_MODULE)-unused.txt
53 CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
55 check-local: html-build.stamp pdf-build.stamp
56 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
57 echo " DOC `$(DATE_FMT_CMD)$$tsd`: All done"
59 docs: html-build.stamp pdf-build.stamp
60 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
61 echo " DOC `$(DATE_FMT_CMD)$$tsd`: All done"
63 $(REPORT_FILES): sgml-build.stamp
65 ts:
66 @echo >ts `date $(TS_FMT)`;
68 #### setup ####
70 setup-build.stamp: ts
71 -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
72 echo ' DOC Preparing build'; \
73 files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \
74 if test "x$$files" != "x" ; then \
75 for file in $$files ; do \
76 test -f $(abs_srcdir)/$$file && \
77 cp -pf $(abs_srcdir)/$$file $(abs_builddir)/ || true; \
78 done; \
79 fi; \
81 @touch setup-build.stamp
83 #### scan ####
85 scan-build.stamp: ts setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB)
86 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
87 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Scanning header files"
88 @_source_dir='' ; \
89 for i in $(DOC_SOURCE_DIR) ; do \
90 _source_dir="$${_source_dir} --source-dir=$$i" ; \
91 done ; \
92 echo "gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)" >gtkdoc-scan.log; \
93 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
94 gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) 2>&1 | tee -a gtkdoc-scan.log
95 @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \
96 ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
97 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Introspecting gobjects"; \
98 scanobj_options=""; \
99 if test "x$(V)" = "x1"; then \
100 scanobj_options="--verbose"; \
101 fi; \
102 echo "gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) $$scanobj_options" >gtkdoc-scangobj.log; \
103 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
104 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" \
105 gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) $$scanobj_options 2>&1 | tee -a gtkdoc-scangobj.log; \
106 else \
107 for i in $(SCANOBJ_FILES) ; do \
108 test -f $$i || touch $$i ; \
109 done \
111 @touch scan-build.stamp
113 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
114 @true
116 #### xml ####
118 sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
119 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
120 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Building XML"
121 @_source_dir='' ; \
122 for i in $(DOC_SOURCE_DIR) ; do \
123 _source_dir="$${_source_dir} --source-dir=$$i" ; \
124 done ; \
125 echo "gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)" >gtkdoc-mkdb.log; \
126 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
127 gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) 2>&1 | tee -a gtkdoc-mkdb.log
128 @touch sgml-build.stamp
130 sgml.stamp: sgml-build.stamp
131 @true
133 #### html ####
135 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
136 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
137 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Building HTML"
138 @rm -rf html
139 @mkdir html
140 @mkhtml_options=""; \
141 if test "x$(V)" = "x1"; then \
142 mkhtml_options="$$mkhtml_options --verbose"; \
143 fi; \
144 echo "gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir)" $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)" >gtkdoc-mkhtml.log; \
145 cd html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
146 gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir)" $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) 2>&1 | tee -a ../gtkdoc-mkhtml.log
147 -@test "x$(HTML_IMAGES)" = "x" || \
148 for file in $(HTML_IMAGES) ; do \
149 if test -f $(abs_srcdir)/$$file ; then \
150 cp $(abs_srcdir)/$$file $(abs_builddir)/html; \
151 fi; \
152 if test -f $(abs_builddir)/$$file ; then \
153 cp $(abs_builddir)/$$file $(abs_builddir)/html; \
154 fi; \
155 done;
156 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
157 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Fixing cross-references"
158 @echo "gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)" >gtkdoc-fixxref.log; \
159 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
160 gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) 2>&1 | tee -a gtkdoc-fixxref.log
161 @touch html-build.stamp
163 #### pdf ####
165 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
166 @ts1=`cat ts`;ts2=`date $(TS_FMT)`;tsd=`echo $$ts2-$$ts1 | bc`; \
167 echo " DOC `$(DATE_FMT_CMD)$$tsd`: Building PDF"
168 @rm -f $(DOC_MODULE).pdf
169 @mkpdf_options=""; \
170 if test "x$(V)" = "x1"; then \
171 mkpdf_options="$$mkpdf_options --verbose"; \
172 fi; \
173 if test "x$(HTML_IMAGES)" != "x"; then \
174 for img in $(HTML_IMAGES); do \
175 part=`dirname $$img`; \
176 echo $$mkpdf_options | grep >/dev/null "\-\-imgdir=$$part "; \
177 if test $$? != 0; then \
178 mkpdf_options="$$mkpdf_options --imgdir=$$part"; \
179 fi; \
180 done; \
181 fi; \
182 echo "gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)" >gtkdoc-mkpdf.log; \
183 PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) ABS_TOP_SRCDIR=$(abs_top_srcdir) \
184 gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) 2>&1 | tee -a gtkdoc-mkpdf.log
185 @touch pdf-build.stamp
187 ##############
189 # we need to enforce a rebuild for the tests
190 clean-local:
191 @rm -f *~ *.bak ts gtkdoc-*.log
192 @rm -rf .libs
193 @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \
194 rm -f $(DOC_MODULE).types; \
196 $(MAKE) distclean-local
198 distclean-local:
199 @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \
200 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
201 @if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
202 rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \
205 maintainer-clean-local:
206 @rm -rf xml html
208 .PHONY : dist-hook-local docs