aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:21:12 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-04-30 23:26:21 +0300
commit0ffb0a1a0a13d07c4448f7752232d8854b790623 (patch)
tree9d1e173375d53e05c52568dc69633ed98697190d
parent1364413cee696ff60f4dd1e3ac1eb281ac7a4e8f (diff)
Add hxx extension for headers and lib prefix for library dirs
-rw-r--r--bbot/.gitignore3
-rw-r--r--bbot/agent.cxx18
-rw-r--r--bbot/agent.hxx (renamed from bbot/agent)14
-rw-r--r--bbot/bootstrap-manifest.cxx2
-rw-r--r--bbot/bootstrap-manifest.hxx (renamed from bbot/bootstrap-manifest)12
-rw-r--r--bbot/buildfile10
-rw-r--r--bbot/common.cli2
-rw-r--r--bbot/diagnostics.cxx4
-rw-r--r--bbot/diagnostics.hxx (renamed from bbot/diagnostics)10
-rw-r--r--bbot/machine-manifest.cxx2
-rw-r--r--bbot/machine-manifest.hxx (renamed from bbot/machine-manifest)16
-rw-r--r--bbot/machine.cxx6
-rw-r--r--bbot/machine.hxx (renamed from bbot/machine)12
-rw-r--r--bbot/tftp.cxx4
-rw-r--r--bbot/tftp.hxx (renamed from bbot/tftp)12
-rw-r--r--bbot/types-parsers.cxx4
-rw-r--r--bbot/types-parsers.hxx (renamed from bbot/types-parsers)10
-rw-r--r--bbot/types.hxx (renamed from bbot/types)8
-rw-r--r--bbot/utility.cxx4
-rw-r--r--bbot/utility.hxx (renamed from bbot/utility)12
-rw-r--r--bbot/utility.txx2
-rw-r--r--bbot/version.hxx.in (renamed from bbot/version-impl.in)4
-rw-r--r--bbot/worker.cxx12
-rw-r--r--build/root.build2
-rw-r--r--buildfile3
-rw-r--r--tests/.gitignore2
-rw-r--r--unit-tests/.gitignore2
-rw-r--r--unit-tests/bootstrap-manifest/driver.cxx8
28 files changed, 102 insertions, 98 deletions
diff --git a/bbot/.gitignore b/bbot/.gitignore
index 59e9ffd..e7ffd50 100644
--- a/bbot/.gitignore
+++ b/bbot/.gitignore
@@ -1,5 +1,4 @@
-*-options
*-options.?xx
bbot-agent
bbot-worker
-version-impl
+version.hxx
diff --git a/bbot/agent.cxx b/bbot/agent.cxx
index 7e0021a..6b59092 100644
--- a/bbot/agent.cxx
+++ b/bbot/agent.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/agent>
+#include <bbot/agent.hxx>
#include <pwd.h> // getpwuid()
#include <limits.h> // PATH_MAX
@@ -22,16 +22,16 @@
#include <butl/pager>
#include <butl/filesystem> // dir_iterator
-#include <bbot/manifest>
+#include <libbbot/manifest.hxx>
-#include <bbot/types>
-#include <bbot/utility>
-#include <bbot/diagnostics>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
+#include <bbot/diagnostics.hxx>
-#include <bbot/tftp>
-#include <bbot/machine>
-#include <bbot/machine-manifest>
-#include <bbot/bootstrap-manifest>
+#include <bbot/tftp.hxx>
+#include <bbot/machine.hxx>
+#include <bbot/machine-manifest.hxx>
+#include <bbot/bootstrap-manifest.hxx>
using namespace std;
using namespace butl;
diff --git a/bbot/agent b/bbot/agent.hxx
index 990ad2d..e5115ae 100644
--- a/bbot/agent
+++ b/bbot/agent.hxx
@@ -1,16 +1,16 @@
-// file : bbot/agent -*- C++ -*-
+// file : bbot/agent.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_AGENT
-#define BBOT_AGENT
+#ifndef BBOT_AGENT_HXX
+#define BBOT_AGENT_HXX
#include <sys/types.h> // uid_t
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
-#include <bbot/agent-options>
+#include <bbot/agent-options.hxx>
namespace bbot
{
@@ -41,4 +41,4 @@ namespace bbot
iface_addr (const string&);
}
-#endif // BBOT_AGENT
+#endif // BBOT_AGENT_HXX
diff --git a/bbot/bootstrap-manifest.cxx b/bbot/bootstrap-manifest.cxx
index 6a0ff8d..0d6e6b5 100644
--- a/bbot/bootstrap-manifest.cxx
+++ b/bbot/bootstrap-manifest.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/bootstrap-manifest>
+#include <bbot/bootstrap-manifest.hxx>
#include <butl/manifest-parser>
#include <butl/manifest-serializer>
diff --git a/bbot/bootstrap-manifest b/bbot/bootstrap-manifest.hxx
index 94a2a24..9d583ad 100644
--- a/bbot/bootstrap-manifest
+++ b/bbot/bootstrap-manifest.hxx
@@ -1,16 +1,16 @@
-// file : bbot/bootstrap-manifest -*- C++ -*-
+// file : bbot/bootstrap-manifest.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_BOOTSTRAP_MANIFEST
-#define BBOT_BOOTSTRAP_MANIFEST
+#ifndef BBOT_BOOTSTRAP_MANIFEST_HXX
+#define BBOT_BOOTSTRAP_MANIFEST_HXX
#include <map>
#include <butl/manifest-forward>
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
namespace bbot
{
@@ -47,4 +47,4 @@ namespace bbot
};
}
-#endif // BBOT_BOOTSTRAP_MANIFEST
+#endif // BBOT_BOOTSTRAP_MANIFEST_HXX
diff --git a/bbot/buildfile b/bbot/buildfile
index 962d379..ccfc837 100644
--- a/bbot/buildfile
+++ b/bbot/buildfile
@@ -35,7 +35,7 @@ if ($cxx.target.class == "linux")
{hxx }{ types } \
{hxx cxx}{ types-parsers } \
{hxx txx cxx}{ utility } \
- {hxx }{ version-impl } \
+ {hxx }{ version } \
$libs
}
@@ -49,11 +49,11 @@ exe{bbot-worker}: \
{hxx }{ types } \
{hxx cxx}{ types-parsers } \
{hxx txx cxx}{ utility } \
-{hxx }{ version-impl } \
+{hxx }{ version } \
$libs
-hxx{version-impl}: in{version-impl} $src_root/file{manifest}
-hxx{version-impl}: dist = true
+hxx{version}: in{version} $src_root/file{manifest}
+hxx{version}: dist = true
# Generated options parser.
#
@@ -64,7 +64,7 @@ if $cli.configured
cli.cxx{worker-options}: cli{worker}
cli.options += -I $src_root --include-with-brackets --include-prefix bbot \
---guard-prefix BBOT --cxx-prologue "#include <bbot/types-parsers>" \
+--guard-prefix BBOT --cxx-prologue "#include <bbot/types-parsers.hxx>" \
--cli-namespace bbot::cli --generate-specifier --generate-parse
cli.cxx{common-options}: cli.options = $cli.options # No usage.
diff --git a/bbot/common.cli b/bbot/common.cli
index 6bbd48b..b58fa93 100644
--- a/bbot/common.cli
+++ b/bbot/common.cli
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-include <bbot/types>;
+include <bbot/types.hxx>;
namespace bbot
{
diff --git a/bbot/diagnostics.cxx b/bbot/diagnostics.cxx
index c6008c6..f3a2bb9 100644
--- a/bbot/diagnostics.cxx
+++ b/bbot/diagnostics.cxx
@@ -2,9 +2,9 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/diagnostics>
+#include <bbot/diagnostics.hxx>
-#include <bbot/utility>
+#include <bbot/utility.hxx>
using namespace std;
using namespace butl;
diff --git a/bbot/diagnostics b/bbot/diagnostics.hxx
index 60df57c..07052a0 100644
--- a/bbot/diagnostics
+++ b/bbot/diagnostics.hxx
@@ -1,13 +1,13 @@
-// file : bbot/diagnostics -*- C++ -*-
+// file : bbot/diagnostics.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_DIAGNOSTICS
-#define BBOT_DIAGNOSTICS
+#ifndef BBOT_DIAGNOSTICS_HXX
+#define BBOT_DIAGNOSTICS_HXX
#include <butl/diagnostics>
-#include <bbot/types> // Note: not <bbot/utility>.
+#include <bbot/types.hxx> // Note: not <bbot/utility>.
namespace bbot
{
@@ -163,4 +163,4 @@ namespace bbot
systemd_diagnostics (bool with_critical);
}
-#endif // BBOT_DIAGNOSTICS
+#endif // BBOT_DIAGNOSTICS_HXX
diff --git a/bbot/machine-manifest.cxx b/bbot/machine-manifest.cxx
index acb9d27..54ed43f 100644
--- a/bbot/machine-manifest.cxx
+++ b/bbot/machine-manifest.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/machine-manifest>
+#include <bbot/machine-manifest.hxx>
#include <butl/string-parser>
#include <butl/manifest-parser>
diff --git a/bbot/machine-manifest b/bbot/machine-manifest.hxx
index ba27071..fa6139f 100644
--- a/bbot/machine-manifest
+++ b/bbot/machine-manifest.hxx
@@ -1,20 +1,20 @@
-// file : bbot/machine-manifest -*- C++ -*-
+// file : bbot/machine-manifest.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_MACHINE_MANIFEST
-#define BBOT_MACHINE_MANIFEST
+#ifndef BBOT_MACHINE_MANIFEST_HXX
+#define BBOT_MACHINE_MANIFEST_HXX
#include <map>
#include <butl/manifest-forward>
-#include <bbot/manifest> // machine_header
+#include <libbbot/manifest.hxx> // machine_header
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
-#include <bbot/bootstrap-manifest>
+#include <bbot/bootstrap-manifest.hxx>
namespace bbot
{
@@ -115,4 +115,4 @@ namespace bbot
using bootstrapped_machine_manifests = vector<bootstrapped_machine_manifest>;
}
-#endif // BBOT_MACHINE_MANIFEST
+#endif // BBOT_MACHINE_MANIFEST_HXX
diff --git a/bbot/machine.cxx b/bbot/machine.cxx
index 86448cf..bf0c0bf 100644
--- a/bbot/machine.cxx
+++ b/bbot/machine.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/machine>
+#include <bbot/machine.hxx>
#include <unistd.h> // sleep()
@@ -12,8 +12,8 @@
#include <cstdio> // snprintf()
#include <cstring> // strcpy()
-#include <bbot/agent>
-#include <bbot/machine-manifest>
+#include <bbot/agent.hxx>
+#include <bbot/machine-manifest.hxx>
using namespace std;
using namespace butl;
diff --git a/bbot/machine b/bbot/machine.hxx
index f99d11b..9ea0d48 100644
--- a/bbot/machine
+++ b/bbot/machine.hxx
@@ -1,12 +1,12 @@
-// file : bbot/machine -*- C++ -*-
+// file : bbot/machine.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_MACHINE
-#define BBOT_MACHINE
+#ifndef BBOT_MACHINE_HXX
+#define BBOT_MACHINE_HXX
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
namespace bbot
{
@@ -79,4 +79,4 @@ namespace bbot
uint16_t tftp_port);
}
-#endif // BBOT_MACHINE
+#endif // BBOT_MACHINE_HXX
diff --git a/bbot/tftp.cxx b/bbot/tftp.cxx
index 862a0e4..70cc85d 100644
--- a/bbot/tftp.cxx
+++ b/bbot/tftp.cxx
@@ -2,7 +2,7 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/tftp>
+#include <bbot/tftp.hxx>
#include <arpa/inet.h> // htonl()
#include <netinet/in.h> // sockaddr_in
@@ -11,7 +11,7 @@
#include <cstring> // memset()
-#include <bbot/agent>
+#include <bbot/agent.hxx>
using namespace std;
using namespace butl;
diff --git a/bbot/tftp b/bbot/tftp.hxx
index 5433b89..c9a88c9 100644
--- a/bbot/tftp
+++ b/bbot/tftp.hxx
@@ -1,12 +1,12 @@
-// file : bbot/tftp -*- C++ -*-
+// file : bbot/tftp.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_TFTP
-#define BBOT_TFTP
+#ifndef BBOT_TFTP_HXX
+#define BBOT_TFTP_HXX
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
namespace bbot
{
@@ -42,4 +42,4 @@ namespace bbot
};
}
-#endif // BBOT_TFTP
+#endif // BBOT_TFTP_HXX
diff --git a/bbot/types-parsers.cxx b/bbot/types-parsers.cxx
index 83a67d6..1d0a250 100644
--- a/bbot/types-parsers.cxx
+++ b/bbot/types-parsers.cxx
@@ -2,9 +2,9 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/types-parsers>
+#include <bbot/types-parsers.hxx>
-#include <bbot/common-options> // bbot::cli namespace
+#include <bbot/common-options.hxx> // bbot::cli namespace
namespace bbot
{
diff --git a/bbot/types-parsers b/bbot/types-parsers.hxx
index de3deb8..eef3418 100644
--- a/bbot/types-parsers
+++ b/bbot/types-parsers.hxx
@@ -1,14 +1,14 @@
-// file : bbot/types-parsers -*- C++ -*-
+// file : bbot/types-parsers.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
// CLI parsers, included into the generated source files.
//
-#ifndef BBOT_TYPES_PARSERS
-#define BBOT_TYPES_PARSERS
+#ifndef BBOT_TYPES_PARSERS_HXX
+#define BBOT_TYPES_PARSERS_HXX
-#include <bbot/types>
+#include <bbot/types.hxx>
namespace bbot
{
@@ -35,4 +35,4 @@ namespace bbot
}
}
-#endif // BBOT_TYPES_PARSERS
+#endif // BBOT_TYPES_PARSERS_HXX
diff --git a/bbot/types b/bbot/types.hxx
index e4af01e..20f9f23 100644
--- a/bbot/types
+++ b/bbot/types.hxx
@@ -1,9 +1,9 @@
-// file : bbot/types -*- C++ -*-
+// file : bbot/types.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_TYPES
-#define BBOT_TYPES
+#ifndef BBOT_TYPES_HXX
+#define BBOT_TYPES_HXX
#include <vector>
#include <string>
@@ -104,4 +104,4 @@ namespace std
}
}
-#endif // BBOT_TYPES
+#endif // BBOT_TYPES_HXX
diff --git a/bbot/utility.cxx b/bbot/utility.cxx
index 6fcc463..ea62ac2 100644
--- a/bbot/utility.cxx
+++ b/bbot/utility.cxx
@@ -2,9 +2,9 @@
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#include <bbot/utility>
+#include <bbot/utility.hxx>
-#include <bbot/diagnostics>
+#include <bbot/diagnostics.hxx>
using namespace std;
using namespace butl;
diff --git a/bbot/utility b/bbot/utility.hxx
index 3424f2b..50756dd 100644
--- a/bbot/utility
+++ b/bbot/utility.hxx
@@ -1,9 +1,9 @@
-// file : bbot/utility -*- C++ -*-
+// file : bbot/utility.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
-#ifndef BBOT_UTILITY
-#define BBOT_UTILITY
+#ifndef BBOT_UTILITY_HXX
+#define BBOT_UTILITY_HXX
#include <memory> // make_shared()
#include <string> // to_string(), stoull()
@@ -20,8 +20,8 @@
#include <butl/fdstream>
#include <butl/filesystem>
-#include <bbot/types>
-#include <bbot/version-impl>
+#include <bbot/types.hxx>
+#include <bbot/version.hxx>
namespace bbot
{
@@ -161,4 +161,4 @@ namespace bbot
#include <bbot/utility.txx>
-#endif // BBOT_UTILITY
+#endif // BBOT_UTILITY_HXX
diff --git a/bbot/utility.txx b/bbot/utility.txx
index 231bd8f..c35db33 100644
--- a/bbot/utility.txx
+++ b/bbot/utility.txx
@@ -9,7 +9,7 @@
#include <butl/manifest-parser>
#include <butl/manifest-serializer>
-#include <bbot/diagnostics>
+#include <bbot/diagnostics.hxx>
namespace bbot
{
diff --git a/bbot/version-impl.in b/bbot/version.hxx.in
index baf6f4f..9f451e8 100644
--- a/bbot/version-impl.in
+++ b/bbot/version.hxx.in
@@ -1,4 +1,4 @@
-// file : bbot/version-impl.in -*- C++ -*-
+// file : bbot/version.hxx.in -*- C++ -*-
// copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
// license : TBC; see accompanying LICENSE file
@@ -41,7 +41,7 @@
$libbutl.check(LIBBUTL_VERSION, LIBBUTL_SNAPSHOT)$
-#include <bbot/version>
+#include <libbbot/version.hxx>
$libbbot.check(LIBBBOT_VERSION, LIBBBOT_SNAPSHOT)$
diff --git a/bbot/worker.cxx b/bbot/worker.cxx
index af1429c..f777e30 100644
--- a/bbot/worker.cxx
+++ b/bbot/worker.cxx
@@ -13,14 +13,14 @@
#include <butl/pager>
#include <butl/filesystem>
-#include <bbot/manifest>
+#include <libbbot/manifest.hxx>
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
-#include <bbot/diagnostics>
-#include <bbot/worker-options>
-#include <bbot/bootstrap-manifest>
+#include <bbot/diagnostics.hxx>
+#include <bbot/worker-options.hxx>
+#include <bbot/bootstrap-manifest.hxx>
using namespace std;
using namespace butl;
diff --git a/build/root.build b/build/root.build
index b299a5d..4661de1 100644
--- a/build/root.build
+++ b/build/root.build
@@ -6,7 +6,7 @@ cxx.std = latest
using cxx
-hxx{*}: extension =
+hxx{*}: extension = hxx
ixx{*}: extension = ixx
txx{*}: extension = txx
cxx{*}: extension = cxx
diff --git a/buildfile b/buildfile
index 3ff0861..6b5add5 100644
--- a/buildfile
+++ b/buildfile
@@ -2,7 +2,8 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : TBC; see accompanying LICENSE file
-./: bbot/ etc/ unit-tests/ doc{INSTALL LICENSE NEWS README version} file{manifest}
+./: bbot/ etc/ unit-tests/ doc{INSTALL LICENSE NEWS README version} \
+ file{manifest}
doc{version}: file{manifest} # Generated by the version module.
doc{version}: dist = true
diff --git a/tests/.gitignore b/tests/.gitignore
new file mode 100644
index 0000000..35ec43f
--- /dev/null
+++ b/tests/.gitignore
@@ -0,0 +1,2 @@
+test/
+test-*/
diff --git a/unit-tests/.gitignore b/unit-tests/.gitignore
index e54525b..2e508a9 100644
--- a/unit-tests/.gitignore
+++ b/unit-tests/.gitignore
@@ -1 +1,3 @@
driver
+test/
+test-*/
diff --git a/unit-tests/bootstrap-manifest/driver.cxx b/unit-tests/bootstrap-manifest/driver.cxx
index 46e64bc..1412c21 100644
--- a/unit-tests/bootstrap-manifest/driver.cxx
+++ b/unit-tests/bootstrap-manifest/driver.cxx
@@ -8,11 +8,11 @@
#include <butl/manifest-parser>
#include <butl/manifest-serializer>
-#include <bbot/types>
-#include <bbot/utility>
+#include <bbot/types.hxx>
+#include <bbot/utility.hxx>
-#include <bbot/bootstrap-manifest>
-#include <bbot/machine-manifest>
+#include <bbot/bootstrap-manifest.hxx>
+#include <bbot/machine-manifest.hxx>
using namespace std;
using namespace butl;