summaryrefslogtreecommitdiff
path: root/docs/tools
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2010-05-13 15:30:27 +0200
committerAleksander Morgado <aleksander@lanedo.com>2010-05-14 12:57:49 +0200
commit22b899e2b7a0a7d6fc7bdd1ffe7b94c97dffb018 (patch)
treeee1aeb9480f6b5c866544018e4e003ff7875e5dd /docs/tools
parenta4c6c4b685a087851b9312e43de3c0997ff52448 (diff)
downloadtracker-22b899e2b7a0a7d6fc7bdd1ffe7b94c97dffb018.tar.gz
Several modifications in the build structure, including VPATH builds
* Also fixed GB#616808: The user can now rebuild PNG files from the sources in the distribution tarball. And PNG files are only removed in make maintainerclean. * Same for the ontology XML files, they can now be rebuilt from the sources in the distribution tarball, and will only be removed in make maintainerclean. * Support for VPATH builds, where $(srcdir) != $(builddir)
Diffstat (limited to 'docs/tools')
-rw-r--r--docs/tools/Makefile.am51
-rwxr-xr-xdocs/tools/gen-doc.sh19
2 files changed, 12 insertions, 58 deletions
diff --git a/docs/tools/Makefile.am b/docs/tools/Makefile.am
index ab625d265..9a515f363 100644
--- a/docs/tools/Makefile.am
+++ b/docs/tools/Makefile.am
@@ -7,6 +7,9 @@ INCLUDES = \
-DTRACKER_COMPILATION \
-DTOP_SRCDIR=\"$(top_srcdir)\" \
-I$(top_srcdir)/src \
+ -I$(top_builddir)/src \
+ -I$(top_builddir)/src/libtracker-client \
+ -I$(top_builddir)/src/libtracker-data \
$(WARN_CFLAGS) \
$(GLIB2_CFLAGS) \
$(GIO_CFLAGS) \
@@ -40,50 +43,4 @@ ttl2sgml_LDADD = \
$(GLIB2_LIBS) \
$(GIO_LIBS)
-gen-doc.stamp: ttl2sgml
- $(top_srcdir)/docs/tools/gen-doc.sh
- $(AM_V_GEN) touch $@
-
-ontology.dot: ontology-graph
- $(AM_V_GEN) ./ontology-graph -d $(top_srcdir)/data/ontologies -o ontology.dot
-
-ontology.png: ontology.dot
- $(AM_V_GEN)$(GRAPHVIZ_FDP) -Tpng -o ontology.png ontology.dot
- cp ontology.png $(top_builddir)/docs/reference/ontology/
-
-#
-# The origianal diagram but with .png extension
-# Horrible, i know.
-#
-ONTOLOGY_DIAGRAMS= \
- ../ontologies/notation.png \
- ../ontologies/mfo/feeds-overview.png \
- ../ontologies/nmm/radio-overview.png \
- ../ontologies/nmm/images-overview.png \
- ../ontologies/mlo/location-overview.png \
- ../ontologies/nie/overview.png \
- ../ontologies/nmo/message-class-overview.png \
- ../ontologies/nmo/email-mimeparts-overview.png
-
-.dia.png:
- dia -t png $<
- cp $(notdir $(<:.dia=.png)) $@
- cp $@ $(top_builddir)/docs/reference/ontology
-
-BUILT_SOURCES = \
- $(ONTOLOGY_DIAGRAMS) \
- ontology.png \
- gen-doc.stamp
-
-EXTRA_DIST = \
- $(ONTOLOGY_DIAGRAMS) \
- gen-doc.sh
-
-DISTCLEANFILES = \
- ontology.dot \
- $(top_builddir)/docs/reference/ontology/notation.png \
- $(top_builddir)/docs/reference/ontology/ontology.png
-
-CLEANFILES = $(BUILT_SOURCES) $(notdir $(ONTOLOGY_DIAGRAMS:.dia=.png))
-
-make-hook: ontology-graph ontology.dot ontology.png
+EXTRA_DIST = gen-doc.sh
diff --git a/docs/tools/gen-doc.sh b/docs/tools/gen-doc.sh
index 6f4e7a099..226eb526d 100755
--- a/docs/tools/gen-doc.sh
+++ b/docs/tools/gen-doc.sh
@@ -16,16 +16,13 @@
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# 02110-1301, USA.
#
-BUILD_DIR="../reference/ontology/"
-
-if ! [ -e $PWD/gen-doc.sh ]; then
- # building documentation out of tree is not supported
- # as documentation is distributed in release tarballs
- exit
-fi
+TTL2SGML=$1
+ONTOLOGIES_DATA_DIR=$2
+ONTOLOGIES_INFO_DIR=$3
+BUILD_DIR=$4
echo "Preparing file full text index properties (fts-properties.xml)"
@@ -45,14 +42,14 @@ echo "<?xml version='1.0' encoding='UTF-8'?>
<tbody>" > $BUILD_DIR/fts-properties.xml
-for f in `find ../../data/ontologies -name "*.description"` ; do
+for f in `find $ONTOLOGIES_DATA_DIR -name "*.description"` ; do
# ../../data/ontologies/XX-aaa.description -> PREFIX=aaa
TMPNAME=${f%.description}
PREFIX=${TMPNAME#*-}
echo "Generating $PREFIX documentation"
- ./ttl2sgml -d $f -o $BUILD_DIR/$PREFIX-ontology.xml -f $BUILD_DIR/fts-properties.xml \
- -e ../../docs/ontologies/$PREFIX/explanation.xml
+ $TTL2SGML -d $f -o $BUILD_DIR/$PREFIX-ontology.xml -f $BUILD_DIR/fts-properties.xml \
+ -e $ONTOLOGIES_INFO_DIR/$PREFIX/explanation.xml
done
echo "</tbody></table></chapter>" >> $BUILD_DIR/fts-properties.xml