From: David Abrahams (dave_at_[hidden])
Date: 2004-12-29 23:22:05
Eric Niebler wrote:
> David Abrahams wrote:
>> Eric Niebler wrote:
>>>I recommend changing the common.variable-setting-command on *nix systems
>>>to evaluate to:
>>> return "$(variable)=$(value);export $(variable)" ;
>> It's not the right fix; it breaks HTML generation. The problem is that
>> on Unix systems, the
>> <VARIABLE>=<value> <command>
>> (all on the same line) syntax is used.
> Yeah, I got it wrong, sorry. This works better for me:
> return "$(variable)=$(value);export $(variable);$(nl)" ;
>> Here's what I did to get it
>> to work:
> <snip hackish fix>
> This shouldn't be necessary. The fop rule is broken
No. There's nothing hackish about my fix. The fop.bat in my fop
installation is what's broken, because it can only be correctly invoked
from the fop installation directory.
> or it's the
> common.variable-setting-command rule, but either way, nobody should have
> to hack their fop / java installations to make this work.
possibly fop's action could be adjusted to translate all target paths to
absolute directories and cd into the fop installation directory before
running the action -- but that's really against the spirit of Jam, and
I'm not even certain there's a way to do it.
Heh, look, I tried. It's even more of a hack than what I did before.
local rule find-by-absolute-path ( target )
# Mask off any vars by these names that may be hanging around in
# outer dynamic scopes.
local LOCATE SEARCH ;
# simulate the target binding process to find the target
local found = on $(target) [ GLOB $(LOCATE) (SEARCH) : $(target:G=) ] ;
# Re-LOCATE the target with an absolute path if it isn't
# already absolute.
local cwd = [ PWD ] ;
LOCATE on $(target) = (found:D:R=$(cwd)) ;
rule render ( source : target : properties * )
find-by-absolute-path $(source) ;
find-by-absolute-path $(target) ;
cd on $(target) = "cd "$(FOP_COMMAND:D) ;
$(FOP_COMMAND) $(>) $(<)
And it doesn't even work for this weird cygwin/windows hybrid situation,
because guess what? The absolute paths created end up being cygwin
native paths. And I promise you, the code to detect that a windows
FOP/Java is being used and create absolute windows paths is even more
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk