Fix path used in generated prolog class names

Force relative paths by passing the Prolog compiler only a relative
name from within $SRCDIR.  This avoids picking up the user's $HOME
path as part of the generated class file names, and prevents build
failures on filesystems where individual path components are limited
to 256 bytes.

Change-Id: I43f2a93daf857413401f4e1aeb24b9b2a8c741fe
This commit is contained in:
Shawn Pearce
2013-08-06 17:32:43 -07:00
parent 5c8e0a5937
commit 980b51f64e
6 changed files with 15 additions and 14 deletions

View File

@@ -1,5 +1,3 @@
include_defs('//lib/prolog/prolog.defs')
SRCS = glob(['src/main/java/**/*.java'])
RESOURCES = glob(['src/main/resources/**/*'])
@@ -60,20 +58,13 @@ java_sources(
visibility = ['PUBLIC'],
)
prolog_cafe_library(
name = 'common_rules',
srcs = ['src/main/prolog/gerrit_common.pl'],
deps = [':server'],
visibility = ['PUBLIC'],
)
java_test(
name = 'server_tests',
srcs = glob(['src/test/java/**/*.java']),
resources = glob(['src/test/resources/**/*']),
deps = [
':server',
':common_rules',
'//gerrit-server/src/main/prolog:common',
'//gerrit-antlr:query_exception',
'//gerrit-antlr:query_parser',
'//gerrit-common:server',

View File

@@ -0,0 +1,8 @@
include_defs('//lib/prolog/prolog.defs')
prolog_cafe_library(
name = 'common',
srcs = ['gerrit_common.pl'],
deps = ['//gerrit-server:server'],
visibility = ['PUBLIC'],
)