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