aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/env.c2
-rw-r--r--src/node.c2
-rw-r--r--src/reader.c2
-rw-r--r--src/uri.c2
-rw-r--r--src/writer.c2
-rw-r--r--wscript24
6 files changed, 34 insertions, 0 deletions
diff --git a/src/env.c b/src/env.c
index ac987ccc..3d64d2b1 100644
--- a/src/env.c
+++ b/src/env.c
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file env.c */
+
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/src/node.c b/src/node.c
index 01904375..0b306489 100644
--- a/src/node.c
+++ b/src/node.c
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file node.c */
+
#include <stdlib.h>
#include <string.h>
diff --git a/src/reader.c b/src/reader.c
index 913f3197..226c359a 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file reader.c */
+
#include <assert.h>
#include <stdarg.h>
#include <stdbool.h>
diff --git a/src/uri.c b/src/uri.c
index 53247fb2..997489ba 100644
--- a/src/uri.c
+++ b/src/uri.c
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file uri.c */
+
#include <assert.h>
#include <stdlib.h>
#include <string.h>
diff --git a/src/writer.c b/src/writer.c
index d06e906c..5f08df62 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/** @file writer.c */
+
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/wscript b/wscript
index 067b3629..5c4af7dd 100644
--- a/wscript
+++ b/wscript
@@ -5,6 +5,7 @@ import autowaf
import filecmp
import glob
import os
+import shutil
import subprocess
# Version of this package (even if built as a child)
@@ -113,6 +114,29 @@ def build(bld):
def lint(ctx):
subprocess.call('cpplint.py --filter=-whitespace,+whitespace/comments,-build/header_guard,-readability/casting,-readability/todo src/* serd/*', shell=True)
+def amalgamate(ctx):
+ shutil.copy('serd/serd.h', 'build/serd-%s.h' % SERD_VERSION)
+ amalgamation = open('build/serd-%s.c' % SERD_VERSION, 'w')
+
+ serd_internal_h = open('src/serd_internal.h')
+ for l in serd_internal_h:
+ amalgamation.write(l)
+ serd_internal_h.close()
+
+ for f in 'env.c node.c reader.c uri.c writer.c'.split():
+ fd = open('src/' + f)
+ header = True
+ for l in fd:
+ if header:
+ if l == ' */\n':
+ header = False
+ else:
+ if l != '#include "serd_internal.h"\n':
+ amalgamation.write(l)
+ fd.close()
+
+ amalgamation.close()
+
def test(ctx):
try:
os.makedirs('build/tests')