|
|
|
|
|
|
|
|
#include "BBParser.h" |
|
|
#include "BBParser.h" |
|
|
#include "CompileStep.h" |
|
|
#include "CompileStep.h" |
|
|
#include "LinkStep.h" |
|
|
#include "LinkStep.h" |
|
|
|
|
|
#include "logger.h" |
|
|
|
|
|
|
|
|
static std::string extension(const std::string &path) { |
|
|
static std::string extension(const std::string &path) { |
|
|
size_t idx = path.find_last_of('.'); |
|
|
size_t idx = path.find_last_of('.'); |
|
|
|
|
|
|
|
|
const std::string &dir, const std::string &name, |
|
|
const std::string &dir, const std::string &name, |
|
|
const BBVariables &variables, std::vector<std::unique_ptr<DepNode>> &deps) { |
|
|
const BBVariables &variables, std::vector<std::unique_ptr<DepNode>> &deps) { |
|
|
std::string path = dir + "/" + name; |
|
|
std::string path = dir + "/" + name; |
|
|
sys::FileInfo info = sys::fileInfo(path); |
|
|
|
|
|
|
|
|
sys::FileInfo info; |
|
|
|
|
|
try { |
|
|
|
|
|
info = sys::fileInfo(path); |
|
|
|
|
|
} catch (std::exception &ex) { |
|
|
|
|
|
logger::log(ex.what()); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (info.isDir) { |
|
|
if (info.isDir) { |
|
|
// May or may not need to copy variables |
|
|
// May or may not need to copy variables |