diff --git a/C.txt b/C.txt deleted file mode 100644 index 08b91f6..0000000 --- a/C.txt +++ /dev/null @@ -1,46 +0,0 @@ -Inferencing Engine: - -> Target Hash ( name, type ) = Unique ID - -> No more using strings as the identifier. - -> Instead a target's name and its type will generate a unique ID. - -> Everything will be worked in terms of those IDs. - -> Target Usage ( Project, Hash ) = Atom, Lib, Exe, Ambiguous. - -> Result of analyzing a project to obtain a target's usage. - -> Powered by inference, the worst case is ambiguity. - -> - -Other Notes: - -> Everything is a target. - -> There is no longer a distinction between Module/Library/Executable. - -Target Configuration: - -> This is what I am aiming for for bulgogi's self-build: - - bulgogi: - - cmake - - client* - - project - - cmake: - - project - - -> Notice that the name cmake is re-used. This should be an integral feature. - - -Engine Operation: - -> For each sequence event, - -> Add the previous scalar event as a potential target. - -> Add each scalar event in the sequence as potential targets. - -> Stop. - -> For each potential target - -> First assume they are executable. - -> If the same target re-appears, it becomes a library. - -> Stop. - -> Review the list of targets - -> All deps of a library becomes libs themselves. - -> If a target has more than 1 executable dependency, flag ambiguity. - -> Otherwise, generate build files. - -> Done. - -Ambiguity Detection: - -> Ambiguity occurs when more than 1 executable dependencies are - attached to one target. diff --git a/bugs.txt b/bugs.txt deleted file mode 100644 index 9671978..0000000 --- a/bugs.txt +++ /dev/null @@ -1 +0,0 @@ -- Dependencies are not checked for duplicates when added. diff --git a/doxygen b/doxygen index f378252..0e1895b 100644 --- a/doxygen +++ b/doxygen @@ -48,7 +48,7 @@ PROJECT_NAME = "bulgogi" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = C v0.1.15 +PROJECT_NUMBER = C v0.2.2 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/hash_tables.txt b/hash_tables.txt deleted file mode 100644 index 6e0dfb7..0000000 --- a/hash_tables.txt +++ /dev/null @@ -1,9 +0,0 @@ -The 3 properties which comprise rules.yaml patterns (countability, uniqueness and type [fundamental/relational]) can be determined just by scanning symbols in a yaml tree. - -The values of those properties can serve as the indices in a hash table with rule/pattern/fundamental type they align to. - -For example, a symbol with an unlimited count, is shareable and appears at the root level (layer 1) must be a lib. - -Cases in which this 'hash table' accessor leads to more than 1 rule/pattern means ambiguity. - -Rule schemes must be designed such that scanning over symbols and classifying them by these properties does not lead to ambiguity. diff --git a/holy_shit.txt b/holy_shit.txt deleted file mode 100644 index 00c2d63..0000000 --- a/holy_shit.txt +++ /dev/null @@ -1,85 +0,0 @@ -Bulgogi will have a .git equivalent repository (known as .bulgogi or .bul). - -Why? - -Because it can make **any** project conform to a single, homogenous project structure. - -Code hardly takes up disk space, that's not a concern. - -The setup.py script is what bridges/translates all of the custom directory layouts of an existing project into the compatible one. - -Once re-arranged/copied over/translated, the C engine takes over. Following the project.yaml (which works regardless of the dir structure), it can rage on according to the hardcoded format and compile away. - -It also doesn't matter that the setup script is written in python since most of the work is FS I/O. Or maybe I'm wrong here. - -Same idea goes for the build.py. Scan/check for any changes or new files (as directed in the script) and runs bul build. - -In essence, the bulgogi C core is a fixed, stubborn but devilishly fast dependency resolver / build system template generator. -The Python layer is a user-configuration interface which bridges **any** project configuration to fit the bulgogi monolithic paradigm. - -Instead of trying to make every build system fit to any kind of project, you make 1 build system which any project adapts to. - -#------ - -You can't just copy an entire source base into an adjacent directory. - -Would I have the balls to do that and build the linux kernel? Not a chance. - -I'm not sure how I feel about making redundant copies of files or using Python. We'll see in the morning. - -#------ - -git ignore .bul - -.bul - \_ target1.yaml - \_ target2.yaml - \_ ... - \_ build - ---- # target1.yaml -src: -- 'MANTIS-ADCS/src/job.c' -- 'MANTIS-ADCS/src/clear.c' -- 'MANTIS-ADCS/src/indv.c' -- 'MANTIS-ADCS/src/clr.c' -... -inc: -- 'MANTIS-ADCS/inc/adcs.h' -- 'MANTIS-ADCS/inc/adcs_util.h' -- 'MANTIS-ADCS/inc/adcs_inv.h' -- 'MANTIS-ADCS/inc/ext/ext.h' -... -pri: -- 'MANTIS-ADCS/src/priv_uti.h' ---- - -# setup.py -import bulgogi as bul - -bul.new_project('mantis-core') -bul.set_version('v1.0.0') - -target1 = bul.new_target('target1', bul.LIB) -target1.add_sources('MANTIS-ADCS/src/*.c') -target1.add_headers('MANTIS-ADCS/inc/**.h') -target1.add_private('MANTIS-ADCS/src/*.h') - -... - -bul.setup() -# end of setup.py - ---- # project.yaml -libtarget2: -- libtarget1 ---- - -# build.py -import bulgogi as bul - -# Perform any setup/patches needed -... - -bul.build_all() -# end of build.py diff --git a/python.txt b/python.txt deleted file mode 100644 index 60f272a..0000000 --- a/python.txt +++ /dev/null @@ -1,80 +0,0 @@ -- There is nothing that the Python API can do that the engine cannot do. -- Python serves as a scripting interface for the engine, both in terms of configuring and building projects. -- The setup.py script: - - Produces project.yaml and all .bul/** files localizing sources and headers. - - Checks for any dependencies needed. - - Applies patches/etc. -- The build.py script: - - Calls the build engine to build the project. - - Checks for any changes/updates to the underlying structure. - -** Again, all of these operations are done _through_ the engine. There may be a CLI one day, but for now this will be a Python API. - - -Synopsis: - -# setup.py -import bulgogi as bul - -bul.new_project('My Project') -bul.set_version('v1.0.0') - -# Option 1 -bul.add_target('target1', bul.LIB) -bul.add_target('target2', bul.LIB) - -bul.target('target2').add_dep('target1') - -bul.target('target1').add_sources('MANTIS-ADCS/src/*.c') -bul.target('target1').add_headers('MANTIS-ADCS/inc/*.h') - -bul.target('target2').add_sources('arduCAM/v3/source/*.cpp') -bul.target('target2').add_headers('arduCAM/v3/header/*.hpp') -# Opinion: Needlessly long/verbose. -... - -# Option 2 -target1 = bul.add_target('target1', bul.LIB) -target2 = bul.add_target('target2', bul.LIB) - -target2.add_dep(target1) - -target1.add_sources('MANTIS-ADCS/src/*.c') -target1.add_headers('MANTIS-ADCS/inc/*.h') - -target2.add_sources('arduCAM/v3/source/*.cpp') -target2.add_headers('arduCAM/v3/header/*.hpp') -# Opinion: Distracts the dev from the fact that it's the bulgogi engine that's doing the work. -... - -# Option 3 -bul.add_target('target1', bul.LIB) -bul.add_target('target2', bul.LIB) - -bul.add_target_dep('target2', 'target1') - -bul.add_sources('target1', 'MANTIS-ADCS/src/*.c') -bul.add_headers('target1', 'MANTIS-ADCS/inc/*.h') - -bul.add_sources('target2', 'arduCAM/v3/source/*.cpp') -bul.add_headers('target2', 'arduCAM/v3/header/*.hpp') -# Opinion: More concise but remains bulgogi-centric. -... - -# Option 3.5 -target1 = bul.add_target('target1', bul.LIB) -target2 = bul.add_target('target2', bul.LIB) - -bul.add_target_dep(target2, target1) - -bul.add_sources(target1, 'MANTIS-ADCS/src/*.c') -bul.add_headers(target1, 'MANTIS-ADCS/inc/*.h') - -bul.add_sources(target2, 'arduCAM/v3/source/*.cpp') -bul.add_headers(target2, 'arduCAM/v3/header/*.hpp') - -# Opinion: Similar to 3, but the target IDs are returned. -# Still elegant in the low-level sense, but prevents constant name-lookups. -# Refusing to accept name lookups also prevents linking targets which don't exist. - -... diff --git a/readme.md b/readme.md index d4ee5ba..16a811a 100644 --- a/readme.md +++ b/readme.md @@ -1,7 +1,7 @@ ![bulgogi logo](./img/logo.png) # bulgogi -C v0.1.15 +C v0.2.2 ## Overview Bulgogi is a build-system orchestrator written in C. diff --git a/rules.txt b/rules.txt deleted file mode 100644 index acb563e..0000000 --- a/rules.txt +++ /dev/null @@ -1,3 +0,0 @@ -1. Every target starts as an exe. -2. A second apparition makes it into a lib. -3. No exe can depend on more than 1 exe. diff --git a/synopsis.txt b/synopsis.txt deleted file mode 100644 index 0e862f6..0000000 --- a/synopsis.txt +++ /dev/null @@ -1,546 +0,0 @@ -# Bulgogi Synopsis -# C v0.1.15 - -# NOTE: Largely inspired by git cli. - -# Why C? -I care about really good technology. - -Leading all the way up to version InDev v0.8.0, C++ was promising largely thanks to its `std::unordered_map`s and other goodies. - -The C++ community also had 'nice' libraries to offer, like `CLI11` for the arg parser and `yaml-cpp` for the yaml parsing. - -But when a parsing a few lines of yaml and a small CLI set of 5 subcommands grew to generate a 6.65 MB binary, something didn't sit right. - -Proof: --rwxr-xr-x 1 alex staff 6657264 24 Jan 17:41 bul - -The same kind of bad feeling you get when you made too much cereal and had to throw some out. It feels wasteful. - -With this project, there are no corporate deadlines. There are no developer qualms about writing low-level code. - -Quite frankly, my annoyance with the C++ compile times alone brings me sufficient joy to want to spend 10x longer writing C code from scratch. - -I don't just want a tool that does what it promotes - I want good technology. I want the best. - -# Initializes a new bulgogi project in the current dir -bulgogi init - -# Empty projects do not contain anything. - -# Alias: Bulgogi CLI tool should be aliased to `bul`. - -# Adds a module to the bulgogi project -bulgogi module add module1 -bulgogi module add --create telemetry - -# Adds a module to a specific target -# (Adds to the default target if not specified) -# (--create flag specifies that the module folder does not yet exist) -bulgogi module add module1 target1 -bulgogi module add --create telemetry utils - -# Adds a new target to the project -# (--library or --binary) specifies which type explicitly (default binary) -bulgogi target add target1 -bulgogi target add --library utils - -# Build project -bulgogi build - -# Clean project -# Specifically, removes all untracked project files and directories -bulgogi clean - -# Removes module from the project -bulgogi rm module/ - -# Alternative ideas -# bulgogi module rm module1/ -# bulgogi module rm --cached module1/ -# (simply removes module from tracking but preserves files) - -# Display project structure (tree) -bulgogi tree - -# Sample output from bulgogi tree -# target1 -# |_ module1 (C++) -# |_ module2 (C++) -# -# target2 -# |_ module3 (Py3) -# |_ target1 (C++) - -# Smart functions (educated guesses) -bulgogi add module2 # Detects module, aliases to module add module2 -bulgogi rm telemetry # Detects module, aliases to module rm module2 -bulgogi add source3.c # Source detected, creates a module for it and moves it -bulgogi add source5.c module2 # Adds source to specific module - -########################################################### - -# File: project.yaml -# Contains the project structure persistent state. -# Bulgogi primarily works by reading and updating this file. - -# project.yaml -default: # Target - module1* # Dependency 1 (contains main) - module2 # Dependency 2 - -target1: # Target - module3 # Dependency 1 - module4 # Dependency 2 - -target2: # Target - module3 # Dependency 1 - module5* # Dependency 2 (contains main) - target1 # Dependency 3 (implies target1 is a lib/shared lib) - -**NOTE: A dependency can be a target OR a module. Targets used as dependencies imply lib. - -# project directory -project/ - |- module1/ - |- inc/ - |- header1.h - |- header2.h - |- src/ - |- source1.c - |- source2.c - |- inc/ - |- private1.h - |- private2.h - -/* Repeat the same for module 2 */ - -# CMake Targets -default: # default.out # What the user wants - module1* # default.out # What bulgogi tells CMake - module2 # libmodule2.a # || || || || || || || || - -target1: # libtarget1.a - module3 # libmodule3.a - module4 # libmodule4.a - -target2: # target2.out - module3 # libmodule3.a - module5* # target2.out - target1 # libtarget1.a (implies library) - -# Exceptions -default: # default.out - target1* # Shared object? - module2 - -target1: # target1.out - module1* # target1.out - -# Bottom line: targets marked as executable dependencies are treated as -# normal target-libraries - - -########################################################### -# -# The .bul folder -# -########################################################### -# -# Herein lies the homogenizer of build projects. Rather than to make a build system -# which can be bent to conform any build layout, optimize for a single build system -# layout in which all projects are transposed in virtual form. -# -# The setup.py script must do the following things: -# 1. Allow the user to conveniently identify and arrange source and header files. -# 2. Copy relevant resources and paths to the corresponding .bul directory. -# 3. Produce a project.yaml file which satisfies the desired build outputs. -# -# Together, the bulgogi engine can be called upon for the rapid generation and calling of -# an existing build system and its required build files to produce the desired targets. -# -# After the first setup is run, successive project builds must be done with build.py. It -# shall perform the following: -# 1. Allow for the detection in any underlying changes in the project codebase. -# 2. Update .bul such that it mirrors the required project files for building. -# 3. Call upon the underlying build system to execute the build sequence. -########################################################### -# -# Python API -# -########################################################### -# - -/** Long-form droney bits **/ -# The Re-Introduction of Proxy Libs -# --------------------------------- -# Lo and behold it is revealed that the idea of removing proxy libs came back to bite. -# -# I'm grateful that it happened so early-on (pre-bootstrapping) since it's a pretty fund- -# -amental error. I'd like to elaborate on it. -# -# The premise of bulgogi target libraries was that they could be purely interfaces. Just -# intermediaries to executables. You can group low-level atomic modules together and form -# these larger executables at the top. -# -# That's fine, until you realize that some modules depend on others. And the moment this -# happens, the current version of bulgogi begins to treat that higher-level module as a -# target lib. In other words, as just an interface. -# -# And interfaces don't have source code. They just have other libs linked to them. This -# also means no headers. No headers, no includes, no shared APIs. -# -# The way to fix this is to give library targets the option to have source code. The -# problem is finding in which file or directory they should live. The way that the -# templates work at the moment is by globbing sources and headers in a module dir -# to form one libmodule (or the executable component of an executable target). -# -# Without a so-called 'proxy module' as is handled by the executable targets, there -# is a need to create random directories (or floating CMakeLists.txt) which just -# server to orchestrate these higher-level libraries. -# -# So - the inference engine needs an upgrade. It needs to not only be able to pin down -# which modules contain the executable component for executable targets, but they also -# need to pin down which modules the target lib will 'reside' in. -# -# ALTERNATIVELY, you _do_ create those directories for targets. After all, it wouldn't -# be so inappropriate since the user _did_ ask for those targets to exist in the -# project.yaml. I think the thing I wouldn't accept would be something similar for the -# executables (and now that I think about it, it would be an impossible task for the -# executables since the main() directives need to be inserted as sources directly. -# -# I actually seem to be a bit stuck on this. It may be best to give it a break until things -# clear up. I can't tell if this is a problem on the CMake side of things (make the templates -# from scratch) or whether it is bulgogi purely. Leaning towards the bulgogi configuration. -# -# Ideallistically, for bulgogi's self build, I think the configuration I wish worked was: -# -# bulgogi: -# - client* -# - cmake -# - project -# -# And for that to work, I think it's CMake that may need to be changed. It almost feels to me -# like `cmake` depending on `project` shouldn't matter when they're under the same umbrella... -# -# Anyway, like I said, I'll let this simmer. - -# Re-thinking the executable marker (*) -# ------------------------------------- -# I've really preferred the existing trend to always make sane assumptions -# whenever possible so long as it simplifies and streamlines the UX. -# -# At first, the simplest thing was to say that every target is an executable -# unless another target depends on it. This was really beautiful. -# -# The problem arose in the CMake configuration: executables needed sources that -# contained a `main()` routine. This couldn't easily be worked around as -# executable CMake targets are not very portable between other targets. -# -# The idea then came to have an executable marker (*) next to dependency names -# of the modules that contained the `main()` routines. It would be unobtrusive -# and signal that they are special (in fact they are). -# -# This would also be a nice visual check for conflicts: if there are more than 1 -# asterix-denoted entry in an executable target's list, there is a problem. There -# cannot be 2 `main()` routines. -# -# So the latest issue is that requiring the executable marker has seemed both -# redundant (target or library status can already be inferred) and a source of -# occasional complication (which could escalate into needing intervention). -# -# For example, when the "default" target is created when the target field is -# unspecified, this is nice is kick-starting a project with no modules. -# -# But should the generated `project.yaml` _need_ to point out exactly which -# module is executable? After all, there is only 1. Even if additional deps -# are attached to the default target, they could all be library targets. -# -# Ambiguity error: instead of being required by default, the executability -# market is *only* required when there is ambiguity. Ambiguity occurs when -# an executable target has more than 1 module dependency. -# -# Advanced inference: it should also be possible to notice when the same -# module is used in other targets as a non-executable. For example, if -# any library targets include that suspected module, it could not be -# executable. Therefore ambiguity is reduced. -# -# In fact, the only time there would be ambiguity is when more than one -# executable share at least 2 modules that are not used anywhere else in -# the project. This would seem like a special case. - -# The need to re-use executable modules -# ------------------------------------- -# Suppose I wanted to release multiple variants of the same binary. -# -# I wouldn't have separate versions of the same `main()` beholden module. -# -# Consider the following targets: -# -# default: -# - module1* -# - module2 -# -# default2: -# - module1* -# - module2 -# - module7 -# - flags: -# - "-Duse_feature3" -# -# Ignore the non-existent `- flags:` entry for now. Notice how similar they are -# but actually target different binaries? One has a pre-processor flag enabled -# which inevitably actually requires different behaviour from the linker. Cool eh? - -# The C Lag? -# ---------- -# After the previously long-winded schpiel on C++ vs C, I've noticed that the lag that -# I observed from running my C++ application (possibly in my head) seemed _just_ as bad -# as that of my 'hello world' C program that I started just for sake of setting up the -# Makefile. -# -# To be completely honest, I'm surprised - this is making me think that part of the irr- -# -ational basis for my grievance over C++ may go unchanged in C. -# -# If I don't get that superficial quick-execution from C (but the very cool/small binary -# fingerprint), will I really care or be much more proud? Will _others_ care? I just -# can't answer that. -# -# I don't want to be so focused on the _what_ that I lose track of _why_. And I think -# this is where _trying_ to start a revolution can be its downfall. -# -# Personally, I have **no** opposition to substituting some modules of the program for C -# in the future. I'm not writing an operating system or a bootloader, I can live with -# dormant exceptions in the underbelly of the program. And if I so get interested in one -# day replacing the whole thing in C, I can. But that slick superficial boost I was looking -# for totally imploded in my hello-world test. -# -# In the end, data structures like unordered_maps are really handy representations of -# things and they aren't at the root of my grievances (for example, I'd just as happily -# use an uglier / buggier C implementation I'd make myself of the equivalent of a string -# lookup map specifically for the purpose of this...or would I?). -# -# Let's have some fun with this, either way. - -# Taking a moment to reconsider C++ -# --------------------------------- -# I've become quite cognizent of the bloat that has been introduced from the choice of -# using C++. Not so much in the code that I've written myself for the project (although -# still worth consideration) but moreso in the external libraries that were supposed to -# introduced 'nice' functionality. -# -# On the one hand, 'nice' APIs with a lot of defaults built-in have a flatter learning -# curve to them. Maybe it reduces the time until comfortable adjustment in half to 1/4 -# in more extreme cases. But once that hump is overcome, then what? -# -# I'm sitting on a +3 MB library dependency which just parses yaml. I'm sure it does a -# good job at it - and certainly having the yaml.to one-liner makes life awesome as -# I get to move on with the map itself. But is that worth 3 MB? -# -# Further, on the topic of C++ exceptions, I got very interested in the idea of disabling -# them. After all, any more than an abort() call when something goes wrong is not more or -# less preventable than the fancy stack unwinding and often ambiguous exception messages -# anyway. -# -# This proved to be a bit of a dead-end when the header-only library I was importing to -# use for CLI parsing turned out to use the crap out of them. I _could_ rejig the library -# not to use try/catch or throw statements, but then isn't that going against the work I -# originally wanted to prevent? -# -# This leads into the idea of building value into a project. What has made things like git -# and linux so damn valuable wasn't so much the ends they achieved. Sure, your malloc()s -# and your write()s are much needed, but plenty of Unix distributions and variants followed -# this pattern (the so-called POSIX standard) and surely _achieved_ what they described. -# -# Same goes for other version trackers. Even if mercurial had 100% the same API as git -# (which it seems to be pretty similar anyway), git would somehow come out on top. -# -# When I think about Minecraft, somehow a game with 100% the same mechanics and visuals, -# I still feel a bit off about using the non-OG version. As Minecraft is more than a game, -# it's a game-engine. -# -# Git is more than just a version tracker, it's _part_ of the directory. And it would -# only be able to do that if its footprint was small enough to be negligible. -# -# The bigger and hunkier a program is, the more setup and involvement it requires and -# the easier it is the notice, the less seamless it becomes. A program can never -# become essential if it constantly reminds the user and the system of its existence. -# -# I don't just want features - that's something C++ and even Python can give me just fine. -# I want to build the mother of all build-system projects. I need a program which takes -# everything I know and puts it into one place so I can springboard off of that point -# anytime I start a new project. -# -# And unfortunately I know better than to link 3 MB libraries to parse yaml. - -# Gotta give up on proxy libraries -# -------------------------------- -# After many flip flops, I have realized that it will not be practical -# to use proxy submodules for Bulgogi/CMake libraries. -# -# The main reason for this being that, unlike executable proxies (which are -# required), proxy libraries are not indicated in the project config. -# -# Although it would not be impossible to implement a 'dibs' system on such -# proxy lib submodules, this can allow for situations in which 2 'twin' target -# libraries are defined with the same module-dependencies. The orchestrator would -# need to account for these situations, which would be annoying and require more -# back and forth with the user. -# -# The simplest solution here is to compile modules as standalone libraries and then -# add each of the target-libraries to the CMake build as meta-libraries which simply -# link globs of libmodules together. -# -# Executables then proxy themselves based on the (*) indicator. Library targets are -# declared in the highest-level CMakelist.txt after all of the submodules are included. - -# The HashMap Update: 0.5.0 -# ------------------------- -# This time we've realized that HashMaps are our friends. -# -# The Project struct will now be a hasmap which can be crawled like a graph. -# -# Every target has a target ID, which is in fact its name. The key will be a String. -# -# Targets have lists of Dependencies, of which some may be modules (with module IDs) and others -# may be targets (with Target IDs corresponding to an existing target in the HashMap). -# -# This way, without fighting the underlying data structures, the desired representation and functionality -# may be implemented. This will also greatly ease conversion from the bulgogi Project to a CMakeProject. -# -# Dependencies must also be defined. The must, at the very least, define a source directory or another -# target. - -# I just remembered: executables are special -# ------------------------------------------ -# The whole need for "proxy" modules for targets stems from the special need for executable targets -# to have the main() sources added directly to them. -# -# If a mechanism exists for executables to be created this way in the CMake translation, why wouldn't -# libraries do this as well? Now I remember the line of thinking I was going on and why it's been so -# damn hard to break from it. -# -# Still, for now, I think it would be best to let executables think they're special (and so treat them -# that way) and then continue with the direct interpretation for the libraries and the rest. -# -# So in other words: executables have proxy modules (which is what the * helps with anyway) and everything -# else is a library. - -# New way of thinking: Bulgogi is a CMake orchestrator -# ---------------------------------------------------- -# Rather than try and be clever by designating some module directories to be 'proxy' libraries -# and executables, passing modules directly as libraries to CMake (even in cases when the library -# target and the module are indistinguishable) and leaving it to be CMake's problem (or the user's -# desire), a level of simplicity and fine-grained control is simultaneously unlocked. -# -# I am seeing this as a bit of an A/B test, especially considering that I have flip-flopped between -# wanting to have proxy target modules and not. -# -# On the positive end, proxy modules are a more natural/stylistic interpretation of the desired project -# layout. If a human were adapting the bulgogi project.yaml file into a CMake project, it would be -# surprising to me if they would choose to create a library which only links to another lone library. -# -# On the flipside, if the bulgogi configuration _implies_ that a lone module is part of a lone library, -# why not accept this as the user's wish? This would be a much more direct interpretation of the desired -# project layout. This could be a very easy to produce a library file which I can send to my buddy just -# on the side. - -# All modules are treated as libraries -# ----------------------------------- -# Unless indicated by a * in the project config, all modules are treated like potential libraries. -# -# This is helpful because it supports the existing CMake architecture that is being inherited and -# allows more than one target to link against the module. -# -# Additionally, when flagged as containing a main() routine with a *, executable targets can ensure -# the presence of a dedicated main() module. For simplicity, they can also be standalone executables -# in smaller/simpler projects - -# Bulgogi targets are abstract groupings -# -------------------------------------- -# As an orchestrator, bulgogi constructs and concepts are designed to faciliate -# build system management and the user development process. -# -# The high-level distinction between a target and a module is merely an abstraction -# which serves to distinguish products (executables) from intermediaries (libraries). -# -# This is not a conventional or 'good' way of thinking of binaries and libraries. But -# that isn't the point. Within a self-contained project, this is how things conceptually -# flow. - -# Targets without an executable component -# --------------------------------------- -# A new thought: targets which do not have an executable component specified (module*) -# will be considered target libraries. -# -# This way, there are 3 kinds of CMake targets that bulgogi can generate: -# - Executable target (links against libraries + has executable component), -# - Library target (composed of modules but no executable component), -# - Library modules (smallest compilation unit recognized by bulgogi). - -################## Cyclic Dependencies -# A cyclic dependency check has been implemented for every conversion -# from a serde_yaml mapping into a Project struct. -# -# This is largely for A. safety (mistakes happen) and B. to prevent panics, -# runoffs and disasters down the road when those cyclic dependencies appear -# elsewhere (like in the CMake files which we are trying to keep the user -# out of in the first place). -# -# It currently works by iterating over each of the project targets and searching -# for target-type dependencies in other targets (or in itself for that matter). -# Further recursing is performed into each of the dependencies associated to the -# target-type dependencies until a match to the 'parent' target is found -- implying -# that by travelling laterally across the dependency tree we found our way back to the -# start. -# -# The user is notified and the program panics if this is encountered. No work should been -# done or attempted if the configuration suggests something impossible (or which could -# easily be addressed using a common abstraction target which prevents the cycle). - -################### Adding Modules -# As per the suggested synopsis, modules are to be added using the -# $(bulgogi module add ) command. -# -# Unique to the init command, a default project and project directory must be spawned. -# Internally this is easy since the project struct just needs to be initialized to its -# default value. -# -# Ideas to spawn module directories: -# 1. Provide a .spawn() method for the project -# - This would ensure that all module folders exist for the current project. -# - If any folders are missing (including child src and inc folders) they would be created. -# - If any modules are missing in the project.yaml but a directory is found, they are ignored. -# ** Module directories in this case must be removed using the $(bulgogi module remove ) command. -# 2. Provide a .sync() method for the project -# - This would read the project.yaml file and enforce the project directory structure onto the fs. -# x The problem with this is that this would necessarily include removing directories which are not -# found in the project.yaml -# x It is also unecessarily complex at this stage, but may be needed or wanted down the road. - -################# Universalizing directories -# Something to think about for the future: everything works path-wise as long as the project.yaml -# file is in the PWD of the current shell. -# -# However, if in any instance that a project which was initialized in a parent or child directory -# of the PWD, locating module folders etc. would be impossible to do correctly without losing things -# and create redundant copies of the same folders along differing hierarchical levels. -# -# For now it's fine to assume that project.yaml location = PWD. But at one point it would be very nice -# to be able to be in a module directory or deeper in a subdirectory and still be able to call bulgogi -# functions and have the thing build etc. -# -# It could be achieved if modules had module.yaml files which could be read for reference info (i.e.: where is the -# project.yaml? what is this module called? etc.) but we're not there yet. - -################# A note on spawn and module add behavior -# The current implementation of 'spawn' -- both in the direct use of the bulgogi spawn command -# and the indirect need to spawn directories when adding modules -- will 'create' any and all -# modules found to be without a directory even if *adjacent* to the one being created. -# -# In other words, in the instance where module1 and module2 are defined in the project.yaml and one -# entry is removed, a calling to $(bulgogi module add --create module3) will re-spawn module1 as a -# blank module. -# -# This behavior is not bad, but questionable: why is module1 missing from the project directory? Was this -# done on purpose? If so, should the default behavior be to re-create the directory in its empty format? diff --git a/templates/default.json b/templates/default.json deleted file mode 100644 index 8ca1657..0000000 --- a/templates/default.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "project_name": "BULGOGI_PROJECT", - "version": "1.0.0", - "project_description": "A cool project" -} diff --git a/templates/lib.blg b/templates/lib.blg deleted file mode 100644 index c44c552..0000000 --- a/templates/lib.blg +++ /dev/null @@ -1,190 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - - -#-------------------------------------------------------------------------- -# OPTIONS GO HERE -#-------------------------------------------------------------------------- -option(BUILD_TESTING "[ON/OFF] Build tests in addition to library" OFF) -option(BUILD_EXAMPLES "[ON/OFF] Build examples in addition to library" OFF) - - -#-------------------------------------------------------------------------- -# PROJECT INIT -#-------------------------------------------------------------------------- -project( - {{ target }} - VERSION 1.0 - DESCRIPTION "CLIENT CREATION API LIBRARY FOR IPC" - LANGUAGES C CXX -) -set(LIB "${PROJECT_NAME}") # this is PROJECT_NAME, NOT CMAKE_PROJECT_NAME -message("CONFIGURING TARGET : ${LIB}") - -if(TARGET ${LIB}) - message(FATAL_ERROR "Target ${LIB} already exists in this project!") -else() - add_library(${LIB}) -endif(TARGET ${LIB}) - - -#-------------------------------------------------------------------------- -# BUILD TYPE CHECK -#-------------------------------------------------------------------------- -set(SUPPORTED_BUILD_TYPES "") -list(APPEND SUPPORTED_BUILD_TYPES "Debug") -list(APPEND SUPPORTED_BUILD_TYPES "Release") -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SUPPORTED_BUILD_TYPES}) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type chosen by the user at configure time") -else() - if(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) - message("Build type : ${CMAKE_BUILD_TYPE} is not a supported build type.") - message("Supported build types are:") - foreach(type ${SUPPORTED_BUILD_TYPES}) - message("- ${type}") - endforeach(type ${SUPPORTED_BUILD_TYPES}) - message(FATAL_ERROR "The configuration script will now exit.") - endif(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) -endif(NOT CMAKE_BUILD_TYPE) - - - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - target_compile_options(${LIB} PUBLIC "-Wall") - target_compile_options(${LIB} PUBLIC "-Wextra") - target_compile_options(${LIB} PUBLIC "-Wshadow") - set(BUILD_TESTING ON CACHE BOOL "" FORCE) - set(BUILD_EXAMPLES ON CACHE BOOL "" FORCE) -endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - - -#-------------------------------------------------------------------------- -# DETECT SOURCES RECURSIVELY FROM src FOLDER AND ADD TO BUILD TARGET -#-------------------------------------------------------------------------- - -get_property(${LIB}_languages GLOBAL PROPERTY ENABLED_LANGUAGES) -foreach(lang ${${LIB}_languages}) - if(${lang} STREQUAL CXX) - file(GLOB_RECURSE ${LIB}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") - elseif(${lang} STREQUAL C) - file(GLOB_RECURSE ${LIB}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") - elseif(${lang} STREQUAL ASM) - file(GLOB_RECURSE ${LIB}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.asm") - else() - # language not supported - endif() - target_sources(${LIB} PRIVATE ${${LIB}_${lang}_sources}) -endforeach(lang ${${LIB}_languages}) - - - -#-------------------------------------------------------------------------- -# DETECT PRIVATE HEADERS RECURSIVELY FROM src FOLDER -#-------------------------------------------------------------------------- -foreach(lang ${${LIB}_languages}) - if(${lang} STREQUAL CXX) - file(GLOB_RECURSE ${LIB}_${lang}_private_headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp") - elseif(${lang} STREQUAL C) - file(GLOB_RECURSE ${LIB}_${lang}_private_headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h") - elseif(${lang} STREQUAL ASM) - - else() - # language not supported - endif() - - set(${LIB}_${lang}_private_include_directories "") - foreach(hdr ${${LIB}_${lang}_private_headers}) - get_filename_component(hdr_dir ${hdr} DIRECTORY) - list(APPEND ${LIB}_${lang}_private_include_directories ${hdr_dir}) - endforeach(hdr ${${LIB}_${lang}_private_headers}) - list(REMOVE_DUPLICATES ${LIB}_${lang}_private_include_directories) - target_include_directories(${LIB} PRIVATE ${${LIB}_${lang}_private_include_directories}) -endforeach(lang ${${LIB}_languages}) - -#-------------------------------------------------------------------------- -# DETECT PUBLIC HEADERS RECURSIVELY FROM inc FOLDER -#-------------------------------------------------------------------------- -foreach(lang ${${LIB}_languages}) - if(lang STREQUAL CXX) - file(GLOB_RECURSE ${LIB}_${lang}_public_headers "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.hpp") - elseif(lang STREQUAL C) - file(GLOB_RECURSE ${LIB}_${lang}_public_headers "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h") - elseif(lang STREQUAL ASM) - - else() - # language not supported - endif() - - set(${LIB}_${lang}_public_include_directories "") - foreach(hdr ${${LIB}_${lang}_public_headers}) - get_filename_component(hdr_dir ${hdr} DIRECTORY) - list(APPEND ${LIB}_${lang}_public_include_directories ${hdr_dir}) - endforeach(hdr ${${LIB}_${lang}_public_headers}) - list(REMOVE_DUPLICATES ${LIB}_${lang}_public_include_directories) - target_include_directories(${LIB} PUBLIC ${${LIB}_${lang}_public_include_directories}) -endforeach(lang ${${LIB}_languages}) - - -#-------------------------------------------------------------------------- -# SPECIAL AND PROJECT SPECIFIC OPTIONS -#-------------------------------------------------------------------------- - -target_compile_options(${LIB} PUBLIC "-g") - - - -#-------------------------------------------------------------------------- -# LINK AGAINST THE NECESSARY LIBRARIES -#-------------------------------------------------------------------------- -# Project libs -## for link in links -target_link_libraries(${LIB} PUBLIC {{ link }}) -## endfor - -#Link against pthread -find_package(Threads REQUIRED) -if(Threads_FOUND) - if(WIN32) - if(CMAKE_USE_WIN32_THREADS_INIT) - target_link_libraries(${LIB} PUBLIC pthread) - target_compile_options(${LIB} PUBLIC "-lpthread") - else() - message(FATAL_ERROR "BLAHHH ") - endif() - elseif(UNIX) - if(CMAKE_USE_PTHREADS_INIT) - target_link_libraries(${LIB} PUBLIC pthread) - target_compile_options(${LIB} PUBLIC "-lpthread") - else() - message(FATAL_ERROR "BLAHHH ") - endif() - endif() -else() - message(FATAL_ERROR "No threading libraries have been found. Aborting!") -endif() - -#-------------------------------------------------------------------------- -# TEST CONFIGURATION -#-------------------------------------------------------------------------- -if(BUILD_TESTING) - enable_testing() - include(CTest) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tests") - add_subdirectory(tests) - elseif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") - add_subdirectory(test) - endif() -endif(BUILD_TESTING) - - -#-------------------------------------------------------------------------- -# EXAMPLE CONFIGURATION -#-------------------------------------------------------------------------- -if(BUILD_EXAMPLES) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/examples") - add_subdirectory(examples) - elseif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/example") - add_subdirectory(example) - endif() -endif(BUILD_EXAMPLES) diff --git a/templates/mod.blg b/templates/mod.blg deleted file mode 100644 index 66889f6..0000000 --- a/templates/mod.blg +++ /dev/null @@ -1,252 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - - -#-------------------------------------------------------------------------- -# OPTIONS GO HERE -#-------------------------------------------------------------------------- -option(BUILD_TESTING "[ON/OFF] Build tests in addition to library" OFF) -option(BUILD_EXAMPLES "[ON/OFF] Build examples in addition to library" OFF) - - -#-------------------------------------------------------------------------- -# PROJECT INIT -#-------------------------------------------------------------------------- -project( - {{ subdir }} - VERSION 1.0 - DESCRIPTION "CLIENT CREATION API LIBRARY FOR IPC" - LANGUAGES C CXX -) - -## for target in targets - -set(TARGET_{{ target.name }} "{{ target.name }}") # this is PROJECT_NAME, NOT CMAKE_PROJECT_NAME -message("CONFIGURING TARGET : ${TARGET_{{ target.name }}}") - -if(TARGET ${TARGET_{{ target.name }}}) - message(FATAL_ERROR "Target ${TARGET_{{ target.name }}} already exists in this project!") -else() -## if target.exe - add_executable(${TARGET_{{ target.name }}}) -## else - add_library(${TARGET_{{ target.name }}}) -## endif -endif(TARGET ${TARGET_{{ target.name }}}) - -## endfor - -#-------------------------------------------------------------------------- -# BUILD TYPE CHECK -#-------------------------------------------------------------------------- -set(SUPPORTED_BUILD_TYPES "") -list(APPEND SUPPORTED_BUILD_TYPES "Debug") -list(APPEND SUPPORTED_BUILD_TYPES "Release") -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SUPPORTED_BUILD_TYPES}) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type chosen by the user at configure time") -else() - if(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) - message("Build type : ${CMAKE_BUILD_TYPE} is not a supported build type.") - message("Supported build types are:") - foreach(type ${SUPPORTED_BUILD_TYPES}) - message("- ${type}") - endforeach(type ${SUPPORTED_BUILD_TYPES}) - message(FATAL_ERROR "The configuration script will now exit.") - endif(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) -endif(NOT CMAKE_BUILD_TYPE) - -## for target in targets - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-Wall") - target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-Wextra") - target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-Wshadow") - set(BUILD_TESTING ON CACHE BOOL "" FORCE) - set(BUILD_EXAMPLES ON CACHE BOOL "" FORCE) -endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - -set_property(TARGET ${TARGET_{{ target.name }}} PROPERTY CXX_STANDARD 20) - -## endfor - -#-------------------------------------------------------------------------- -# DETECT SOURCES RECURSIVELY FROM src FOLDER AND ADD TO BUILD TARGET -#-------------------------------------------------------------------------- - -## for target in targets - -get_property(${TARGET_{{ target.name }}}_languages GLOBAL PROPERTY ENABLED_LANGUAGES) -foreach(lang ${${TARGET_{{ target.name }}}_languages}) - if(${lang} STREQUAL CXX) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp") - elseif(${lang} STREQUAL C) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.c") - elseif(${lang} STREQUAL ASM) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_sources "${CMAKE_CURRENT_SOURCE_DIR}/src/*.asm") - else() - # language not supported - endif() - target_sources(${TARGET_{{ target.name }}} PRIVATE ${${TARGET_{{ target.name }}}_${lang}_sources}) -endforeach(lang ${${TARGET_{{ target.name }}}_languages}) - -## endfor - -#-------------------------------------------------------------------------- -# DETECT PRIVATE HEADERS RECURSIVELY FROM src FOLDER -#-------------------------------------------------------------------------- - -## for target in targets - -foreach(lang ${${TARGET_{{ target.name }}}_languages}) - if(${lang} STREQUAL CXX) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_private_headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.hpp") - elseif(${lang} STREQUAL C) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_private_headers "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h") - elseif(${lang} STREQUAL ASM) - - else() - # language not supported - endif() - - set(${TARGET_{{ target.name }}}_${lang}_private_include_directories "") - foreach(hdr ${${TARGET_{{ target.name }}}_${lang}_private_headers}) - get_filename_component(hdr_dir ${hdr} DIRECTORY) - list(APPEND ${TARGET_{{ target.name }}}_${lang}_private_include_directories ${hdr_dir}) - endforeach(hdr ${${TARGET_{{ target.name }}}_${lang}_private_headers}) - list(REMOVE_DUPLICATES ${TARGET_{{ target.name }}}_${lang}_private_include_directories) - target_include_directories(${TARGET_{{ target.name }}} PRIVATE ${${TARGET_{{ target.name }}}_${lang}_private_include_directories}) -endforeach(lang ${${TARGET_{{ target.name }}}_languages}) - -## endfor - -#-------------------------------------------------------------------------- -# DETECT PUBLIC HEADERS RECURSIVELY FROM inc FOLDER -#-------------------------------------------------------------------------- - -## for target in targets - -foreach(lang ${${TARGET_{{ target.name }}}_languages}) - if(lang STREQUAL CXX) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_public_hpp "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.hpp") - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_public_h "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h") - elseif(lang STREQUAL C) - file(GLOB_RECURSE ${TARGET_{{ target.name }}}_${lang}_public_h "${CMAKE_CURRENT_SOURCE_DIR}/inc/*.h") - elseif(lang STREQUAL ASM) - - else() - # language not supported - endif() - - # Debug - list(JOIN ${TARGET_{{ target.name }}}_${lang}_public_hpp ", " ${TARGET_{{ target.name }}}_${lang}_public_hpp_str) - list(JOIN ${TARGET_{{ target.name }}}_${lang}_public_h ", " ${TARGET_{{ target.name }}}_${lang}_public_h_str) - message(${TARGET_{{ target.name }}}_${lang}_pulic_hpp_str="${${TARGET_{{ target.name }}}_${lang}_public_hpp_str}") - message("") - message(${TARGET_{{ target.name }}}_${lang}_pulic_h_str="${${TARGET_{{ target.name }}}_${lang}_public_h_str}") - message("") - # Enddebug - - set(${TARGET_{{ target.name }}}_${lang}_public_include_directories "") - - foreach(hdr ${${TARGET_{{ target.name }}}_${lang}_public_hpp}) - get_filename_component(hdr_dir ${hdr} DIRECTORY) - list(APPEND ${TARGET_{{ target.name }}}_${lang}_public_include_directories ${hdr_dir}) - endforeach(hdr ${${TARGET_{{ target.name }}}_${lang}_public_hpp}) - - foreach(hdr ${${TARGET_{{ target.name }}}_${lang}_public_h}) - get_filename_component(hdr_dir ${hdr} DIRECTORY) - list(APPEND ${TARGET_{{ target.name }}}_${lang}_public_include_directories ${hdr_dir}) - endforeach(hdr ${${TARGET_{{ target.name }}}_${lang}_public_h}) - - # Debug - list(JOIN ${TARGET_{{ target.name }}}_${lang}_public_include_directories ", " ${TARGET_{{ target.name }}}_${lang}_public_include_directories_str) - message("# PRE-TRIM #") - message(${TARGET_{{ target.name }}}_${lang}_public_include_directories_str="${${TARGET_{{ target.name }}}_${lang}_public_include_directories_str}") - message("") - # Enddebug - - list(REMOVE_DUPLICATES ${TARGET_{{ target.name }}}_${lang}_public_include_directories) - target_include_directories(${TARGET_{{ target.name }}} PUBLIC ${${TARGET_{{ target.name }}}_${lang}_public_include_directories}) - - # Debug - list(JOIN ${TARGET_{{ target.name }}}_${lang}_public_include_directories ", " ${TARGET_{{ target.name }}}_${lang}_public_include_directories_str) - message("# POST-TRIM #") - message(${TARGET_{{ target.name }}}_${lang}_public_include_directories_str="${${TARGET_{{ target.name }}}_${lang}_public_include_directories_str}") - message("") - # Enddebug -endforeach(lang ${${TARGET_{{ target.name }}}_languages}) - -## endfor - -#-------------------------------------------------------------------------- -# SPECIAL AND PROJECT SPECIFIC OPTIONS -#-------------------------------------------------------------------------- - -## for target in targets - -target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-g") - -## endfor - -#-------------------------------------------------------------------------- -# LINK AGAINST THE NECESSARY LIBRARIES -#-------------------------------------------------------------------------- -# Project libs -## for target in targets -## for link in target.links -target_link_libraries(${TARGET_{{ target.name }}} PUBLIC {{ link }}) -## endfor - -## endfor - -## for target in targets - -#Link against pthread -find_package(Threads REQUIRED) -if(Threads_FOUND) - if(WIN32) - if(CMAKE_USE_WIN32_THREADS_INIT) - target_link_libraries(${TARGET_{{ target.name }}} PUBLIC pthread) - target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-lpthread") - else() - message(FATAL_ERROR "BLAHHH ") - endif() - elseif(UNIX) - if(CMAKE_USE_PTHREADS_INIT) - target_link_libraries(${TARGET_{{ target.name }}} PUBLIC pthread) - target_compile_options(${TARGET_{{ target.name }}} PUBLIC "-lpthread") - else() - message(FATAL_ERROR "BLAHHH ") - endif() - endif() -else() - message(FATAL_ERROR "No threading libraries have been found. Aborting!") -endif() - -## endfor - -#-------------------------------------------------------------------------- -# TEST CONFIGURATION -#-------------------------------------------------------------------------- -if(BUILD_TESTING) - enable_testing() - include(CTest) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tests") - add_subdirectory(tests) - elseif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/test") - add_subdirectory(test) - endif() -endif(BUILD_TESTING) - - -#-------------------------------------------------------------------------- -# EXAMPLE CONFIGURATION -#-------------------------------------------------------------------------- -if(BUILD_EXAMPLES) - if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/examples") - add_subdirectory(examples) - elseif(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/example") - add_subdirectory(example) - endif() -endif(BUILD_EXAMPLES) diff --git a/templates/proj.blg b/templates/proj.blg deleted file mode 100644 index 4ec2b3f..0000000 --- a/templates/proj.blg +++ /dev/null @@ -1,214 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -option(BUILD_TESTING "[ON/OFF] Option to build tests" OFF) -option(CMAKE_VERBOSE_MAKEFILE "[ON/OFF] Option to emit makefile commands to stdout" OFF) - -project( - PROJECT - VERSION 1.0 - DESCRIPTION "IPC CORE API PROJECT" - LANGUAGES C CXX -) - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - set(BUILD_TESTING ON CACHE BOOL "OPTION TO BUILD TESTING" FORCE) -endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - -set(SUPPORTED_BUILD_TYPES "") -list(APPEND SUPPORTED_BUILD_TYPES "Debug") -list(APPEND SUPPORTED_BUILD_TYPES "Release") -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SUPPORTED_BUILD_TYPES}) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type chosen by the user at configure time") -else() - if(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) - message("Build type : ${CMAKE_BUILD_TYPE} is not a supported build type.") - message("Supported build types are:") - foreach(type ${SUPPORTED_BUILD_TYPES}) - message("- ${type}") - endforeach(type ${SUPPORTED_BUILD_TYPES}) - message(FATAL_ERROR "The configuration script will now exit.") - endif(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) -endif(NOT CMAKE_BUILD_TYPE) - - -if(WIN32) - set(CMAKE_EXECUTABLE_SUFFIX ".exe") -elseif(UNIX AND NOT APPLE) - set(CMAKE_EXECUTABLE_SUFFIX ".out") -elseif(APPLE) - set(CMAKE_EXECUTABLE_SUFFIX ".out") -else() - message(FATAL_ERROR "[ERROR] platform: ${CMAKE_HOST_SYSTEM_NAME} not supported") - -endif() - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") - -if(BUILD_TESTING) - enable_testing() - include(CTest) - if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - add_subdirectory(test) - elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests) - add_subdirectory(tests) - endif() -endif() - -set(CMAKE_C_COMPILER_NAME gcc) -set(CMAKE_ASM_COMPILER_NAME gcc) -set(CMAKE_CXX_COMPILER_NAME g++) -set(CMAKE_OBJCOPY_NAME objcopy) -set(CMAKE_OBJDUMP_NAME objdump) -set(CMAKE_SIZE_NAME size) -set(CMAKE_GDB_NAME gdb) #might also have gdb.py extension - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - -find_program(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_NAME} REQUIRED) -find_program(CMAKE_ASM_COMPILER ${CMAKE_ASM_COMPILER_NAME} REQUIRED) -find_program(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_NAME} REQUIRED) -#find_program(CMAKE_OBJCOPY ${CMAKE_OBJCOPY_NAME} REQUIRED) -#find_program(CMAKE_OBJDUMP ${CMAKE_OBJDUMP_NAME} REQUIRED) -find_program(CMAKE_SIZE ${CMAKE_SIZE_NAME} REQUIRED) - - -if(NOT COMMAND _add_executable) -function(add_executable exe) - _add_executable(${exe} ${ARGN}) - - #[[ - - if(CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(meta_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/metadata") - else() - set(meta_dir "${CMAKE_CURRENT_BINARY_DIR}/metadata") - endif(CMAKE_RUNTIME_OUTPUT_DIRECTORY) - - if(NOT EXISTS ${meta_dir}) - file(MAKE_DIRECTORY ${meta_dir}) - endif(NOT EXISTS ${meta_dir}) - - if(NOT EXISTS "${meta_dir}/${exe}") - file(MAKE_DIRECTORY "${meta_dir}/${exe}") - endif(NOT EXISTS "${meta_dir}/${exe}") - - #]] - - - # modify this part for post-build commands (such as generating an elf file) - #[[ - - set(exe_full "${exe}${CMAKE_EXECUTABLE_SUFFIX}") - set(exe_hex "${exe}.hex") - set(exe_bin "${exe}.bin") - - add_custom_target(${exe}_postbuild ALL DEPENDS ${exe}) - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - COMMENT "Built exe ${exe} with the following size:" - COMMAND ${CMAKE_SIZE} -B "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - BYPRODUCTS "${meta_dir}/${exe}/${exe_hex}" - COMMENT "Producing a hex output using ${CMAKE_OBJCOPY}" - COMMAND ${CMAKE_OBJCOPY} -O ihex -I elf32-little "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" "${meta_dir}/${exe}/${exe_hex}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - BYPRODUCTS "${meta_dir}/${exe}/${exe_bin}" - COMMAND ${CMAKE_OBJCOPY} -O binary -I elf32-little "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" "${meta_dir}/${exe}/${exe_bin}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - COMMENT "Generating lss file from ${exe} using ${CMAKE_OBJDUMP}" - COMMAND ${CMAKE_OBJDUMP} -xh "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" > "${meta_dir}/${exe}/${exe}.lss" - ) - #]] - -endfunction(add_executable exe) -endif(NOT COMMAND _add_executable) - - -if(NOT COMMAND _add_library) -function(add_library lib) - _add_library(${lib} ${ARGN}) - - # for now, just aborting. When namespaced targets are received as - # inputs to this function, for some reason a custom command conflict - # gets created since aparently an arbitrary number of custom targets - # can exist within the same namespace. Then, when build time occurs, - # cmake cannot produce a DAG since the dependency order of the - # custom targets is unclear - return() - - add_custom_target(${lib}_postbuild ALL DEPENDS ${lib}) - - add_custom_command( - TARGET ${lib}_postbuild - POST_BUILD - DEPENDS ${lib} - COMMENT "Built lib ${lib} with the following size:" - COMMAND ${CMAKE_SIZE} -B "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${lib}" - ) - - add_custom_command( - TARGET ${lib}_postbuild - POST_BUILD - DEPENDS ${lib} - COMMENT "Generating lss file from ${lib} using ${CMAKE_OBJDUMP}" - BYPRODUCTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/metadata/${lib}/${lib}.lss" - COMMAND ${CMAKE_OBJDUMP} -xh "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${lib}" > "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/metadata/${lib}/${lib}.lss" - ) -endfunction(add_library lib) -endif(NOT COMMAND _add_library) - -#----------------- Target libraries -## if n_targets > 0 -## for target in targets -# lib{{ target.name }} -set(LIB_{{ target.name }} "{{ target.name }}") # this is PROJECT_NAME, NOT CMAKE_PROJECT_NAME -message("CONFIGURING TARGET : ${LIB_{{ target.name }}}") - -if(TARGET ${LIB_{{ target.name }}}) - message(FATAL_ERROR "Target ${LIB_{{ target.name }}} already exists in this project!") -else() - add_library(${LIB_{{ target.name }}} INTERFACE) -endif(TARGET ${LIB_{{ target.name }}}) - -## endfor -## endif - -#----------------- Add subdirectories -## for subdir in subdirs -add_subdirectory({{ subdir }}) -## endfor - -#----------------- Target library links -## if n_targets > 0 -## for target in targets -# Links for lib{{ target.name }} -## for link in target.links -target_link_libraries(${LIB_{{ target.name }}} INTERFACE {{ link }}) -## endfor - -## endfor -## endif diff --git a/templates/top.blg.old b/templates/top.blg.old deleted file mode 100644 index aaf9c9f..0000000 --- a/templates/top.blg.old +++ /dev/null @@ -1,197 +0,0 @@ -cmake_minimum_required(VERSION 3.18) - -option(BUILD_TESTING "[ON/OFF] Option to build tests" ON) -option(CMAKE_VERBOSE_MAKEFILE "[ON/OFF] Option to emit makefile commands to stdout" OFF) - -project( - {{ project_name }} - VERSION {{ version }} - DESCRIPTION "{{ project_description }}" - LANGUAGES C CXX -) - -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - set(CMAKE_EXPORT_COMPILE_COMMANDS ON) - set(BUILD_TESTING ON CACHE BOOL "OPTION TO BUILD TESTING" FORCE) -endif(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) - -set(SUPPORTED_BUILD_TYPES "") -list(APPEND SUPPORTED_BUILD_TYPES "Debug") -list(APPEND SUPPORTED_BUILD_TYPES "Release") -set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS ${SUPPORTED_BUILD_TYPES}) -if(NOT CMAKE_BUILD_TYPE) - set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type chosen by the user at configure time") -else() - if(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) - message("Build type : ${CMAKE_BUILD_TYPE} is not a supported build type.") - message("Supported build types are:") - foreach(type ${SUPPORTED_BUILD_TYPES}) - message("- ${type}") - endforeach(type ${SUPPORTED_BUILD_TYPES}) - message(FATAL_ERROR "The configuration script will now exit.") - endif(NOT CMAKE_BUILD_TYPE IN_LIST SUPPORTED_BUILD_TYPES) -endif(NOT CMAKE_BUILD_TYPE) - - -if(WIN32) - set(CMAKE_EXECUTABLE_SUFFIX ".exe") -elseif(UNIX AND NOT APPLE) - set(CMAKE_EXECUTABLE_SUFFIX ".out") -elseif(APPLE) - set(CMAKE_EXECUTABLE_SUFFIX ".out") -else() - message(FATAL_ERROR "[ERROR] platform: ${CMAKE_HOST_SYSTEM_NAME} not supported") - -endif() - - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR} CACHE INTERNAL "") - - -if(BUILD_TESTING) - enable_testing() - include(CTest) - if(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test) - add_subdirectory(test) - elseif(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests) - add_subdirectory(tests) - endif() -endif() - -set(CMAKE_C_COMPILER_NAME gcc) -set(CMAKE_ASM_COMPILER_NAME gcc) -set(CMAKE_CXX_COMPILER_NAME g++) -set(CMAKE_OBJCOPY_NAME objcopy) -set(CMAKE_OBJDUMP_NAME objdump) -set(CMAKE_SIZE_NAME size) -set(CMAKE_GDB_NAME gdb) #might also have gdb.py extension - -set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) -set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) - -find_program(CMAKE_C_COMPILER ${CMAKE_C_COMPILER_NAME} REQUIRED) -find_program(CMAKE_ASM_COMPILER ${CMAKE_ASM_COMPILER_NAME} REQUIRED) -find_program(CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER_NAME} REQUIRED) -find_program(CMAKE_OBJCOPY ${CMAKE_OBJCOPY_NAME} REQUIRED) -find_program(CMAKE_OBJDUMP ${CMAKE_OBJDUMP_NAME} REQUIRED) -find_program(CMAKE_SIZE ${CMAKE_SIZE_NAME} REQUIRED) - - - -if(NOT COMMAND _add_executable) -function(add_executable exe) - _add_executable(${exe} ${ARGN}) - - #[[ - - if(CMAKE_RUNTIME_OUTPUT_DIRECTORY) - set(meta_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/metadata") - else() - set(meta_dir "${CMAKE_CURRENT_BINARY_DIR}/metadata") - endif(CMAKE_RUNTIME_OUTPUT_DIRECTORY) - - if(NOT EXISTS ${meta_dir}) - file(MAKE_DIRECTORY ${meta_dir}) - endif(NOT EXISTS ${meta_dir}) - - if(NOT EXISTS "${meta_dir}/${exe}") - file(MAKE_DIRECTORY "${meta_dir}/${exe}") - endif(NOT EXISTS "${meta_dir}/${exe}") - - #]] - - - # modify this part for post-build commands (such as generating an elf file) - #[[ - - set(exe_full "${exe}${CMAKE_EXECUTABLE_SUFFIX}") - set(exe_hex "${exe}.hex") - set(exe_bin "${exe}.bin") - - add_custom_target(${exe}_postbuild ALL DEPENDS ${exe}) - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - COMMENT "Built exe ${exe} with the following size:" - COMMAND ${CMAKE_SIZE} -B "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - BYPRODUCTS "${meta_dir}/${exe}/${exe_hex}" - COMMENT "Producing a hex output using ${CMAKE_OBJCOPY}" - COMMAND ${CMAKE_OBJCOPY} -O ihex -I elf32-little "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" "${meta_dir}/${exe}/${exe_hex}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - BYPRODUCTS "${meta_dir}/${exe}/${exe_bin}" - COMMAND ${CMAKE_OBJCOPY} -O binary -I elf32-little "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" "${meta_dir}/${exe}/${exe_bin}" - ) - - add_custom_command( - TARGET ${exe}_postbuild - POST_BUILD - DEPENDS ${exe} - COMMENT "Generating lss file from ${exe} using ${CMAKE_OBJDUMP}" - COMMAND ${CMAKE_OBJDUMP} -xh "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${exe_full}" > "${meta_dir}/${exe}/${exe}.lss" - ) - #]] - -endfunction(add_executable exe) -endif(NOT COMMAND _add_executable) - - -if(NOT COMMAND _add_library) -function(add_library lib) - _add_library(${lib} ${ARGN}) - - # for now, just aborting. When namespaced targets are received as - # inputs to this function, for some reason a custom command conflict - # gets created since aparently an arbitrary number of custom targets - # can exist within the same namespace. Then, when build time occurs, - # cmake cannot produce a DAG since the dependency order of the - # custom targets is unclear - return() - - add_custom_target(${lib}_postbuild ALL DEPENDS ${lib}) - - add_custom_command( - TARGET ${lib}_postbuild - POST_BUILD - DEPENDS ${lib} - COMMENT "Built lib ${lib} with the following size:" - COMMAND ${CMAKE_SIZE} -B "${CMAKE_LIBRARY_OUTPUT_DIRECTORY} ${lib}" - ) - - add_custom_command( - TARGET ${lib}_postbuild - POST_BUILD - DEPENDS ${lib} - COMMENT "Generating lss file from ${lib} using ${CMAKE_OBJDUMP}" - BYPRODUCTS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/metadata/${lib}/${lib}.lss" - COMMAND ${CMAKE_OBJDUMP} -xh "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${lib}" > "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/metadata/${lib}/${lib}.lss" - ) -endfunction(add_library lib) -endif(NOT COMMAND _add_library) - -# dependencies come first -{{#each module}} -add_subdirectory({{this}}) -{{/each}} - -# executable targets after, and link against necessary dependencies -add_subdirectory(ipcd) -add_subdirectory(client) -add_subdirectory(dock) -add_subdirectory(isodock) -add_subdirectory(goofin) diff --git a/vision.txt b/vision.txt deleted file mode 100644 index fa05321..0000000 --- a/vision.txt +++ /dev/null @@ -1,148 +0,0 @@ -bulgogi's core is to be written in C. This includes the inference engine and rule validation. - -On top of this, projects are configured in Python. Running on top of the engine, you get stuff like: - -```py -# build.py -import bulgogi as bul - -bul.new_project('My Project') -bul.set_version('v1.0.0) -bul.set_author('Colby Simpson') - -bul.add_dir('src', bul.GLOB) - -# Project looks like: -# src -# \_ file.c -# \_ depend.c -# \_ radio.c -# \_ grub.h - -bul.build_all() -``` - -There's something about this that seems so fucking sick. - -It feels like I'm writing CMake...only not. It's everything bulgogi is supposed to be. - -The community doors swing wide open as well by including Python. Treating Python as a scripting language and doing the analysis in the underbelly. - -I've never done this before nor thought of doing this in this way. But I know I need to do it. - -There would be 2 separate version lines: the first (and current) would be the engine (C v0.1.10). The second would by the python version (Py v1.0.0) whatever. - -C bulgogi does all the thinking. Py bulgogi does all the configuration. - -#---------------------------------------------------------------------- - -YAML: -The YAML files (project.yaml and rules.yaml) serve as means for _persistence_ across builds. - -Bulgogi is meant to work from scratch, first in a repository as setup.py, all of the configuration in the script works to setup the .yamls. - -Once setup, a build.py will trigger the cascade of build actions that the configuration implies. - -(In other words, bulgogi lives on the system and is 'called-in' by the project configurer). - -Python: -In both cases, Python becomes the CLI. There's no passing around flags and argument schemes. The Python script reaches into the bulgogi ABI and triggers functions the same way a CLI would. - -Everything is a target: -This idea goes much deeper than I realized. - -For example, in the rules.yaml scheme, a `dir` type has been added. In reality, it is just like `lib` and `exe` in that bulgogi internal lists them as targets. - -Knowing whether target `dir2` or `src` is complete requires all of its dependent targets to be complete as well. - -You end up with a build/output log along the lines of: - - Found target 'src' - Building target 'src' - Found target 'module1' - Building target 'module1' - Found target 'module2' - Building target 'module2' - ... - -Really the entire build is pulled together by crawling 2 trees in parallel. One is a resetable state machine (rules.yaml) and the other is a todo list (project.yaml). - -Other build systems (?): -CMake is cool, but the way the configuration interfaces works does not limit bulgogi to CMake at all. - -In fact, it should be easy for developers to adopt the build system they choose. Bulgogi is flexible build system assistant. - -I think you end up with multiple engine extensions like: - - bul_make.c - bul_cmake.c - bul_meson.c - bul_bazel.c - ... - -And on and so. It's like write once build anywhere. - -The problem with embedding the build systems into the engine is that it isn't on the 'scripting' layer. - -Putting a pin on this for now. - -#-------------------------------------------------------------------------------- - -Lazy evulation: -What if the filesystem and the project.yaml working in tandem _didn't_ mean checking the filesystem at all. - -What if the check was only done at build time (or another build system's config 'generate' stage)? - -The engine could concentrate on parsing / building the relations without trapping constantly to talk to the FS. - -The rules could validate the 'optimistic' project structure without knowing whether all of the files are there. - -Then the build files are generated, it would be reasonable for an error to occur. Or if the files are missing, to make them. - -Everything is a target...everything is a dir: -I think I may have overlooked the tandem relationship between targets and directories. - -My first attempt at coding the 'FS layer' into the engine involved adding 2 new usage types (BUL_DIR and BUL_FILE) but I think it could be the wrong call. - -The original version of the engine (without dir support) actually read the new configuration format quite nicely. This makes me think it doesn't need such a major overhaul. - -The main problem, I've noticed, is that the re-apparation of the common 'src', 'inc', 'include' etc names would confuse the parser. - -Also, project.yaml was never intended to feed inputs into the project. It was meant to define outputs and their relationships. -But I know this to be wrong because every one of the entries in the project.yaml (except those which conformed to a particular pattern) were directory names. - -Meta-programming: -I should have known this would have been tricky to think about because this is programming a meta-programming system for a meta-build system. - -But I think I've now just realized the importance of rules.yaml. It's not just a way to validate a project configuration, it _defines_ and distinguishes targets, dirs, inputs and outputs from each other. - -The original version of bulgogi stuck to a single, hard-coded pattern implicitly. That's what allowed for the project.yaml to intermingle output targets with directory names without needing to search the filesystem. - -By using rules.yaml, entirely new meanings can be derived from the free-form schema in project.yaml. - ---- The Implicit C v0.1.10 rules.yaml - -lib: -- dir.. -- lib.. - -exe: -- dir -- lib.. - ---- - -Some notation may need to be changed. The basic idea is there: rules.yaml is the _interpretation_ for project.yaml using patterns. - -And because of this, the filesystem does not need to be checked. Pf a directory is missing for a particular target, there's a problem. - -Python CLI: -I admit that I'm still not 100% sure where the Python script comes in re project.yaml and rules.yaml. Perhaps a setup.py could be involved in setting those up. - -What I do know is that the build.py would work marvelously in running `bul.build()` as this would let the engine do the heavy lifting from a Python call. - -I like to think that shipping a project with a `setup.py` and `build.py` script to-go and only needing bulgogi to be installed as a pip module or something would be pretty great as far as lean setups go. - -It transcends the whole build system problem that everybody hates since it uses a completely independent and general purpose scription language as the high-level interface. - -It doesn't have an interface per se, the scripting language is the interface. It feels similar to me to how it isn't a build system per se but does build build system configurations.