Makefile.am revision a5c41a993fef4b133a798d6e4dba1829fb735936
1## Process this file with automake to produce Makefile.in 2 3# The name of the module. 4DOC_MODULE=glib 5 6# The top-level SGML file. 7DOC_MAIN_SGML_FILE=glib-docs.sgml 8 9# The directory containing the source code. Relative to $(srcdir) 10DOC_SOURCE_DIR=../../.. 11 12# Extra options to supply to gtkdoc-scan 13SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" 14 15# Extra options to supply to gtkdoc-mkdb 16MKDB_OPTIONS= 17 18# Extra options to supply to gtkdoc-fixref 19FIXXREF_OPTIONS= 20 21# Used for dependencies 22HFILE_GLOB=$(top_srcdir)/glib/*.h $(top_srcdir)/gmodule/*.h 23CFILE_GLOB=$(top_srcdir)/glib/*.c $(top_srcdir)/gmodule/*.c 24 25# Headers to ignore 26IGNORE_HFILES= \ 27 gobject \ 28 config.h \ 29 glibintl.h \ 30 gbsearcharray.h \ 31 gmoduleconf.h \ 32 gunibreak.h \ 33 gunicomp.h \ 34 gunidecomp.h \ 35 gunichartables.h \ 36 glibconfig-sysdefs.h 37 38# Extra files to add when scanning 39EXTRA_HFILES= 40 41# Images to copy into HTML directory 42HTML_IMAGES = \ 43 mainloop-states.gif 44 45# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) 46content_files = 47 48# Other files to distribute 49extra_files = \ 50 mainloop-states.fig \ 51 mainloop-states.png \ 52 mainloop-states.eps 53 54# CFLAGS and LDFLAGS for compiling scan program. Only needed 55# if $(DOC_MODULE).types is non-empty. 56GTKDOC_CFLAGS = 57GTKDOC_LIBS = 58 59# Commands for compiling and linking 60GTKDOC_CC=$(LIBTOOL) --mode=compile $(CC) 61GTKDOC_LD=$(LIBTOOL) --mode=link $(CC) 62 63 64#################################### 65# Everything below here is generic # 66#################################### 67 68# We set GPATH here; this gives us semantics for GNU make 69# which are more like other make's VPATH, when it comes to 70# whether a source that is a target of one rule is then 71# searched for in VPATH/GPATH. 72# 73GPATH = $(srcdir) 74 75TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) 76 77EXTRA_DIST = \ 78 $(content_files) \ 79 $(extra_files) \ 80 $(HTML_IMAGES) \ 81 $(DOC_MAIN_SGML_FILE) \ 82 $(DOC_MODULE).types \ 83 $(DOC_MODULE)-sections.txt \ 84 $(DOC_MODULE)-overrides.txt 85 86DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ 87 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp 88 89SCANOBJ_FILES = \ 90 $(DOC_MODULE).args \ 91 $(DOC_MODULE).hierarchy \ 92 $(DOC_MODULE).signals 93 94if ENABLE_GTK_DOC 95all-local: html-build.stamp 96 97#### scan #### 98 99scan-build.stamp: $(HFILE_GLOB) 100 @echo '*** Scanning header files ***' 101 if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \ 102 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ 103 else \ 104 cd $(srcdir) ; \ 105 for i in $(SCANOBJ_FILES) ; do \ 106 test -f $$i || touch $$i ; \ 107 done \ 108 fi 109 cd $(srcdir) && \ 110 gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) 111 touch scan-build.stamp 112 113$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp 114 @true 115 116#### templates #### 117 118tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt 119 @echo '*** Rebuilding template files ***' 120 cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) 121 touch tmpl-build.stamp 122 123tmpl.stamp: tmpl-build.stamp 124 @true 125 126#### sgml #### 127 128sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml 129 @echo '*** Building SGML ***' 130 cd $(srcdir) && \ 131 gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS) 132 touch sgml-build.stamp 133 134sgml.stamp: sgml-build.stamp 135 @true 136 137#### html #### 138 139html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) 140 @echo '*** Building HTML ***' 141 test -d $(srcdir)/html || mkdir $(srcdir)/html 142 cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) 143 test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) 144 @echo '-- Fixing Crossreferences' 145 cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) 146 touch html-build.stamp 147endif 148 149############## 150 151clean-local: 152 rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS) 153 154maintainer-clean-local: clean 155 cd $(srcdir) && rm -rf sgml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt 156 157install-data-local: 158 $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR) 159 (installfiles=`echo $(srcdir)/html/*.html`; \ 160 if test "$$installfiles" = '$(srcdir)/html/*.html'; \ 161 then echo '-- Nothing to install' ; \ 162 else \ 163 for i in $$installfiles; do \ 164 echo '-- Installing '$$i ; \ 165 $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ 166 done; \ 167 echo '-- Installing $(srcdir)/html/index.sgml' ; \ 168 $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \ 169 fi) 170 171# 172# Require gtk-doc when making dist 173# 174if ENABLE_GTK_DOC 175dist-check-gtkdoc: 176else 177dist-check-gtkdoc: 178 @echo "*** gtk-doc must be installed and enabled in order to make dist" 179 @false 180endif 181 182dist-hook: dist-check-gtkdoc dist-hook-local 183 mkdir $(distdir)/tmpl 184 mkdir $(distdir)/sgml 185 mkdir $(distdir)/html 186 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl 187 -cp $(srcdir)/sgml/*.sgml $(distdir)/sgml 188 cp $(srcdir)/html/index.sgml $(distdir)/html 189 -cp $(srcdir)/html/*.html $(srcdir)/html/*.css $(distdir)/html 190 191 images=$(HTML_IMAGES) ; \ 192 for i in $$images ; do \ 193 cp $(srcdir)/$$i $(distdir)/html ; \ 194 done 195 196.PHONY : dist-hook-local 197