2 messages in com.perforce.jamming[jamming] Creating relative paths, ou...| From | Sent On | Attachments |
|---|---|---|
| Raym...@orion.no | 24 Aug 1999 08:05 | .jamrules, .jamfile |
| Igor...@fi.uib.no | 25 Aug 1999 02:27 |
| Subject: | [jamming] Creating relative paths, outside current tree![]() |
|---|---|
| From: | Igor...@fi.uib.no (Igor...@fi.uib.no) |
| Date: | 08/25/1999 02:27:54 AM |
| List: | com.perforce.jamming |
Try to put at the Jamrules top the following (I assume Jamrules is in .../DevRoot/src/TS):
if ! $(DEVROOT) { local tmp ; # Make tmp a relative path from .../DevRoot/src/TS to ../DevRoot makeSubDir tmp : src TS ; # Assuming that TOP is a relative path from jam invocation directory to ../DevRoot/src/TS, # prefix TOP by tmp and set it to DEVROOT. Note: does not work if TOP is an absolute path DEVROOT = $(TOP:R=$(tmp)) ; }
Also I would advise to replace "TOP = . ;" in your top Jamfile by SubDir TOP ;
Regards, Igor
-- Igor Boukanov Company: Well Service Technology AS Work: +47 5552 5075 Email: Igor...@wst.no Fax: +47 5552 5051 Web: http://www.wst.no/ Mobil: +47 916 28 390
Raymond Wiker wrote:
I'm working on a project where the prohect source files are located under /DevRoot/src/..., while a number of third-party modules are placed under /DevRoot/ext/...
I have a top-level Jamfile at //DevRoot/src/TS/Jamfile, which includes Jamfiles for directories at lower levels. At the moment the only rule I use through the Jamfiles are for compiling idl files into C++ headers, skeletons and stubs, and the rules assume that the idl file is in the current directory (i.e, the same file as the Jamfile that refers to it), and that the generated files should also placed in this directory.
For obvious(!) reasons I want to break this restriction. In particular, I want to have Jam call the idl generator in such a way that the generated files are placed in the current directory, while the IDL source files can be placed outside the tree spanned by the set of Jamfiles (e.g, under /DevRoot/ext). An example of a valid IDL command (for a particular idl compiler) is
idl -B -A -I../../../../ext/ACE_wrappers/TAO/orbsvcs \ -out . \ ../../../../ext/ACE_wrappers/TAO/orbsvcs/examples/CosEC/Factory/CosEventChannelFactory.idl
It would be quite acceptable to explicitly list the include paths for the idl generator, as well as for the idl file, but I want the paths to be relative. Note that TOP is //DevRoot/src/TS, and I want to access files under //DevRoot/ext.
(Hum... I just realised that I could use a variable DEVROOT, and make TOP relative to that, and make the dependencies relative to that... is there a viable alternative?)
My current Jamrules file looks like this:
------------------------------------------------------------------------ # Jam rules for compiling idl files to C++, using the Orbix idl compiler.
if $(DEVROOT) { makeDirName IDL : $(DEVROOT) ext orbix bin "idl.exe" ; } else { EXIT Please set the environment variable DEVROOT to the root of your Perforce client ; }
IDLFLAGS = "-A" ; IDLBOAFLAGS = -B ;
NOTFILE idlfiles ;
rule Idl { MakeLocate $(<) : $(LOCATE_TARGET) ; SEARCH on $(>) = $(SEARCH_SOURCE) ; DEPENDS idlfiles : $(<) ; DEPENDS $(<) : $(>) ; }
rule IdlBOA { MakeLocate $(<) : $(LOCATE_TARGET) ; SEARCH on $(>) = $(SEARCH_SOURCE) ; DEPENDS idlfiles : $(<) ; DEPENDS $(<) : $(>) ; }
actions Idl { $(IDL) $(IDLFLAGS) $(>) }
actions IdlBOA { $(IDL) $(IDLFLAGS) $(IDLBOAFLAGS) $(>) }
rule IdlBOAObject { local _newExts ; _newExts = .hh S.CPP C.CPP ; IdlBOA $(<:B)$(_newExts) : $(<) ; }
rule IdlObject { local _newExts ; _newExts = .hh S.CPP C.CPP ; Idl $(<:B)$(_newExts) : $(<) ; }
------------------------------------------------------------------------
And the top-level Jamfile:
------------------------------------------------------------------------ # Top level Jamfile for TradeSys project(s).
TOP = . ;
SubInclude TOP MarketServer ; SubInclude TOP TradeSysRM ; SubInclude TOP TradeSysGW ; SubInclude TOP SessionManagement ;





.jamrules, .jamfile