SCons: Forcing SCons to duplicate files -


i have header-only library consisting of folder hierarchy , bunch of .hpp files i'd install. problem is, scons not copy folder build folder.

here directory layout looks like:

root   sconstruct   subdir     sconscript     the_lib        subdir_a          header_a.hpp        subdir_b          header_b.hpp   build     (...) 

here in subdir/sconscript:

all_headers = []  root, dirnames, filenames in os.walk('.'):     filename in fnmatch.filter(filenames, '*.hpp'):         fn  = os.path.join(root, filename)         all_headers.append((fn, root))  f, d in all_headers:     install.addheader( f, d ) 

i filenames along relative paths , then, use installer found in scons wiki other day.

observation: all_headers remains empty because the_lib folder not copied. tired subdir_env.dir('the_lib'), did not change thing.

after running script, have the_lib/sconscript in build folder, nothing else. of course can understand filesystem walk nothing in case.

can me?

update

the way out found run find -name "*.hpp" , paste result sconscript. works charm now, since library external 1 (and maybe files added or removed), thought of more generic solution without need know headers name.

the first thing thought of use scons install() builder, install actual scons targets in different locations, , since these header files not targets, wont work.

so, in case, can use called scons copy factory.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -