diff options
Diffstat (limited to 'docs/reference/gobject/Makefile.am')
-rw-r--r-- | docs/reference/gobject/Makefile.am | 97 |
1 files changed, 40 insertions, 57 deletions
diff --git a/docs/reference/gobject/Makefile.am b/docs/reference/gobject/Makefile.am index 82772f7a0..e515bf7fc 100644 --- a/docs/reference/gobject/Makefile.am +++ b/docs/reference/gobject/Makefile.am @@ -2,47 +2,36 @@ # The name of the module. DOC_MODULE=gobject - # The top-level SGML file. DOC_MAIN_SGML_FILE=gobject-docs.sgml - +# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) +EXTRA_DIST += # The directory containing the source code. Relative to $(srcdir) DOC_SOURCE_DIR=../../../gobject - # Extra options to supply to gtkdoc-scan SCAN_OPTIONS= - # Extra options to supply to gtkdoc-mkdb MKDB_OPTIONS= - # Extra options to supply to gtkdoc-fixref FIXXREF_OPTIONS=--extra-dir=$(srcdir)/../glib/html +# Images to copy into HTML directory +HTML_IMAGES = # Used for dependencies HFILE_GLOB=$(top_srcdir)/gobject/*.h CFILE_GLOB=$(top_srcdir)/gobject/*.c - # Headers to ignore IGNORE_HFILES= \ + .saved \ + glib-genmarshal.c \ gbsearcharray.h - # Extra files to add when scanning EXTRA_HFILES= -# Images to copy into HTML directory -HTML_IMAGES = - -# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) -content_files = - -# Other files to distribute -extra_files = - # CFLAGS and LDFLAGS for compiling scan program. Only needed # if $(DOC_MODULE).types is non-empty. GTKDOC_CFLAGS = GTKDOC_LIBS = - # Commands for compiling and linking GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC) GTKDOC_LD=$(LIBTOOL) --mode=link $(CC) @@ -54,29 +43,29 @@ GTKDOC_LD=$(LIBTOOL) --mode=link $(CC) TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) -EXTRA_DIST = \ - $(content_files) \ - $(extra_files) \ - $(HTML_IMAGES) \ - $(DOC_MAIN_SGML_FILE) \ - $(DOC_MODULE).types \ - $(DOC_MODULE)-sections.txt \ - $(DOC_MODULE)-overrides.txt +DOC_STAMPS = $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \ + build-scan.stamp build-tmpl.stamp build-sgml.stamp build-html.stamp +# gtkdoc-mktmpl: creates, and on changes touches: tmpl.stamp +# gtkdoc-mkdb: creates, and on changes touches: sgml.stamp +# gtkdoc-mkhtml: creates, and on changes touches: html.stamp -DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp -if ENABLE_GTK_DOC -all-local: html-build.stamp +.PHONY: gtkdoc-build-all +if ENABLE_GTK_DOC SCANOBJ_FILES = \ $(DOC_MODULE).args \ $(DOC_MODULE).hierarchy \ $(DOC_MODULE).signal -scan-build.stamp: $(HFILE_GLOB) +all-local: gtkdoc-build-all + +gtkdoc-build-all: build-sgml.stamp build-html.stamp + @true +build-scan.stamp: $(HFILE_GLOB) @echo '*** Scanning header files ***' cd $(srcdir) && ( \ - if grep -l '^.+$$' $(DOC_MODULE).types > /dev/null ; then \ + if grep -l '^.+$$' $(DOC_MODULE).types > /dev/null 2>/dev/null ; then \ CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) ; \ else \ for i in $(SCANOBJ_FILES) ; do \ @@ -85,46 +74,32 @@ scan-build.stamp: $(HFILE_GLOB) fi ) cd $(srcdir) && \ gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) - touch scan-build.stamp - -check_scan: - $(MAKE) scan-build.stamp - -$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): check_scan - -tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + touch build-scan.stamp +build-tmpl.stamp: build-scan.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(srcdir)/tmpl/*.sgml @echo '*** Rebuilding template files ***' cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) - touch tmpl-build.stamp - -check_templates: - $(MAKE) tmpl-build.stamp - -tmpl.stamp: check_templates - -sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) + touch build-tmpl.stamp +tmpl.stamp: build-tmpl.stamp + @true +build-sgml.stamp: tmpl.stamp $(CFILE_GLOB) @echo '*** Building SGML ***' cd $(srcdir) && \ gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS) - touch sgml-build.stamp - -check_sgml: - $(MAKE) sgml-build.stamp - -sgml.stamp: check_sgml - -html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) + touch build-sgml.stamp +sgml.stamp: build-sgml.stamp + @true +build-html.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) @echo '*** Building HTML ***' test -d $(srcdir)/html || mkdir $(srcdir)/html cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) @echo '-- Fixing Crossreferences' cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - touch html-build.stamp + touch build-html.stamp endif clean-local: - rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS) $(srcdir)/sgml.stamp + rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS) maintainer-clean-local: clean cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt @@ -167,4 +142,12 @@ dist-hook: dist-check-gtkdoc dist-hook-local cp $(srcdir)/$$i $(distdir)/html ; \ done -.PHONY : check_sgml check_templates check_scan dist-hook-local +.PHONY: dist-hook-local + + +EXTRA_DIST = \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE).types \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt |