mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-20 19:41:58 +00:00
Publish the amalgamation tools
PUBLISHED_FROM=27ed0bd32e33252495b92361d2943a3450448f62
This commit is contained in:
1 parent
4d76a3be4c
commit
d63fb70c69
4 files changed
+218
No files matched your search
@@ -0,0 +1,22 @@
|
||||
# Amalgamation
|
||||
|
||||
Mongoose is distributed as two files, `mongoose.c` and `mongoose.h` for ease of integration.
|
||||
However, when developing Mongoose itself, it can be quite difficult to work with them.
|
||||
Internally, these files are an _amalgamation_ of source an header modules.
|
||||
This directory contains utilities to split and re-constitute amalgamated files.
|
||||
|
||||
Here's how `mongoose.c` can be split into its consituent parts:
|
||||
```
|
||||
$ tools/unamalgam mongoose.c
|
||||
=> mongoose/src/internal.h
|
||||
=> common/cs_dbg.h
|
||||
...
|
||||
```
|
||||
|
||||
This produces directories and files under `mongoose/` and `common/` that are easeier to work with.
|
||||
It also produces `mongoose.c.manifest` which can later be used to reconstruct the file back:
|
||||
```
|
||||
$ tools/amalgam --prefix=MG --public-header=mongoose.h $(cat mongoose.c.manifest) > mongoose.c
|
||||
```
|
||||
|
||||
The same applies to `mongoose.h`, except `--public-header` should be omitted during amalgamation.
|
||||
Reference in new issue
Block a user