https://github.com/averms/ccombine
Bundles a C/C++ source file, recursively inlining any local includes.
https://github.com/averms/ccombine
Last synced: about 1 month ago
JSON representation
Bundles a C/C++ source file, recursively inlining any local includes.
- Host: GitHub
- URL: https://github.com/averms/ccombine
- Owner: averms
- License: 0bsd
- Created: 2020-11-14T06:45:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-13T07:24:13.000Z (over 4 years ago)
- Last Synced: 2025-10-04T11:37:53.839Z (9 months ago)
- Language: Shell
- Homepage:
- Size: 46.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ccombine
`ccombine` is based on a script in the Zstd source called [`combine.sh`][csh].
I rewrote it in Python because the original is very slow (see
[the benchmark][bnh]). The only change is a better command-line interface.
It can be used to create an amalgamated distribution of your library for easy
embedding into another source tree. Some reasons to do this are outlined in
[nothings/stb][sfl] and ["SQLite is really easy to compile"][je].
You can install it by cloning and running `pip install .`. This will install a
script called `ccombine` into your Python environment. Alternatively, you can
simply download [`ccombine.py`][ccom]. The only requirement is Python 3.7 and
its standard library.
If you need 3.6 compatibility see the python36-compat branch. Note that it is
often rebased and force-pushed.
[sfl]: https://github.com/nothings/stb#why-single-file-headers
[je]: https://jvns.ca/blog/2019/10/28/sqlite-is-really-easy-to-compile/
[csh]: https://github.com/facebook/zstd/blob/69b8361b0c92b0f2cc145eea17b7ff930166ea9d/contrib/single_file_libs/combine.sh
[ccom]: https://github.com/averms/ccombine/raw/master/source/ccombine.py
[bnh]: benchmark/README.md