diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..0254c39 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "bson-cxx"] + path = bson-cxx + url = git://github.com/dwight/bson-cxx.git diff --git a/README.md b/README.md index 1943ac9..8553175 100755 --- a/README.md +++ b/README.md @@ -15,9 +15,8 @@ See the [doc/](doc) folder. ## Building -You will need the [bson-cxx](https://github.com/dwight/bson-cxx) library (a dependancy) to build the tools. It is available on github. - -Place it as a peer level directory on disk with bsontools. (That is you will see lines such as `#include "../../../bson-cxx/"` in the source code of these tools...) +The [bson-cxx](https://github.com/dwight/bson-cxx) library (a dependancy) is added as a submodule to this project and should be availble when building the tools. +Initially cloning a repository with --recursive will clone the submodule as well. To build with scons, assuming it is installed, just type "scons". @@ -43,7 +42,3 @@ Some automated tests would be real helpful for example... ## Support For help try posting to the [BSON Google Groups forum](https://groups.google.com/forum/#!forum/bson). - - - - diff --git a/SConstruct b/SConstruct index f0c864c..69333cb 100644 --- a/SConstruct +++ b/SConstruct @@ -7,13 +7,13 @@ env.Append(CCFLAGS='-std=c++0x') env.Program(target = 'hex', source = ["src/bsontools/hex.cpp"]) dep1 = [ - "../bson-cxx/src/bson/time_support.cpp", - "../bson-cxx/src/bson/bson.cpp", - "../bson-cxx/src/bson/parse_number.cpp" ] + "bson-cxx/src/bson/time_support.cpp", + "bson-cxx/src/bson/bson.cpp", + "bson-cxx/src/bson/parse_number.cpp" ] dep2 = [ - "../bson-cxx/src/bson/json.cpp", - "../bson-cxx/src/bson/base64.cpp" + "bson-cxx/src/bson/json.cpp", + "bson-cxx/src/bson/base64.cpp" ] env.Program(target = 'fromcsv', source = ["src/bsontools/fromcsv.cpp"] + dep1) diff --git a/bson-cxx b/bson-cxx new file mode 160000 index 0000000..99e3d06 --- /dev/null +++ b/bson-cxx @@ -0,0 +1 @@ +Subproject commit 99e3d069228039021281ec1bf0b0eefc085cb16d diff --git a/src/bsontools/bsonmain.cpp b/src/bsontools/bsonmain.cpp index 6549344..2dd9a18 100755 --- a/src/bsontools/bsonmain.cpp +++ b/src/bsontools/bsonmain.cpp @@ -1,9 +1,9 @@ #include #include #include "binary.h" -#include "../../../bson-cxx/src/bson/bsonobj.h" -#include "../../../bson-cxx/src/bson/bsonobjiterator.h" -#include "../../../bson-cxx/src/bson/bsonobjbuilder.h" +#include "../../bson-cxx/src/bson/bsonobj.h" +#include "../../bson-cxx/src/bson/bsonobjiterator.h" +#include "../../bson-cxx/src/bson/bsonobjbuilder.h" #include "cmdline.h" #include #include diff --git a/src/bsontools/cmdline.h b/src/bsontools/cmdline.h index c753d45..050f93f 100755 --- a/src/bsontools/cmdline.h +++ b/src/bsontools/cmdline.h @@ -2,7 +2,7 @@ #include #include -#include "../../../bson-cxx/src/bson/parse_number.h" +#include "../../bson-cxx/src/bson/parse_number.h" using namespace _bson; using namespace std; diff --git a/src/bsontools/fromcsv.cpp b/src/bsontools/fromcsv.cpp index 0f8bc16..90461d5 100755 --- a/src/bsontools/fromcsv.cpp +++ b/src/bsontools/fromcsv.cpp @@ -2,8 +2,8 @@ #include "binary.h" #include #include -#include "../../../bson-cxx/src/bson/json.h" -#include "../../../bson-cxx/src/bson/bsonobjbuilder.h" +#include "../../bson-cxx/src/bson/json.h" +#include "../../bson-cxx/src/bson/bsonobjbuilder.h" #include "cmdline.h" #include "parse_types.h" diff --git a/src/bsontools/fromjson.cpp b/src/bsontools/fromjson.cpp index 6623cda..97a8672 100755 --- a/src/bsontools/fromjson.cpp +++ b/src/bsontools/fromjson.cpp @@ -5,8 +5,8 @@ #include #include #include "binary.h" -#include "../../../bson-cxx/src/bson/json.h" -#include "../../../bson-cxx/src/bson/bsonobjbuilder.h" +#include "../../bson-cxx/src/bson/json.h" +#include "../../bson-cxx/src/bson/bsonobjbuilder.h" #include "cmdline.h" using namespace std; diff --git a/src/bsontools/fromxml.cpp b/src/bsontools/fromxml.cpp index dd100c3..a28aab5 100755 --- a/src/bsontools/fromxml.cpp +++ b/src/bsontools/fromxml.cpp @@ -5,9 +5,9 @@ #include #include #include "binary.h" -#include "../../../bson-cxx/src/bson/json.h" -#include "../../../bson-cxx/src/bson/bsonobjbuilder.h" -#include "../../../bson-cxx/src/bson/bsonobjiterator.h" +#include "../../bson-cxx/src/bson/json.h" +#include "../../bson-cxx/src/bson/bsonobjbuilder.h" +#include "../../bson-cxx/src/bson/bsonobjiterator.h" #include "cmdline.h" #include "parse_types.h" #include "../util/str.h" diff --git a/src/bsontools/hex.cpp b/src/bsontools/hex.cpp index 611b7a4..12f2083 100755 --- a/src/bsontools/hex.cpp +++ b/src/bsontools/hex.cpp @@ -2,8 +2,8 @@ #include #include "stdio.h" #include "binary.h" -#include "../../../bson-cxx/src/bson/hex.h" -#include "../../../bson-cxx/src/bson/endian.h" +#include "../../bson-cxx/src/bson/hex.h" +#include "../../bson-cxx/src/bson/endian.h" #include "cmdline.h" using namespace std;