xsl: fixing a regression that was breaking the ONLINE tags in index.sgml
[gtk-doc.git] / tests / gtk-doc.notmpl.make
blob5d140532b8d7e6afa67987fee7fdf5fd79930b14
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 # we don't install anything in tests
25 #TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
27 EXTRA_DIST = \
28 $(content_files) \
29 $(HTML_IMAGES) \
30 $(DOC_MAIN_SGML_FILE) \
31 $(DOC_MODULE)-sections.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 check-local: html-build.stamp pdf-build.stamp
52 @echo "gtk-doc: `date +%H:%M:%S.%N`: All done"
54 docs: html-build.stamp pdf-build.stamp
55 @echo "gtk-doc: `date +%H:%M:%S.%N`: All done"
57 $(REPORT_FILES): sgml-build.stamp
59 #### scan ####
61 scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
62 @echo "gtk-doc: `date +%H:%M:%S.%N`: Scanning header files"
63 @-chmod -R u+w $(srcdir)
64 @cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
65 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES)
66 @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
67 echo "gtk-doc: `date +%H:%M:%S.%N`: Introspecting gobjects"; \
68 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) $(SCANGOBJ_OPTIONS); \
69 else \
70 cd $(srcdir) ; \
71 for i in $(SCANOBJ_FILES) ; do \
72 test -f $$i || touch $$i ; \
73 done \
75 @touch scan-build.stamp
77 $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
78 @true
80 #### xml ####
82 sgml-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files)
83 @echo "gtk-doc: `date +%H:%M:%S.%N`: Building XML"
84 @-chmod -R u+w $(srcdir)
85 @cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
86 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)
87 @touch sgml-build.stamp
89 sgml.stamp: sgml-build.stamp
90 @true
92 #### html ####
94 html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
95 @echo "gtk-doc: `date +%H:%M:%S.%N`: Building HTML"
96 @-chmod -R u+w $(srcdir)
97 @rm -rf $(srcdir)/html
98 @mkdir $(srcdir)/html
99 @cd $(srcdir)/html && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
100 gtkdoc-mkhtml --uninstalled --path="$(abs_srcdir)" $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) $(MKHTML_OPTIONS)
101 @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
102 @echo "gtk-doc: `date +%H:%M:%S.%N`: Fixing cross-references"
103 @cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
104 gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
105 @touch html-build.stamp
107 #### pdf ####
109 pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
110 @echo "gtk-doc: `date +%H:%M:%S.%N`: Building PDF"
111 @-chmod -R u+w $(srcdir)
112 @rm -rf $(srcdir)/$(DOC_MODULE).pdf
113 @mkpdf_imgdirs=""; \
114 if test "x$(HTML_IMAGES)" != "x"; then \
115 for img in $(HTML_IMAGES); do \
116 part=`dirname $$img`; \
117 echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \
118 if test $$? != 0; then \
119 mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \
120 fi; \
121 done; \
122 fi; \
123 cd $(srcdir) && PATH=$(abs_top_builddir):$(PATH) PERL5LIB=$(abs_top_builddir):$(PERL5LIB) \
124 gtkdoc-mkpdf --uninstalled --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
125 @touch pdf-build.stamp
127 ##############
129 # we need to enforce a rebuild for the tests
130 clean-local:
131 @rm -f *~ *.bak
132 @rm -rf .libs
133 @chmod -R u+w $(srcdir)
134 $(MAKE) distclean-local
136 distclean-local:
137 @cd $(srcdir) && \
138 rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
139 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
141 maintainer-clean-local: clean
142 @cd $(srcdir) && rm -rf html
144 .PHONY : dist-hook-local docs