
* demo/Makefile.am: Add xml2doc and libmagick++ dependency. * demo/xml2doc/Makefile.am: New. * demo/xml2doc/datarootdir.hh.in: New. Will store few useful variables. * demo/xml2doc/xml_transform.pro: Remove. --- scribo/ChangeLog | 13 ++++ scribo/demo/Makefile.am | 22 ++++++- scribo/demo/xml2doc/Makefile.am | 69 ++++++++++++++++++++ .../help_dialog.hh => xml2doc/datarootdir.hh.in} | 18 ++---- scribo/demo/xml2doc/xml_transform.pro | 17 ----- 5 files changed, 108 insertions(+), 31 deletions(-) create mode 100644 scribo/demo/xml2doc/Makefile.am copy scribo/demo/{viewer/help_dialog.hh => xml2doc/datarootdir.hh.in} (83%) delete mode 100644 scribo/demo/xml2doc/xml_transform.pro diff --git a/scribo/ChangeLog b/scribo/ChangeLog index 4c8c615..35791f8 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,18 @@ 2010-12-10 Guillaume Lazzara <z@lrde.epita.fr> + Include xml2doc in build system. + + * demo/Makefile.am: Add xml2doc and libmagick++ dependency. + + * demo/xml2doc/Makefile.am: New. + + * demo/xml2doc/datarootdir.hh.in: New. Will store few useful + variables. + + * demo/xml2doc/xml_transform.pro: Remove. + +2010-12-10 Guillaume Lazzara <z@lrde.epita.fr> + Import xml_transform from Arthur's sandbox to demo/xml2doc. * sandbox/arthur/xml_transform/README, diff --git a/scribo/demo/Makefile.am b/scribo/demo/Makefile.am index b1d3c5b..2d55093 100644 --- a/scribo/demo/Makefile.am +++ b/scribo/demo/Makefile.am @@ -17,7 +17,27 @@ if HAVE_QT -SUBDIRS = review viewer +SUBDIRS = review + + + +if HAVE_MAGICKXX + +SUBDIRS = viewer + +endif HAVE_MAGICKXX + + + + +# FIXME: Add more dependencies (fop, xsltproc) +if HAVE_MAGICKXX + +SUBDIRS += xml2doc + +endif HAVE_MAGICKXX + + endif HAVE_QT diff --git a/scribo/demo/xml2doc/Makefile.am b/scribo/demo/xml2doc/Makefile.am new file mode 100644 index 0000000..f6ab232 --- /dev/null +++ b/scribo/demo/xml2doc/Makefile.am @@ -0,0 +1,69 @@ +# Copyright (C) 2010 EPITA Research and Development Laboratory (LRDE). +# +# This file is part of Olena. +# +# Olena is free software: you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation, version 2 of the License. +# +# Olena is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Olena. If not, see <http://www.gnu.org/licenses/>. + +include $(top_srcdir)/build-aux/autotroll.mk + + +bin_PROGRAMS = scribo-xml2doc +scribo_xml2doc_SOURCES = $(BUILT_SOURCES) \ + common.cc \ + image_crop.cc \ + loader.cc \ + main.cc \ + xml_transform.cc + +scribo_xml2doc_CPPFLAGS = $(QT_CPPFLAGS) $(AM_CPPFLAGS) \ + $(MAGICKXX_CPPFLAGS) \ + -I$(top_srcdir)/milena \ + -I$(top_srcdir)/scribo \ + -DNDEBUG -DMLN_WO_GLOBAL_VARS +scribo_xml2doc_CXXFLAGS = $(QT_CXXFLAGS) $(AM_CXXFLAGS) -O3 +scribo_xml2doc_LDFLAGS = $(QT_LDFLAGS) $(LDFLAGS) $(MAGICKXX_LDFLAGS) +scribo_xml2doc_LDADD = $(QT_LIBS) $(LDADD) + +BUILT_SOURCES = common.moc.cc \ + image_crop.moc.cc \ + loader.moc.cc \ + xml_transform.moc.cc + + +noinst_HEADERS = common.hh \ + image_crop.hh \ + loader.hh \ + xml_transform.hh + +# Generated files +noinst_gen_files = datarootdir.hh +noinst_HEADERS += $(noinst_gen_files) + +do_subst = sed \ + -e 's|@datarootdir[@]|$(datarootdir)|g' \ + -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' + +datarootdir.hh: $(srcdir)/datarootdir.hh.in Makefile + rm -f $@ $@.tmp + srcdir=''; \ + test -f ./$@.in || srcdir=$(srcdir)/; \ + $(do_subst) $${srcdir}$@.in >$@.tmp + chmod a-w $@.tmp + mv $@.tmp $@ + +CLEANFILES = $(noinst_gen_files) $(BUILT_SOURCES) + +EXTRA_DIST = \ + README \ + datarootdir.hh.in + diff --git a/scribo/demo/viewer/help_dialog.hh b/scribo/demo/xml2doc/datarootdir.hh.in similarity index 83% copy from scribo/demo/viewer/help_dialog.hh copy to scribo/demo/xml2doc/datarootdir.hh.in index 2b4adcf..88371f9 100644 --- a/scribo/demo/viewer/help_dialog.hh +++ b/scribo/demo/xml2doc/datarootdir.hh.in @@ -23,21 +23,13 @@ // exception does not however invalidate any other reasons why the // executable file might be covered by the GNU General Public License. -#ifndef HELP_DIALOG_HH_ -# define HELP_DIALOG_HH_ +#ifndef SCRIBO_DEMO_XML2DOC_DATAROOTDIR_HH +# define SCRIBO_DEMO_XML2DOC_DATAROOTDIR_HH -# include <QtGui> -class HelpDialog - : public QDialog -{ - Q_OBJECT +# define SCRIBO_PREFIX_DATAROOTDIR "@datarootdir@/scribo" -public: - HelpDialog(); +# define SCRIBO_LOCAL_DATAROOTDIR "@abs_srcdir@" -public slots: - void done(); -}; -#endif /* !HELP_DIALOG_HH_ */ +#endif // !SCRIBO_DEMO_XML2DOC_DATAROOTDIR_HH diff --git a/scribo/demo/xml2doc/xml_transform.pro b/scribo/demo/xml2doc/xml_transform.pro deleted file mode 100644 index 918f0d6..0000000 --- a/scribo/demo/xml2doc/xml_transform.pro +++ /dev/null @@ -1,17 +0,0 @@ -###################################################################### -# Automatically generated by qmake (2.01a) jeu. juil. 15 13:47:38 2010 -###################################################################### - -TEMPLATE = app -TARGET = -DEPENDPATH += . -INCLUDEPATH += . -QMAKE_CXXFLAGS += -I../../../../milena -I../../../../scribo -DEFINES += NDEBUG MLN_WO_GLOBAL_VARS -QT += xml -LIBS += `Magick++-config --libs` - - -# Input -HEADERS += common.hh image_crop.hh loader.hh xml_transform.hh -SOURCES += common.cc image_crop.cc loader.cc main.cc xml_transform.cc -- 1.5.6.5