arturoc / oscpack

Automatically exported from code.google.com/p/oscpack
Other
7 stars 5 forks source link

Create a "one file" compilation of the library (one header file, one source file) #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's been suggested that a one-file distribution would be nice.

If I had time I would write a Python script to do it (so it can be run on any 
platform).

Here's what I think the script would need to look like:

For each source file it would need to strip of the licence header and add a 
#file directive with the correct file and line information

For each line containing #include it would need to comment out the #include and 
either:
    for system includes, add it to a system include list if it wasn't already there
    for oscpack includes, just skip it

The files need to be pasted together in order

The final assembly looks like this:

/////////////
description block
do not modify this file, it is generated from source
/////////////
licence block
/////////////
concatenated portable sources
/////////////
#include oscpackonefile.h
#ifdef win32 etc
windows platform includes
concatenated windows oscpack sources
#else
posix includes
concatenated posix oscpack sources
#endif

Maybe put the version, generation date and svn revision in the header block.

Original issue reported on code.google.com by ross.bencina on 4 Mar 2013 at 11:41