rename src to PSync and change include style
refs #4779
Change-Id: I74a08a6e4ab4909be49341f60ed9735f76b3da59
diff --git a/.waf-tools/boost.py b/.waf-tools/boost.py
index dfcccf3..d7e0107 100644
--- a/.waf-tools/boost.py
+++ b/.waf-tools/boost.py
@@ -455,7 +455,7 @@
self.env['DEFINES_%s' % var] += ['BOOST_LOG_NO_THREADS']
if has_shlib('log'):
self.env['DEFINES_%s' % var] += ['BOOST_LOG_DYN_LINK']
- self.check_cxx(fragment=BOOST_LOG_CODE, use=var, execute=False)
+ self.check_cxx(fragment=BOOST_LOG_CODE, use=var, execute=False)
if params.get('linkage_autodetect', False):
self.start_msg("Attempting to detect boost linkage flags")
diff --git a/src/consumer.cpp b/PSync/consumer.cpp
similarity index 98%
rename from src/consumer.cpp
rename to PSync/consumer.cpp
index 84adc2a..2c84487 100644
--- a/src/consumer.cpp
+++ b/PSync/consumer.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "consumer.hpp"
-#include "detail/state.hpp"
+#include "PSync/consumer.hpp"
+#include "PSync/detail/state.hpp"
#include <ndn-cxx/util/logger.hpp>
#include <ndn-cxx/security/validator-null.hpp>
diff --git a/src/consumer.hpp b/PSync/consumer.hpp
similarity index 97%
rename from src/consumer.hpp
rename to PSync/consumer.hpp
index 6460bc5..f7e64ca 100644
--- a/src/consumer.hpp
+++ b/PSync/consumer.hpp
@@ -20,9 +20,9 @@
#ifndef PSYNC_CONSUMER_HPP
#define PSYNC_CONSUMER_HPP
-#include "detail/bloom-filter.hpp"
-#include "detail/util.hpp"
-#include "detail/test-access-control.hpp"
+#include "PSync/detail/bloom-filter.hpp"
+#include "PSync/detail/util.hpp"
+#include "PSync/detail/test-access-control.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/util/scheduler.hpp>
diff --git a/src/detail/bloom-filter.cpp b/PSync/detail/bloom-filter.cpp
similarity index 99%
rename from src/detail/bloom-filter.cpp
rename to PSync/detail/bloom-filter.cpp
index b74a00b..dd21205 100644
--- a/src/detail/bloom-filter.cpp
+++ b/PSync/detail/bloom-filter.cpp
@@ -43,8 +43,8 @@
* SOFTWARE.
*/
-#include "bloom-filter.hpp"
-#include "util.hpp"
+#include "PSync/detail/bloom-filter.hpp"
+#include "PSync/detail/util.hpp"
#include <ndn-cxx/util/logger.hpp>
diff --git a/src/detail/bloom-filter.hpp b/PSync/detail/bloom-filter.hpp
similarity index 100%
rename from src/detail/bloom-filter.hpp
rename to PSync/detail/bloom-filter.hpp
diff --git a/src/detail/iblt.cpp b/PSync/detail/iblt.cpp
similarity index 98%
rename from src/detail/iblt.cpp
rename to PSync/detail/iblt.cpp
index 495c232..d2a2161 100644
--- a/src/detail/iblt.cpp
+++ b/PSync/detail/iblt.cpp
@@ -43,8 +43,8 @@
* SOFTWARE.
*/
-#include "iblt.hpp"
-#include "util.hpp"
+#include "PSync/detail/iblt.hpp"
+#include "PSync/detail/util.hpp"
#include <sstream>
diff --git a/src/detail/iblt.hpp b/PSync/detail/iblt.hpp
similarity index 100%
rename from src/detail/iblt.hpp
rename to PSync/detail/iblt.hpp
diff --git a/src/detail/state.cpp b/PSync/detail/state.cpp
similarity index 98%
rename from src/detail/state.cpp
rename to PSync/detail/state.cpp
index 09ee55e..1cea515 100644
--- a/src/detail/state.cpp
+++ b/PSync/detail/state.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "state.hpp"
+#include "PSync/detail/state.hpp"
namespace psync {
diff --git a/src/detail/state.hpp b/PSync/detail/state.hpp
similarity index 100%
rename from src/detail/state.hpp
rename to PSync/detail/state.hpp
diff --git a/src/detail/test-access-control.hpp b/PSync/detail/test-access-control.hpp
similarity index 97%
rename from src/detail/test-access-control.hpp
rename to PSync/detail/test-access-control.hpp
index 5253a7a..67d015f 100644
--- a/src/detail/test-access-control.hpp
+++ b/PSync/detail/test-access-control.hpp
@@ -22,7 +22,7 @@
#ifndef PSYNC_TEST_ACCESS_CONTROL_HPP
#define PSYNC_TEST_ACCESS_CONTROL_HPP
-#include "psync-config.hpp"
+#include "PSync/detail/config.hpp"
#ifdef WITH_TESTS
#define VIRTUAL_WITH_TESTS virtual
diff --git a/src/detail/util.cpp b/PSync/detail/util.cpp
similarity index 98%
rename from src/detail/util.cpp
rename to PSync/detail/util.cpp
index ab2c541..0040591 100644
--- a/src/detail/util.cpp
+++ b/PSync/detail/util.cpp
@@ -21,7 +21,7 @@
* https://github.com/aappleby/smhasher/blob/master/src/murmurHash3.cpp
**/
-#include "util.hpp"
+#include "PSync/detail/util.hpp"
#include <ndn-cxx/util/backports.hpp>
diff --git a/src/detail/util.hpp b/PSync/detail/util.hpp
similarity index 100%
rename from src/detail/util.hpp
rename to PSync/detail/util.hpp
diff --git a/src/full-producer.cpp b/PSync/full-producer.cpp
similarity index 99%
rename from src/full-producer.cpp
rename to PSync/full-producer.cpp
index 133eebe..91fe87c 100644
--- a/src/full-producer.cpp
+++ b/PSync/full-producer.cpp
@@ -17,7 +17,7 @@
* NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "full-producer.hpp"
+#include "PSync/full-producer.hpp"
#include <ndn-cxx/util/logger.hpp>
#include <ndn-cxx/util/segment-fetcher.hpp>
diff --git a/src/full-producer.hpp b/PSync/full-producer.hpp
similarity index 98%
rename from src/full-producer.hpp
rename to PSync/full-producer.hpp
index 21756d0..83fbde3 100644
--- a/src/full-producer.hpp
+++ b/PSync/full-producer.hpp
@@ -20,8 +20,8 @@
#ifndef PSYNC_FULL_PRODUCER_HPP
#define PSYNC_FULL_PRODUCER_HPP
-#include "producer-base.hpp"
-#include "detail/state.hpp"
+#include "PSync/producer-base.hpp"
+#include "PSync/detail/state.hpp"
#include <map>
#include <unordered_set>
diff --git a/src/partial-producer.cpp b/PSync/partial-producer.cpp
similarity index 98%
rename from src/partial-producer.cpp
rename to PSync/partial-producer.cpp
index e1570fe..c1e11bc 100644
--- a/src/partial-producer.cpp
+++ b/PSync/partial-producer.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "partial-producer.hpp"
-#include "detail/state.hpp"
+#include "PSync/partial-producer.hpp"
+#include "PSync/detail/state.hpp"
#include <ndn-cxx/util/logger.hpp>
diff --git a/src/partial-producer.hpp b/PSync/partial-producer.hpp
similarity index 97%
rename from src/partial-producer.hpp
rename to PSync/partial-producer.hpp
index de12fb8..802f7d8 100644
--- a/src/partial-producer.hpp
+++ b/PSync/partial-producer.hpp
@@ -20,8 +20,8 @@
#ifndef PSYNC_PARTIAL_PRODUCER_HPP
#define PSYNC_PARTIAL_PRODUCER_HPP
-#include "detail/bloom-filter.hpp"
-#include "producer-base.hpp"
+#include "PSync/detail/bloom-filter.hpp"
+#include "PSync/producer-base.hpp"
#include <map>
#include <unordered_set>
diff --git a/src/producer-base.cpp b/PSync/producer-base.cpp
similarity index 98%
rename from src/producer-base.cpp
rename to PSync/producer-base.cpp
index e731168..88a2a4c 100644
--- a/src/producer-base.cpp
+++ b/PSync/producer-base.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "producer-base.hpp"
+#include "PSync/producer-base.hpp"
#include <ndn-cxx/util/logger.hpp>
#include <boost/algorithm/string.hpp>
diff --git a/src/producer-base.hpp b/PSync/producer-base.hpp
similarity index 96%
rename from src/producer-base.hpp
rename to PSync/producer-base.hpp
index 4aa0ef7..71b04b4 100644
--- a/src/producer-base.hpp
+++ b/PSync/producer-base.hpp
@@ -20,11 +20,11 @@
#ifndef PSYNC_PRODUCER_BASE_HPP
#define PSYNC_PRODUCER_BASE_HPP
-#include "detail/iblt.hpp"
-#include "detail/bloom-filter.hpp"
-#include "detail/util.hpp"
-#include "detail/test-access-control.hpp"
-#include "segment-publisher.hpp"
+#include "PSync/detail/iblt.hpp"
+#include "PSync/detail/bloom-filter.hpp"
+#include "PSync/detail/util.hpp"
+#include "PSync/detail/test-access-control.hpp"
+#include "PSync/segment-publisher.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/util/scheduler.hpp>
diff --git a/src/segment-publisher.cpp b/PSync/segment-publisher.cpp
similarity index 98%
rename from src/segment-publisher.cpp
rename to PSync/segment-publisher.cpp
index 394dfc5..67be2cc 100644
--- a/src/segment-publisher.cpp
+++ b/PSync/segment-publisher.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "segment-publisher.hpp"
+#include "PSync/segment-publisher.hpp"
#include <ndn-cxx/name-component.hpp>
diff --git a/src/segment-publisher.hpp b/PSync/segment-publisher.hpp
similarity index 97%
rename from src/segment-publisher.hpp
rename to PSync/segment-publisher.hpp
index 8e00624..58034e2 100644
--- a/src/segment-publisher.hpp
+++ b/PSync/segment-publisher.hpp
@@ -20,7 +20,7 @@
#ifndef PSYNC_SEGMENT_PUBLISHER_HPP
#define PSYNC_SEGMENT_PUBLISHER_HPP
-#include "detail/test-access-control.hpp"
+#include "PSync/detail/test-access-control.hpp"
#include <ndn-cxx/face.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-bloom-filter.cpp b/tests/test-bloom-filter.cpp
index 55b71e8..1e634c9 100644
--- a/tests/test-bloom-filter.cpp
+++ b/tests/test-bloom-filter.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "detail/bloom-filter.hpp"
+#include "PSync/detail/bloom-filter.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-consumer.cpp b/tests/test-consumer.cpp
index 9a745e6..96e6e8a 100644
--- a/tests/test-consumer.cpp
+++ b/tests/test-consumer.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "consumer.hpp"
+#include "PSync/consumer.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-full-producer.cpp b/tests/test-full-producer.cpp
index ce23cf8..ca7955b 100644
--- a/tests/test-full-producer.cpp
+++ b/tests/test-full-producer.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "full-producer.hpp"
+#include "PSync/full-producer.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-full-sync.cpp b/tests/test-full-sync.cpp
index d8335b0..c5eeb5e 100644
--- a/tests/test-full-sync.cpp
+++ b/tests/test-full-sync.cpp
@@ -17,10 +17,10 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "full-producer.hpp"
-#include "consumer.hpp"
#include "unit-test-time-fixture.hpp"
-#include "detail/state.hpp"
+#include "PSync/full-producer.hpp"
+#include "PSync/consumer.hpp"
+#include "PSync/detail/state.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-iblt.cpp b/tests/test-iblt.cpp
index 3934938..bb5e8ee 100644
--- a/tests/test-iblt.cpp
+++ b/tests/test-iblt.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "detail/iblt.hpp"
-#include "detail/util.hpp"
+#include "PSync/detail/iblt.hpp"
+#include "PSync/detail/util.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-partial-producer.cpp b/tests/test-partial-producer.cpp
index 9555c7d..49c5264 100644
--- a/tests/test-partial-producer.cpp
+++ b/tests/test-partial-producer.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "partial-producer.hpp"
+#include "PSync/partial-producer.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-partial-sync.cpp b/tests/test-partial-sync.cpp
index d4c1784..e3c25b0 100644
--- a/tests/test-partial-sync.cpp
+++ b/tests/test-partial-sync.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "partial-producer.hpp"
-#include "consumer.hpp"
+#include "PSync/partial-producer.hpp"
+#include "PSync/consumer.hpp"
#include "unit-test-time-fixture.hpp"
#include <boost/test/unit_test.hpp>
diff --git a/tests/test-producer-base.cpp b/tests/test-producer-base.cpp
index 9664b04..baa88a6 100644
--- a/tests/test-producer-base.cpp
+++ b/tests/test-producer-base.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "producer-base.hpp"
-#include "detail/util.hpp"
+#include "PSync/producer-base.hpp"
+#include "PSync/detail/util.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/tests/test-segment-publisher.cpp b/tests/test-segment-publisher.cpp
index db81f30..358e1f2 100644
--- a/tests/test-segment-publisher.cpp
+++ b/tests/test-segment-publisher.cpp
@@ -17,8 +17,8 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "segment-publisher.hpp"
-#include "detail/state.hpp"
+#include "PSync/segment-publisher.hpp"
+#include "PSync/detail/state.hpp"
#include "unit-test-time-fixture.hpp"
#include <boost/test/unit_test.hpp>
diff --git a/tests/test-state.cpp b/tests/test-state.cpp
index 956bbbd..cb53bd5 100644
--- a/tests/test-state.cpp
+++ b/tests/test-state.cpp
@@ -17,7 +17,7 @@
* PSync, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
**/
-#include "detail/state.hpp"
+#include "PSync/detail/state.hpp"
#include <boost/test/unit_test.hpp>
#include <ndn-cxx/name.hpp>
diff --git a/wscript b/wscript
index a815deb..447f6b5 100644
--- a/wscript
+++ b/wscript
@@ -45,26 +45,23 @@
# system has a different version of the PSync library installed.
conf.env['STLIBPATH'] = ['.'] + conf.env['STLIBPATH']
- conf.write_config_header('psync-config.hpp')
+ conf.write_config_header('PSync/detail/config.hpp')
def build(bld):
bld.shlib(
target='PSync',
- source = bld.path.ant_glob(['src/**/*.cpp']),
+ source = bld.path.ant_glob('PSync/**/*.cpp'),
use = 'BOOST NDN_CXX',
- includes = ['src', '.'],
- export_includes=['src', '.'],
+ includes = '.',
+ export_includes='.',
)
- bld.install_files(
- dest = "%s/PSync" % bld.env['INCLUDEDIR'],
- files = bld.path.ant_glob(['src/**/*.hpp', 'src/**/*.h']),
- cwd = bld.path.find_dir("src"),
- relative_trick = True,
- )
+ headers = bld.path.ant_glob('PSync/**/*.hpp')
- bld.install_files('%s/PSync' % bld.env['INCLUDEDIR'],
- bld.path.find_resource('psync-config.hpp'))
+ bld.install_files(bld.env['INCLUDEDIR'], headers, relative_trick=True)
+
+ bld.install_files('${INCLUDEDIR}/PSync/detail',
+ bld.path.find_resource('PSync/detail/config.hpp'))
pc = bld(
features = "subst",
@@ -72,7 +69,7 @@
target='PSync.pc',
install_path = '${LIBDIR}/pkgconfig',
PREFIX = bld.env['PREFIX'],
- INCLUDEDIR = "%s/PSync" % bld.env['INCLUDEDIR'],
+ INCLUDEDIR = bld.env['INCLUDEDIR'],
VERSION = VERSION,
)