Fix amalgam/unamalgam diffs

This commit is contained in:
Deomid Ryabkov committed 2021-06-12 00:22:26 +01:00
1 parent 34d4fb8cf0
commit d6c9d3c181
18 files changed
+27 -4

No files matched your search

+5 -3
View File
@@ -16,9 +16,11 @@ $ tools/unamalgam.py mongoose.c
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
$ tools/amalgam.py --prefix=MG --license=LICENSE --public-header=mongoose.h $(cat src/mongoose.c.manifest) > mongoose.c
```
The same applies to `mongoose.h`, except `--public-header` should be omitted during amalgamation.
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`.
```
$ tools/amalgam.py --prefix=MG --license=LICENSE $(cat src/mongoose.h.manifest) > mongoose.h
```
+1 -1
View File
@@ -3,4 +3,4 @@
set -x -e
tools/amalgam.py --prefix=MG --license=LICENSE $(cat src/mongoose.h.manifest) > mongoose.h
tools/amalgam.py --prefix=MG --public-header=mongoose.h --license=LICENSE $(cat src/mongoose.c.manifest) > mongoose.c
tools/amalgam.py --prefix=MG --license=LICENSE --public-header=mongoose.h $(cat src/mongoose.c.manifest) > mongoose.c
+1
View File
@@ -33,6 +33,7 @@ with open(fname) as f:
# open next file for writing
ofile = open(cur_src, "w")
ofile.write('\n')
print('=> %s' % cur_src, file=sys.stderr)
manifest.append(cur_src)
next(f)
+6
View File
@@ -0,0 +1,6 @@
#!/bin/bash
set -e -x
tools/unamalgam.py mongoose.h
tools/unamalgam.py mongoose.c