Merge pull request #58 from jrozner/master
Changes for doing a proper system install and Go bindings
This commit is contained in:
commit
1ec64f4938
6 changed files with 38 additions and 1 deletions
|
|
@ -28,6 +28,8 @@ if 'DESTDIR' in env:
|
||||||
|
|
||||||
env['libpath'] = calcInstallPath("$prefix", "lib")
|
env['libpath'] = calcInstallPath("$prefix", "lib")
|
||||||
env['incpath'] = calcInstallPath("$prefix", "include", "hammer")
|
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['pkgconfigpath'] = calcInstallPath("$prefix", "lib", "pkgconfig")
|
||||||
env.ScanReplace('libhammer.pc.in')
|
env.ScanReplace('libhammer.pc.in')
|
||||||
|
|
||||||
|
|
@ -35,6 +37,7 @@ env.MergeFlags("-std=gnu99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-attr
|
||||||
|
|
||||||
if not env['PLATFORM'] == 'darwin':
|
if not env['PLATFORM'] == 'darwin':
|
||||||
env.MergeFlags("-lrt")
|
env.MergeFlags("-lrt")
|
||||||
|
env.Append(SHLINKFLAGS = ['-install_name ' + '$TARGET'])
|
||||||
|
|
||||||
AddOption("--variant",
|
AddOption("--variant",
|
||||||
dest="variant",
|
dest="variant",
|
||||||
|
|
@ -90,4 +93,6 @@ env.Command('test', 'build/$VARIANT/src/test_suite', 'env LD_LIBRARY_PATH=build/
|
||||||
|
|
||||||
env.Alias("install", "$libpath")
|
env.Alias("install", "$libpath")
|
||||||
env.Alias("install", "$incpath")
|
env.Alias("install", "$incpath")
|
||||||
|
env.Alias("install", "$parsersincpath")
|
||||||
|
env.Alias("install", "$backendsincpath")
|
||||||
env.Alias("install", "$pkgconfigpath")
|
env.Alias("install", "$pkgconfigpath")
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,17 @@ bindings = []
|
||||||
dist_headers = [
|
dist_headers = [
|
||||||
"hammer.h",
|
"hammer.h",
|
||||||
"allocator.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
|
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("$libpath", [libhammer_static, libhammer_shared])
|
||||||
env.Install("$incpath", dist_headers)
|
env.Install("$incpath", dist_headers)
|
||||||
|
env.Install("$parsersincpath", parsers_headers)
|
||||||
|
env.Install("$backendsincpath", backends_headers)
|
||||||
env.Install("$pkgconfigpath", "../../../libhammer.pc")
|
env.Install("$pkgconfigpath", "../../../libhammer.pc")
|
||||||
|
|
||||||
testenv = env.Clone()
|
testenv = env.Clone()
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* NOTE: This is an internal header and installed for use by extensions. The
|
||||||
|
* API is not guaranteed stable.
|
||||||
|
*/
|
||||||
|
|
||||||
// This is an internal header; it provides macros to make desugaring cleaner.
|
// This is an internal header; it provides macros to make desugaring cleaner.
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include "../internal.h"
|
#include "../internal.h"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* NOTE: This is an internal header and installed for use by extensions. The
|
||||||
|
* API is not guaranteed stable.
|
||||||
|
*/
|
||||||
|
|
||||||
// Internal defs
|
// Internal defs
|
||||||
#ifndef HAMMER_BACKEND_REGEX__H
|
#ifndef HAMMER_BACKEND_REGEX__H
|
||||||
#define HAMMER_BACKEND_REGEX__H
|
#define HAMMER_BACKEND_REGEX__H
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,11 @@
|
||||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* NOTE: This is an internal header and installed for use by extensions. The
|
||||||
|
* API is not guaranteed stable.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef HAMMER_INTERNAL__H
|
#ifndef HAMMER_INTERNAL__H
|
||||||
#define HAMMER_INTERNAL__H
|
#define HAMMER_INTERNAL__H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
/*
|
||||||
|
* NOTE: This is an internal header and installed for use by extensions. The
|
||||||
|
* API is not guaranteed stable.
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef HAMMER_PARSE_INTERNAL__H
|
#ifndef HAMMER_PARSE_INTERNAL__H
|
||||||
#define HAMMER_PARSE_INTERNAL__H
|
#define HAMMER_PARSE_INTERNAL__H
|
||||||
#include "../hammer.h"
|
#include "../hammer.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue