summaryrefslogtreecommitdiffhomepage
path: root/dev/BuildKit
diff options
context:
space:
mode:
Diffstat (limited to 'dev/BuildKit')
-rw-r--r--dev/BuildKit/Defines.h8
-rw-r--r--dev/BuildKit/IManifestBuilder.h24
-rw-r--r--dev/BuildKit/Imports.h4
-rw-r--r--dev/BuildKit/JSONManifestBuilder.h18
-rw-r--r--dev/BuildKit/TOMLManifestBuilder.h18
5 files changed, 50 insertions, 22 deletions
diff --git a/dev/BuildKit/Defines.h b/dev/BuildKit/Defines.h
index 4774c85..1c88ceb 100644
--- a/dev/BuildKit/Defines.h
+++ b/dev/BuildKit/Defines.h
@@ -7,12 +7,16 @@
#include <BuildKit/Imports.h>
+/// =========================================================== ///
+/// @brief Defines file
+/// =========================================================== ///
+
#define LIKELY(ARG) ((ARG) ? assert(false) : ((void) 0))
#define UNLIKELY(ARG) LIKELY(!(ARG))
-#define LIBNEBUILD_VERSION "v0.0.1-libNeBuild"
+#define LIBNEBUILD_VERSION "v0.0.7-buildkit"
-#define LIBNEBUILD_VERSION_BCD 0x0001
+#define LIBNEBUILD_VERSION_BCD 0x0007
#define LIBNEBUILD_VERSION_MAJOR 1
#define LIBNEBUILD_VERSION_MINOR 1
diff --git a/dev/BuildKit/IManifestBuilder.h b/dev/BuildKit/IManifestBuilder.h
index 8f9b2cf..abb389f 100644
--- a/dev/BuildKit/IManifestBuilder.h
+++ b/dev/BuildKit/IManifestBuilder.h
@@ -7,11 +7,13 @@
#include <BuildKit/Defines.h>
-#define NEBUILD_MANIFEST_BUILDER : public NeBuild::IManifestBuilder
+#define NEBUILD_MANIFEST_BUILDER : public ::NeBuild::IManifestBuilder
namespace NeBuild {
+/// =========================================================== ///
/// @brief Builder interface class.
/// @note This class is meant to be used as an interface.
+/// =========================================================== ///
class IManifestBuilder {
public:
IManifestBuilder() = default;
@@ -20,12 +22,18 @@ class IManifestBuilder {
IManifestBuilder& operator=(const IManifestBuilder&) = default;
IManifestBuilder(const IManifestBuilder&) = default;
- /// @brief Builds a target using the implemented laguage.
- /// @param arg_sz filename size
- /// @param arg_val filename path.
- /// @retval true succeeded.
- /// @retval false failed.
- virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0;
- virtual const char* BuildSystem() = 0;
+ /// =========================================================== ///
+ /// @brief Builds a TOML target from a file.
+ /// @param arg_sz filename size (must be 1 or greater).
+ /// @param arg_val filename path (must be a valid language file).
+ /// @retval true building has succeeded.
+ /// @retval false fail to build, see error message.
+ /// =========================================================== ///
+ virtual bool BuildTarget(const std::string& arg, const bool dry_run = false) = 0;
+
+ /// =========================================================== ///
+ /// @brief Returns the build system name.
+ /// =========================================================== ///
+ virtual const char* BuildSystem() = 0;
};
} // namespace NeBuild \ No newline at end of file
diff --git a/dev/BuildKit/Imports.h b/dev/BuildKit/Imports.h
index e22c933..33e1e31 100644
--- a/dev/BuildKit/Imports.h
+++ b/dev/BuildKit/Imports.h
@@ -6,6 +6,10 @@
#ifndef NEBUILD_INCLUDES_H
#define NEBUILD_INCLUDES_H
+/// =========================================================== ///
+/// @brief Imports file
+/// =========================================================== ///
+
#include <rang/rang.h>
#include <cassert>
#include <cstddef>
diff --git a/dev/BuildKit/JSONManifestBuilder.h b/dev/BuildKit/JSONManifestBuilder.h
index 81643e3..438bdab 100644
--- a/dev/BuildKit/JSONManifestBuilder.h
+++ b/dev/BuildKit/JSONManifestBuilder.h
@@ -22,12 +22,18 @@ class JSONManifestBuilder final NEBUILD_MANIFEST_BUILDER {
JSONManifestBuilder(const JSONManifestBuilder&) = default;
public:
- /// @brief Builds a JSON target.
- /// @param arg_sz filename size
- /// @param arg_val filename path.
- /// @retval true build succeeded.
- /// @retval false failed to build.
- bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override;
+ /// =========================================================== ///
+ /// @brief Builds a JSON target from a JSON file.
+ /// @param arg_sz filename size (must be 1 or greater).
+ /// @param arg_val filename path (must be a valid JSON file).
+ /// @retval true building has succeeded.
+ /// @retval false fail to build, see error message.
+ /// =========================================================== ///
+ bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override;
+
+ /// =========================================================== ///
+ /// @brief Returns the build system name.
+ /// =========================================================== ///
const char* BuildSystem() override;
};
} // namespace NeBuild \ No newline at end of file
diff --git a/dev/BuildKit/TOMLManifestBuilder.h b/dev/BuildKit/TOMLManifestBuilder.h
index 6baa9f5..7c508fc 100644
--- a/dev/BuildKit/TOMLManifestBuilder.h
+++ b/dev/BuildKit/TOMLManifestBuilder.h
@@ -22,12 +22,18 @@ class TOMLManifestBuilder final NEBUILD_MANIFEST_BUILDER {
TOMLManifestBuilder(const TOMLManifestBuilder&) = default;
public:
- /// @brief Builds a TOML target.
- /// @param arg_sz filename size
- /// @param arg_val filename path.
- /// @retval true build succeeded.
- /// @retval false failed to build.
- bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override;
+ /// =========================================================== ///
+ /// @brief Builds a TOML target from a TOML file.
+ /// @param arg_sz filename size (must be 1 or greater).
+ /// @param arg_val filename path (must be a valid TOML file).
+ /// @retval true building has succeeded.
+ /// @retval false fail to build, see error message.
+ /// =========================================================== ///
+ bool BuildTarget(const std::string& arg_val, const bool dry_run = false) override;
+
+ /// =========================================================== ///
+ /// @brief Returns the build system name.
+ /// =========================================================== ///
const char* BuildSystem() override;
};
} // namespace NeBuild \ No newline at end of file