Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| how [2022/02/23 21:48] – deva | how [2022/02/26 12:52] (current) – deva | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======The How====== | ======The How====== | ||
| - | * the '' | + | |
| - | * '' | + | |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * '' | + | * '' |
| - | * self-re-invoke (after re-compilation) | + | * '' |
| - | * tree of self-dependency weirdness | + | * '' |
| - | * configure | + | * '' |
| - | * cross-compilation | + | * cross-compilation and tool-chain control |
| + | * trixy self-re-invoke (after re-compilation) | ||
| + | * tree of self-dependency weirdness: | ||
| + | * < | ||
| + | 2 if configure | ||
| + | 4 if reconfigure arg call reconfigure(args), | ||
| + | 1,3 other rebuildCheck | ||
| + | 1 build dirty project sources... | ||
| + | |||
| + | configure(args) | ||
| + | collect (relevant) env vars in map: A | ||
| + | collect (relevant) cli args in map: B | ||
| + | call generateCache(A, | ||
| + | then call rebuildCheck to force rebuild | ||
| + | |||
| + | reconfigure(args) | ||
| + | read A and B from (current) config cache and call generateCache(A, | ||
| + | generate a new one | ||
| + | then call rebuildCheck to rebuild and then exit | ||
| + | |||
| + | rebuildCheck() | ||
| + | check if rebuild is needed (if any ctor.cc files or configuration.cc changed): | ||
| + | rebuild | ||
| + | if !"only configuration.cc changed" | ||
| + | |||
| + | generateCache(A, | ||
| + | resolv | ||
| + | run through externals and resolv them, store results in map: D | ||
| + | generate config cache .cc file with A, B, C and D | ||
| + | Scenarios: | ||
| + | |||
| + | 1. No ctor deps changed (normal run) | ||
| + | | ||
| + | OK | ||
| + | |||
| + | 2. a new configuration.cc has been generated (user called configure) | ||
| + | | ||
| + | * rebuild | ||
| + | OK | ||
| + | |||
| + | 3. one or more ctor.cc files changed (run with args) | ||
| + | * rebuild | ||
| + | | ||
| + | OK | ||
| + | |||
| + | 4. run with reconfigure (with other args) | ||
| + | " | ||
| + | | ||
| + | * rebuild | ||
| + | | ||
| + | OK | ||
| + | </ | ||
| + | * independent target compilation (with dependency deduction) | ||
| + | * '' | ||
| * bootstrapping (yes - libctor compiles itself) | * bootstrapping (yes - libctor compiles itself) | ||
| - | * unit tests | + | * '' |
| - | * future: | + | * compilation-database (json) for c-lion and others |
| - | * external dependency deduction | + | |
| - | * compilation configuration control through configure target (ala '' | + | * currently working on: |
| - | * install target | + | * external |
| + | * manual dependency | ||
| + | * automatic | ||
| + | |||
| + | * future work: | ||
| + | * more external dependency variants: | ||
| + | * pkg-config | ||
| + | * conan | ||
| + | * pre-/ | ||
| + | * globbing | ||
| + | * custom target generation through external application (generators) | ||
| + | * lambda functions as generators | ||
| + | * custom | ||
| + | * '' | ||
| + | * documentation :-) | ||