Files
mongoose/tools/README.md
T
Deomid Ryabkov be64f81eee Add mg_next_query_string_entry_n() and mg_url_decode_n()
Move to mg_util.h so encode and decode are next ot each other.

Pull out mg_next_list_entry_n() for advanced use cases.

Add unit tests.
2020-10-24 22:53:50 +01:00

25 lines
978 B
Markdown

# 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 and 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.py mongoose.c
=> src/mg_internal.h
=> src/common/mg_mem.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.py --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.
`tools/amalgam.py` can be used to assemble `mongoose.c` and `mongoose.h`.