aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMu Qiao <qiaomuf@gentoo.org>2011-07-27 10:42:59 +0800
committerMu Qiao <qiaomuf@gentoo.org>2011-08-02 15:52:18 +0800
commite61a9f55a0e70e590874235542d7c9b1252f2552 (patch)
treeb4f3789d7ce63a2964e753a3616d380102fa4690
parentParser: put includes to more proper place (diff)
downloadlibbash-e61a9f55a0e70e590874235542d7c9b1252f2552.tar.gz
libbash-e61a9f55a0e70e590874235542d7c9b1252f2552.tar.bz2
libbash-e61a9f55a0e70e590874235542d7c9b1252f2552.zip
Utility: add isolated functions for instruo
-rw-r--r--Makefile.am8
-rw-r--r--utils/instruo.cpp3
2 files changed, 8 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 76f77cb..ba77230 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -138,9 +138,13 @@ metadata_generator_SOURCES = utils/metadata_generator.cpp
metadata_generator_LDADD = libcppbash.la libmetadata.a
metadata_generator_CPPFLAGS = $(AM_CPPFLAGS) -Iutils
-instruo_SOURCES = utils/instruo.cpp utils/command_line.cpp utils/command_line.h
+instruo_SOURCES = utils/instruo.cpp \
+ utils/command_line.cpp \
+ utils/command_line.h \
+ test/test.h \
+ test/test.cpp
instruo_LDADD = libcppbash.la @PALUDIS_LIBS@ libmetadata.a
-instruo_CPPFLAGS = $(AM_CPPFLAGS) @PALUDIS_CFLAGS@ -Iutils
+instruo_CPPFLAGS = $(AM_CPPFLAGS) @PALUDIS_CFLAGS@ -Iutils -I$(top_srcdir)/test/
instruo_CXXFLAGS = $(AM_CXXFLAGS) -Wno-extra -fopenmp
ast_printer_SOURCES = utils/ast_printer.cpp
diff --git a/utils/instruo.cpp b/utils/instruo.cpp
index 704c98c..98116cf 100644
--- a/utils/instruo.cpp
+++ b/utils/instruo.cpp
@@ -56,6 +56,7 @@
#include "core/exceptions.h"
#include "command_line.h"
#include "libbash.h"
+#include "test.h"
#include "utils/metadata.h"
using namespace paludis;
@@ -105,7 +106,7 @@ void worker(const std::shared_ptr<PackageIDSequence> &ids)
variables["PVR"][0] + ".ebuild");
try
{
- libbash::interpret(ebuild_path, variables, functions);
+ libbash::interpret(ebuild_path, get_src_dir() + "/utils/isolated-functions.sh", variables, functions);
std::string output_path(CommandLine::get_instance()->a_output_directory.argument() + "/" +
variables["CATEGORY"][0] + "/" +