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

@@ -19,7 +19,9 @@ def prolog_cafe_library(
visibility = []):
genrule(
name = name + '__pl2j',
cmd = '$(exe //lib/prolog:compiler) $SRCS $DEPS $OUT',
cmd = 'cd $SRCDIR;$(exe //lib/prolog:compiler) $DEPS ' +
' '.join(srcs) +
' $OUT',
srcs = srcs,
deps = ['//lib/prolog:compiler'],
out = name + '.src.zip',