Amalgam/unamalgam mongoose networking library

  1. My goal is: To amalgam/unamalgam the source code according to

  2. My actions are:
    a) call first the
    $ tools/ mongoose.c

The folder common and mongoose are createtd. The folders contain *.c and *.h files. A mongoose.c.manifest is created.
Then I call
$ tools/ --prefix=MG --public-header=mongoose.h $(cat mongoose.c.manifest) > mongoose.c

  1. The result I see is: A file mongoose.c with following content:

#include “mongoose.h”
#line 1 “./$(cat”
#include “$(cat”
#line 1 “./mongoose.c.manifest)”
#include “mongoose.c.manifest)”

  1. My expectation & question is: I expected to get the original mongoose.c file.
  • why is the original mongoose.c file not created?
  • why is the workflow in in “reverse” order? I expected the process to be rather
    Development in multiple c and h files -> finally call to generate mongoose.c and mongoose.h. Why at all? Shouldn’t it be a one way process?




The unamalgam was created at a time when the unamalgamated sources were not published. Now they are, thus unamalgam is not needed - you’re correct.


Ok, thank you. There are still the questions:

How to generate the amalgam version of mongoose? The .manifest file is not part of the repository.

Which version is the “ground truth”? The collection of single source files or the mongoose.c & mongoose.h files?




The amalgamated mongoose.[ch] in the repo is the truth.

There are few files missing in the exported sources, thus you can’t amalgamate at this point.