From 76034ae4d7db051d0dd351e9880b8322c6db5883 Mon Sep 17 00:00:00 2001 From: Joe Rozner <joe@prevoty.com> Date: Thu, 21 Nov 2013 12:02:18 -0800 Subject: [PATCH] Install internal headers for Go bindings Go, and likely other language bindings will, need access to create new combinators. This functionality is currently located src/parsers/parser_internal.h. Install this header to the system with dependent headers until a better solution can be found. --- SConstruct | 4 ++++ src/SConscript | 14 +++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 422efe64..ebed8b4e 100644 --- a/SConstruct +++ b/SConstruct @@ -28,6 +28,8 @@ if 'DESTDIR' in env: env['libpath'] = calcInstallPath("$prefix", "lib") env['incpath'] = calcInstallPath("$prefix", "include", "hammer") +env['parsersincpath'] = calcInstallPath("$prefix", "include", "hammer", "parsers") +env['backendsincpath'] = calcInstallPath("$prefix", "include", "hammer", "backends") env['pkgconfigpath'] = calcInstallPath("$prefix", "lib", "pkgconfig") env.ScanReplace('libhammer.pc.in') @@ -90,4 +92,6 @@ env.Command('test', 'build/$VARIANT/src/test_suite', 'env LD_LIBRARY_PATH=build/ env.Alias("install", "$libpath") env.Alias("install", "$incpath") +env.Alias("install", "$parsersincpath") +env.Alias("install", "$backendsincpath") env.Alias("install", "$pkgconfigpath") diff --git a/src/SConscript b/src/SConscript index a06244b9..1d9ca762 100644 --- a/src/SConscript +++ b/src/SConscript @@ -6,7 +6,17 @@ bindings = [] dist_headers = [ "hammer.h", "allocator.h", - "glue.h" + "glue.h", + "internal.h" +] + +parsers_headers = [ + "parsers/parser_internal.h" +] + +backends_headers = [ + "backends/regex.h", + "backends/contextfree.h" ] parsers = ['parsers/%s.c'%s for s in @@ -64,6 +74,8 @@ libhammer_static = env.StaticLibrary('hammer', parsers + backends + misc_hammer_ env.Install("$libpath", [libhammer_static, libhammer_shared]) env.Install("$incpath", dist_headers) +env.Install("$parsersincpath", parsers_headers) +env.Install("$backendsincpath", backends_headers) env.Install("$pkgconfigpath", "../../../libhammer.pc") testenv = env.Clone() -- GitLab