From 64c18110fda18065390e4937a633aef9c63ce271 Mon Sep 17 00:00:00 2001 From: Daniel Richman Date: Tue, 4 Sep 2012 01:48:34 +0100 Subject: [PATCH] Split sources and headers into two directories --- Makefile | 6 ++---- README.md | 7 +++++++ {src => habitat}/CouchDB.h | 2 +- {src => habitat}/EZ.h | 0 {src => habitat}/Extractor.h | 4 ++-- {src => habitat}/RFC3339.h | 0 {src => habitat}/UKHASExtractor.h | 2 +- {src => habitat}/Uploader.h | 4 ++-- {src => habitat}/UploaderThread.h | 4 ++-- src/CouchDB.cxx | 4 ++-- src/EZ.cxx | 2 +- src/Extractor.cxx | 4 ++-- src/RFC3339.cxx | 2 +- src/UKHASExtractor.cxx | 2 +- src/Uploader.cxx | 8 ++++---- src/UploaderThread.cxx | 2 +- tests/test_extractor_main.cxx | 4 ++-- tests/test_rfc3339_main.cxx | 2 +- tests/test_uploader_main.cxx | 6 +++--- 19 files changed, 35 insertions(+), 30 deletions(-) rename {src => habitat}/CouchDB.h (98%) rename {src => habitat}/EZ.h (100%) rename {src => habitat}/Extractor.h (95%) rename {src => habitat}/RFC3339.h (100%) rename {src => habitat}/UKHASExtractor.h (95%) rename {src => habitat}/Uploader.h (97%) rename {src => habitat}/UploaderThread.h (98%) diff --git a/Makefile b/Makefile index 03216a1..efac807 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ ssl_cflags := $(shell pkg-config --cflags openssl) ssl_libs := $(shell pkg-config --libs openssl) CFLAGS = -pthread -O2 -Wall -Werror -pedantic -Wno-long-long \ - -Wno-variadic-macros -Isrc \ + -Wno-variadic-macros -I. \ $(jsoncpp_cflags) $(curl_cflags) $(ssl_cflags) CFLAGS_JSONCPP = -pthread -O2 -Wall $(jsoncpp_cflags) upl_libs = -pthread $(curl_libs) $(ssl_libs) @@ -17,9 +17,7 @@ ext_libs = $(jsoncpp_libs) rfc_libs = $(jsoncpp_libs) test_py_files = tests/test_uploader.py tests/test_extractor.py -headers = src/CouchDB.h src/EZ.h src/RFC3339.h \ - src/Uploader.h src/UploaderThread.h \ - src/Extractor.h src/UKHASExtractor.h \ +headers = $(wildcard habitat/*.h) \ tests/test_extractor_mocks.h rfc_cxxfiles = src/RFC3339.cxx tests/test_rfc3339_main.cxx rfc_binary = tests/rfc3339 diff --git a/README.md b/README.md index de7d8bf..81af58d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ habitat cpp uploader (see habitat.uploader.Uploader) ==================================================== +Directories +----------- + + - jsoncpp: bundled library + - habitat: headers (i.e., #include "habitat/CouchDB.h") + - src: sources + License ------- diff --git a/src/CouchDB.h b/habitat/CouchDB.h similarity index 98% rename from src/CouchDB.h rename to habitat/CouchDB.h index c1ba052..a82e2af 100644 --- a/src/CouchDB.h +++ b/habitat/CouchDB.h @@ -10,7 +10,7 @@ #include #include "jsoncpp.h" -#include "EZ.h" +#include "habitat/EZ.h" using namespace std; diff --git a/src/EZ.h b/habitat/EZ.h similarity index 100% rename from src/EZ.h rename to habitat/EZ.h diff --git a/src/Extractor.h b/habitat/Extractor.h similarity index 95% rename from src/Extractor.h rename to habitat/Extractor.h index bbc9a4a..e5db481 100644 --- a/src/Extractor.h +++ b/habitat/Extractor.h @@ -5,8 +5,8 @@ #include #include "jsoncpp.h" -#include "UploaderThread.h" -#include "EZ.h" +#include "habitat/UploaderThread.h" +#include "habitat/EZ.h" using namespace std; diff --git a/src/RFC3339.h b/habitat/RFC3339.h similarity index 100% rename from src/RFC3339.h rename to habitat/RFC3339.h diff --git a/src/UKHASExtractor.h b/habitat/UKHASExtractor.h similarity index 95% rename from src/UKHASExtractor.h rename to habitat/UKHASExtractor.h index a21ead6..65f2dc9 100644 --- a/src/UKHASExtractor.h +++ b/habitat/UKHASExtractor.h @@ -3,7 +3,7 @@ #ifndef HABITAT_UKHAS_EXTRACTOR_H #define HABITAT_UKHAS_EXTRACTOR_H -#include "Extractor.h" +#include "habitat/Extractor.h" namespace habitat { diff --git a/src/Uploader.h b/habitat/Uploader.h similarity index 97% rename from src/Uploader.h rename to habitat/Uploader.h index 1e055fb..b118404 100644 --- a/src/Uploader.h +++ b/habitat/Uploader.h @@ -8,8 +8,8 @@ #include #include #include "jsoncpp.h" -#include "EZ.h" -#include "CouchDB.h" +#include "habitat/EZ.h" +#include "habitat/CouchDB.h" using namespace std; diff --git a/src/UploaderThread.h b/habitat/UploaderThread.h similarity index 98% rename from src/UploaderThread.h rename to habitat/UploaderThread.h index 847607f..fcf7bb5 100644 --- a/src/UploaderThread.h +++ b/habitat/UploaderThread.h @@ -3,10 +3,10 @@ #ifndef HABITAT_UPLOADERTHREAD_H #define HABITAT_UPLOADERTHREAD_H -#include "EZ.h" -#include "Uploader.h" #include #include "jsoncpp.h" +#include "habitat/EZ.h" +#include "habitat/Uploader.h" using namespace std; diff --git a/src/CouchDB.cxx b/src/CouchDB.cxx index 554b6f7..cd4ffe1 100644 --- a/src/CouchDB.cxx +++ b/src/CouchDB.cxx @@ -1,11 +1,11 @@ /* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */ -#include "CouchDB.h" +#include "habitat/CouchDB.h" #include #include #include #include -#include "EZ.h" +#include "habitat/EZ.h" using namespace std; diff --git a/src/EZ.cxx b/src/EZ.cxx index 076ca08..269234c 100644 --- a/src/EZ.cxx +++ b/src/EZ.cxx @@ -1,6 +1,6 @@ /* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */ -#include "EZ.h" +#include "habitat/EZ.h" #include #include #include diff --git a/src/Extractor.cxx b/src/Extractor.cxx index 025b625..09e7be3 100644 --- a/src/Extractor.cxx +++ b/src/Extractor.cxx @@ -1,8 +1,8 @@ /* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see COPYING. */ -#include "Extractor.h" +#include "habitat/Extractor.h" #include -#include "EZ.h" +#include "habitat/EZ.h" namespace habitat { diff --git a/src/RFC3339.cxx b/src/RFC3339.cxx index e96714e..54b1a1f 100644 --- a/src/RFC3339.cxx +++ b/src/RFC3339.cxx @@ -1,6 +1,6 @@ /* Copyright 2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */ -#include "RFC3339.h" +#include "habitat/RFC3339.h" #include #include diff --git a/src/UKHASExtractor.cxx b/src/UKHASExtractor.cxx index c2126af..0155c1c 100644 --- a/src/UKHASExtractor.cxx +++ b/src/UKHASExtractor.cxx @@ -1,6 +1,6 @@ /* Copyright 2011 (C) Daniel Richman. License: GNU GPL 3; see COPYING. */ -#include "UKHASExtractor.h" +#include "habitat/UKHASExtractor.h" #include #include #include diff --git a/src/Uploader.cxx b/src/Uploader.cxx index e68c053..8c71514 100644 --- a/src/Uploader.cxx +++ b/src/Uploader.cxx @@ -1,6 +1,6 @@ /* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */ -#include "Uploader.h" +#include "habitat/Uploader.h" #include #include #include @@ -9,9 +9,9 @@ #include #include #include -#include "CouchDB.h" -#include "EZ.h" -#include "RFC3339.h" +#include "habitat/CouchDB.h" +#include "habitat/EZ.h" +#include "habitat/RFC3339.h" using namespace std; diff --git a/src/UploaderThread.cxx b/src/UploaderThread.cxx index 5b6680c..a74ccdd 100644 --- a/src/UploaderThread.cxx +++ b/src/UploaderThread.cxx @@ -1,6 +1,6 @@ /* Copyright 2011-2012 (C) Daniel Richman. License: GNU GPL 3; see LICENSE. */ -#include "UploaderThread.h" +#include "habitat/UploaderThread.h" #include #include diff --git a/tests/test_extractor_main.cxx b/tests/test_extractor_main.cxx index ba06a65..d62f737 100644 --- a/tests/test_extractor_main.cxx +++ b/tests/test_extractor_main.cxx @@ -5,8 +5,8 @@ #include #include "jsoncpp.h" -#include "Extractor.h" -#include "UKHASExtractor.h" +#include "habitat/Extractor.h" +#include "habitat/UKHASExtractor.h" using namespace std; diff --git a/tests/test_rfc3339_main.cxx b/tests/test_rfc3339_main.cxx index 002d782..62a0206 100644 --- a/tests/test_rfc3339_main.cxx +++ b/tests/test_rfc3339_main.cxx @@ -5,7 +5,7 @@ #include #include "jsoncpp.h" -#include "RFC3339.h" +#include "habitat/RFC3339.h" using namespace std; diff --git a/tests/test_uploader_main.cxx b/tests/test_uploader_main.cxx index 6c41e6b..7843e37 100644 --- a/tests/test_uploader_main.cxx +++ b/tests/test_uploader_main.cxx @@ -5,11 +5,11 @@ #include #include -#include "EZ.h" -#include "Uploader.h" +#include "habitat/EZ.h" +#include "habitat/Uploader.h" #ifdef THREADED -#include "UploaderThread.h" +#include "habitat/UploaderThread.h" #endif using namespace std;