|
View:
New views
6 Messages
—
Rating Filter:
Alert me
|
|
|
Installing directories and sub dirs in JamrootAs part of the install of a build, I need to copy the contents of some directories, including their subdirs.
Do I need to place a jamfile in each of the directories/subdirs to use glob-tree? The directory struture is similar to:
dir1
subdir1 subdir1a testresult subdir2 testresult Would it be better to create an action/rule to use cp -rf? thanks,
Cleo _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: Installing directories and sub dirs in JamrootClovis Olson wrote:
> As part of the install of a build, I need to copy the contents of some > directories, including their subdirs. > Do I need to place a jamfile in each of the directories/subdirs to use > glob-tree? > The directory struture is similar to: > dir1 > subdir1 > subdir1a > testresult > subdir2 > testresult > > Would it be better to create an action/rule to use cp -rf? You can use lower level path.glob-tree import path ; install dataToCopy : [ path.glob-tree /path/aaa : *.* ] : <location>/destination/path/ ; _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: Installing directories and sub dirs in JamrootThanks Juraj for the quick response. I am receiving duplicate name: /usr/share/boost-build/build/virtual-target.jam:1032: in virtual-target.register-actual-name from module virtual-target error: Duplicate name of actual target: <pdist/release/tests/unit1>testresult.txt error: previous virtual target { common%common.copy-testresult.txt. { tests/unit1/100/testresult.txt. } } error: created from ./testcopy error: another virtual target { common%common.copy-testresult.txt. { tests/unit1/200/testresult.txt. } } error: created from ./testcopy error: added properties: none error: removed properties: none Is there a way to get around this? thanks, cleo From: Juraj Ivančić <juraj.ivancic@...> To: boost-build@... Sent: Wed, October 14, 2009 12:49:27 AM Subject: Re: [Boost-build] Installing directories and sub dirs in Jamroot Clovis Olson wrote: > As part of the install of a build, I need to copy the contents of some directories, including their subdirs. > Do I need to place a jamfile in each of the directories/subdirs to use glob-tree? > The directory struture is similar to: > dir1 > subdir1 > subdir1a > testresult > subdir2 > testresult > > Would it be better to create an action/rule to use cp -rf? You can use lower level path.glob-tree import path ; install dataToCopy : [ path.glob-tree /path/aaa : *.* ] : <location>/destination/path/ ; _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: Installing directories and sub dirs in JamrootClovis Olson wrote:
> I am receiving duplicate name: > > /usr/share/boost-build/build/virtual-target.jam:1032: in > virtual-target.register-actual-name from module virtual-target > error: Duplicate name of actual target: > <pdist/release/tests/unit1>testresult.txt > error: previous virtual target { common%common.copy-testresult.txt. { > tests/unit1/100/testresult.txt. } } > error: created from ./testcopy > error: another virtual target { common%common.copy-testresult.txt. { > tests/unit1/200/testresult.txt. } } > error: created from ./testcopy > error: added properties: none > error: removed properties: none > > Is there a way to get around this? Please don't top-post. This error means that there are two targets which produce the same file. This occurs because install rule by default copies files without preserving directory hierarchy. To preserve hierarchy you must specify <install-source-root>. See http://www.boost.org/doc/tools/build/doc/html/bbv2/tasks/installing.html Section "Preserving Directory Hierarchy". E.g. install dataToCopy : [ path.glob-tree /path/aaa : *.* ] : <location>/destination/path <install-source-root>/path/aaa ; _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: Installing directories and sub dirs in Jamroot" See http://www.boost.org/doc/tools/build/doc/html/bbv2/tasks/installing.html Section "Preserving Directory Hierarchy". " Thanks. This works. The only issue I have is that some of the directory names have periods in them, causing this error: error: Unable to find file or target named error: 'tests/unit1/200/220.1' error: referred from project at error: '.' Is there a way around this, or do I have to rename the directories? |
|
|
Re: Installing directories and sub dirs in Jamrootcleo wrote:
> > " > See > > http://www.boost.org/doc/tools/build/doc/html/bbv2/tasks/installing.html > Section "Preserving Directory Hierarchy". > " > > Thanks. This works. The only issue I have is that some of the directory > names have periods in them, causing this error: > > error: Unable to find file or target named > error: 'tests/unit1/200/220.1' > error: referred from project at > error: '.' > > Is there a way around this, or do I have to rename the directories? My last suggestion fails to work on directories with dot and files without dot. Improved version: import path ; rule get-files ( dir ) { local result ; local filesAndDirs = [ path.glob-tree $(dir) : * ] ; for i in $(filesAndDirs) { if [ CHECK_IF_FILE $(i) ] { result += $(i) ; } } return $(result) ; } install dataToInstall : [ get-files /path/aaa ] : <location>/destination/path <install-source-root>/path/aaa ; _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
| Free embeddable forum powered by Nabble | Forum Help |