2001-05-26 04:44:40 +08:00
|
|
|
## Process this file with automake to produce Makefile.in
|
|
|
|
|
|
|
|
# The name of the module.
|
2002-03-08 20:36:40 +08:00
|
|
|
DOC_MODULE = libgimpbase
|
2001-05-26 04:44:40 +08:00
|
|
|
|
|
|
|
# The top-level SGML file.
|
2002-03-08 20:36:40 +08:00
|
|
|
DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.sgml
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
# The directory containing the source code.
|
|
|
|
DOC_SOURCE_DIR = $(top_srcdir)/$(DOC_MODULE)
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
# Extra options to pass to gtkdoc-scangobj
|
|
|
|
SCANGOBJ_OPTIONS =
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
# Extra options to supply to gtkdoc-scan
|
|
|
|
SCAN_OPTIONS =
|
|
|
|
|
|
|
|
# Extra options to supply to gtkdoc-mkdb
|
2003-02-07 02:38:54 +08:00
|
|
|
MKDB_OPTIONS = --sgml-mode --output-format=xml
|
2002-03-08 20:36:40 +08:00
|
|
|
|
|
|
|
# Extra options to supply to gtkdoc-fixref
|
|
|
|
FIXXREF_OPTIONS =
|
|
|
|
|
|
|
|
# Used for dependencies
|
|
|
|
HFILE_GLOB = $(DOC_SOURCE_DIR)/*.h
|
|
|
|
CFILE_GLOB = $(DOC_SOURCE_DIR)/*.c
|
|
|
|
|
|
|
|
# Header files to ignore when scanning
|
2003-07-29 03:49:19 +08:00
|
|
|
IGNORE_HFILES = \
|
2003-11-16 07:09:17 +08:00
|
|
|
gimpbase.h \
|
|
|
|
gimpbase-private.h \
|
2003-07-29 03:49:19 +08:00
|
|
|
gimpwin32-io.h
|
2002-03-08 20:36:40 +08:00
|
|
|
|
|
|
|
# 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 =
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC)
|
|
|
|
GTKDOC_LD = $(LIBTOOL) --mode=link $(CC)
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
|
|
|
|
####################################
|
|
|
|
# Everything below here is generic #
|
|
|
|
####################################
|
|
|
|
|
|
|
|
# We set GPATH here; this gives us semantics for GNU make
|
|
|
|
# which are more like other make's VPATH, when it comes to
|
|
|
|
# whether a source that is a target of one rule is then
|
|
|
|
# searched for in VPATH/GPATH.
|
|
|
|
#
|
|
|
|
GPATH = $(srcdir)
|
|
|
|
|
|
|
|
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
|
|
|
|
|
|
|
|
EXTRA_DIST = \
|
|
|
|
$(content_files) \
|
|
|
|
$(extra_files) \
|
|
|
|
$(HTML_IMAGES) \
|
|
|
|
$(DOC_MAIN_SGML_FILE) \
|
2001-05-26 04:44:40 +08:00
|
|
|
$(DOC_MODULE).types \
|
|
|
|
$(DOC_MODULE)-sections.txt
|
|
|
|
|
2003-02-07 02:38:54 +08:00
|
|
|
DOC_STAMPS=scan-build.stamp tmpl-build.stamp xml-build.stamp html-build.stamp \
|
2002-03-08 20:36:40 +08:00
|
|
|
$(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp
|
|
|
|
|
|
|
|
SCANOBJ_FILES = \
|
|
|
|
$(DOC_MODULE).args \
|
|
|
|
$(DOC_MODULE).hierarchy \
|
|
|
|
$(DOC_MODULE).signals
|
|
|
|
|
2001-05-26 04:44:40 +08:00
|
|
|
if ENABLE_GTK_DOC
|
2002-03-08 20:36:40 +08:00
|
|
|
all-local: html-build.stamp
|
|
|
|
|
|
|
|
#### scan ####
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
scan-build.stamp: $(HFILE_GLOB)
|
|
|
|
@echo '*** Scanning header files ***'
|
|
|
|
if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null ; then \
|
|
|
|
CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
|
|
|
|
else \
|
|
|
|
cd $(srcdir) ; \
|
|
|
|
for i in $(SCANOBJ_FILES) ; do \
|
|
|
|
test -f $$i || touch $$i ; \
|
|
|
|
done \
|
|
|
|
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
|
|
|
|
|
|
|
|
$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES): scan-build.stamp
|
|
|
|
@true
|
|
|
|
|
|
|
|
#### templates ####
|
|
|
|
|
|
|
|
tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt
|
|
|
|
@echo '*** Rebuilding template files ***'
|
2001-05-26 04:44:40 +08:00
|
|
|
cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE)
|
2002-03-08 20:36:40 +08:00
|
|
|
touch tmpl-build.stamp
|
|
|
|
|
|
|
|
tmpl.stamp: tmpl-build.stamp
|
|
|
|
@true
|
|
|
|
|
2003-02-07 02:38:54 +08:00
|
|
|
#### xml ####
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2003-02-07 02:38:54 +08:00
|
|
|
xml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(srcdir)/tmpl/*.sgml
|
|
|
|
@echo '*** Building XML ***'
|
2002-03-08 20:36:40 +08:00
|
|
|
cd $(srcdir) && \
|
|
|
|
gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) $(MKDB_OPTIONS)
|
2003-02-07 02:38:54 +08:00
|
|
|
touch xml-build.stamp
|
2002-03-08 20:36:40 +08:00
|
|
|
|
2003-02-07 02:38:54 +08:00
|
|
|
sgml.stamp: xml-build.stamp
|
2002-03-08 20:36:40 +08:00
|
|
|
@true
|
|
|
|
|
|
|
|
#### html ####
|
|
|
|
|
|
|
|
html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
|
|
|
|
@echo '*** Building HTML ***'
|
|
|
|
rm -rf $(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
|
2002-08-28 00:38:29 +08:00
|
|
|
else
|
|
|
|
all-local:
|
2002-03-08 20:36:40 +08:00
|
|
|
endif
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
##############
|
2001-05-26 04:44:40 +08:00
|
|
|
|
|
|
|
clean-local:
|
2002-03-08 20:36:40 +08:00
|
|
|
rm -f *~ *.bak $(SCANOBJ_FILES) *-unused.txt $(DOC_STAMPS)
|
2001-05-26 04:44:40 +08:00
|
|
|
|
|
|
|
maintainer-clean-local: clean
|
2003-02-07 02:38:54 +08:00
|
|
|
cd $(srcdir) && rm -rf xml html $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
install-data-local:
|
2001-05-26 04:44:40 +08:00
|
|
|
$(mkinstalldirs) $(DESTDIR)$(TARGET_DIR)
|
2002-03-08 20:36:40 +08:00
|
|
|
(installfiles=`echo $(srcdir)/html/*`; \
|
2003-12-17 05:06:03 +08:00
|
|
|
if test -f "$(srcdir)/html/index.sgml"; \
|
2003-08-11 08:08:02 +08:00
|
|
|
then \
|
2001-05-26 04:44:40 +08:00
|
|
|
for i in $$installfiles; do \
|
|
|
|
echo '-- Installing '$$i ; \
|
|
|
|
$(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \
|
|
|
|
done; \
|
|
|
|
echo '-- Installing $(srcdir)/html/index.sgml' ; \
|
|
|
|
$(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR); \
|
2003-08-11 08:08:02 +08:00
|
|
|
else echo '-- Nothing to install' ; \
|
2001-05-26 04:44:40 +08:00
|
|
|
fi)
|
|
|
|
|
2002-11-08 01:12:17 +08:00
|
|
|
uninstall-local:
|
|
|
|
(installfiles=`echo $(srcdir)/html/*`; \
|
|
|
|
for i in $$installfiles; do \
|
|
|
|
rm -f $(DESTDIR)$(TARGET_DIR)/`basename $$i`; \
|
|
|
|
done; \
|
|
|
|
rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml)
|
|
|
|
|
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
#
|
|
|
|
# Require gtk-doc when making dist
|
|
|
|
#
|
|
|
|
if ENABLE_GTK_DOC
|
|
|
|
dist-check-gtkdoc:
|
|
|
|
else
|
|
|
|
dist-check-gtkdoc:
|
|
|
|
@echo "*** gtk-doc must be installed and enabled in order to make dist"
|
|
|
|
@false
|
|
|
|
endif
|
|
|
|
|
|
|
|
dist-hook: dist-check-gtkdoc dist-hook-local
|
2001-05-26 04:44:40 +08:00
|
|
|
mkdir $(distdir)/tmpl
|
2003-02-07 02:38:54 +08:00
|
|
|
mkdir $(distdir)/xml
|
2002-03-08 20:36:40 +08:00
|
|
|
mkdir $(distdir)/html
|
2001-05-26 04:44:40 +08:00
|
|
|
-cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
|
2003-02-07 02:38:54 +08:00
|
|
|
-cp $(srcdir)/xml/*.xml $(distdir)/xml
|
2002-03-08 20:36:40 +08:00
|
|
|
-cp $(srcdir)/html/* $(distdir)/html
|
2001-05-26 04:44:40 +08:00
|
|
|
|
2002-03-08 20:36:40 +08:00
|
|
|
.PHONY : dist-hook-local
|