Previously the #line macro directives were always included in the
generated single source output. However, this adds quite a lot of
size to the source file (not to the binary) and it is only useful
for the library developers. Hence, it is now disabled by default.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
Detected and fixed minor issues with the single-source generation:
* On Windows the line info generation now correctly escapes the path separators.
* Fixed an incorrect C file include order. Now the global object C file is
force included to get all common headers at the start in the generated source
file.
* Added a missing colon which fixed the correct removal of the config.h include.
* Fix the command line help.
* Small typo fix.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
Changes done:
* Added usage/configuration info for this mode.
* Created `tools/srcgenerator.py` to allow source/header generation
without using CMake.
* Adapted CMake to use the `srcgenerator.py` script.
* Added jerry-libm single-source build.
* Improved the `srcmerger.py` script to correctly handle the line numbering.
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com
Introduce a new way of building: before any file is compiled
all source files are combined into a single C file and all
header files into a single H file (per subdir).
This new approach makes it possible to quickly integrate JerryScript
into other projects:
```
$ gcc -o demo demo.c jerryscript.c jerryscript-port-default.c -lm
```
To use the source generator run:
```
$ cmake -Bbuild_dir -H. -DENABLE_ALL_IN_ONE_SOURCE=ON
$ make -C build_dir generate-single-source
```
This will create the following files in the `build_dir`:
* jerryscript.c
* jerryscript.h
* jerryscript-config.h
* jerryscript-port-default.c
* jerryscript-port-default.h
JerryScript-DCO-1.0-Signed-off-by: Peter Gal pgal.u-szeged@partner.samsung.com