[passepartout] revive the standalone xslt-param-parser
- From: Sven Herzberg <herzi src gnome org>
- To: svn-commits-list gnome org
- Subject: [passepartout] revive the standalone xslt-param-parser
- Date: Tue, 28 Apr 2009 10:15:49 -0400 (EDT)
commit 3130cf44c7579edc8ab8af1295eec53ed02a1b5f
Author: Sven Herzberg <herzi lanedo com>
Date: Tue Apr 28 13:00:29 2009 +0200
revive the standalone xslt-param-parser
* src/pptout/document/Makefile.am: added the getxsltparam binary (for test
cases)
* src/pptout/document/getxsltparams.cc: change the source file so that it can
produce a valid binary
---
src/pptout/document/Makefile.am | 16 ++++++++++++++--
src/pptout/document/getxsltparams.cc | 7 ++++---
2 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/src/pptout/document/Makefile.am b/src/pptout/document/Makefile.am
index 91b8150..0622ced 100644
--- a/src/pptout/document/Makefile.am
+++ b/src/pptout/document/Makefile.am
@@ -1,4 +1,17 @@
noinst_LIBRARIES = libdocument.a
+noinst_PROGRAMS=getxsltparams
+
+getxsltparams_SOURCES=\
+ getxsltparams.cc \
+ $(NULL)
+getxsltparams_CPPFLAGS=\
+ -DSTANDALONE \
+ $(XMLPP_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(NULL)
+getxsltparams_LDADD=\
+ $(XMLPP_LIBS) \
+ $(NULL)
dist_noinst_HEADERS = basicframe.h cachedframe.h document.h group.h \
imageframe.h page.h pagent.h rasterframe.h textframe.h \
@@ -11,5 +24,4 @@ libdocument_a_SOURCES = basicframe.cc cachedframe.cc document.cc \
loader.cc typesetterthread.cc
libdocument_a_CPPFLAGS = -I$(top_srcdir)/src
-
-libdocument_a_CPPFLAGS += $(GTKMM_CFLAGS) $(XMLPP_CFLAGS) $(WARN_CFLAGS)
+libdocument_a_CPPFLAGS += $(GTKMM_CFLAGS) $(getxsltparams_CPPFLAGS)
diff --git a/src/pptout/document/getxsltparams.cc b/src/pptout/document/getxsltparams.cc
index dec3efc..c0cbcf5 100644
--- a/src/pptout/document/getxsltparams.cc
+++ b/src/pptout/document/getxsltparams.cc
@@ -57,10 +57,11 @@ std::vector<std::string> getXsltParams(const std::string& source) {
return finder.result();
}
-#if 0
+#ifdef STANDALONE
+#include <iostream>
+
int main() {
- std::vector<std::string> params = get_params
- ("/home/kaj/proj/emission/emissionxml/passepartout/teaser.xslt");
+ std::vector<std::string> params = getXsltParams ("/home/kaj/proj/emission/emissionxml/passepartout/teaser.xslt");
for(std::vector<std::string>::const_iterator i = params.begin();
i != params.end(); ++i) {
std::cout << "Found parameter: " << *i << std::endl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]