Generate SConstruct files and Makefiles in the build directory
This commit is contained in:
parent
3a15fef000
commit
a3b1946871
4 changed files with 21 additions and 3 deletions
|
|
@ -1039,9 +1039,10 @@ if env['build_docs']:
|
|||
SConscript('doc/SConscript')
|
||||
|
||||
if 'samples' in COMMAND_LINE_TARGETS or 'install' in COMMAND_LINE_TARGETS:
|
||||
VariantDir('build/samples', 'samples', duplicate=0)
|
||||
sampledir_excludes = ['ct2ctml', '\\.o$', '^~$', 'xml$', '\\.in',
|
||||
'SConscript', 'Makefile.am']
|
||||
SConscript('samples/cxx/SConscript')
|
||||
SConscript('build/samples/cxx/SConscript')
|
||||
|
||||
# Install C++ samples
|
||||
inst = env.RecursiveInstall(pjoin('$inst_sampledir', 'cxx'),
|
||||
|
|
@ -1050,8 +1051,8 @@ if 'samples' in COMMAND_LINE_TARGETS or 'install' in COMMAND_LINE_TARGETS:
|
|||
installTargets.extend(inst)
|
||||
|
||||
if env['f90_interface'] == 'y':
|
||||
SConscript('samples/f77/SConscript')
|
||||
SConscript('samples/f90/SConscript')
|
||||
SConscript('build/samples/f77/SConscript')
|
||||
SConscript('build/samples/f90/SConscript')
|
||||
|
||||
if env['addInstallTargets'] and env['f90_interface'] == 'y':
|
||||
# install F90 / F77 samples
|
||||
|
|
|
|||
|
|
@ -41,3 +41,8 @@ for subdir, name, extensions in samples:
|
|||
localenv['tmpl_sourcename'] = name + '.cpp'
|
||||
|
||||
sconstruct = localenv.SubstFile(pjoin(subdir, 'SConstruct'), 'SConstruct.in')
|
||||
if env['addInstallTargets']:
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'cxx', subdir), makefile)
|
||||
installTargets.extend(inst)
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'cxx', subdir), sconstruct)
|
||||
installTargets.extend(inst)
|
||||
|
|
|
|||
|
|
@ -33,3 +33,9 @@ sconstruct = localenv.SubstFile('SConstruct', 'SConstruct.in')
|
|||
|
||||
# Generate Makefile to be installed
|
||||
makefile = localenv.SubstFile('Makefile', 'Makefile.in')
|
||||
|
||||
if env['addInstallTargets']:
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'f77'), makefile)
|
||||
installTargets.extend(inst)
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'f77'), sconstruct)
|
||||
installTargets.extend(inst)
|
||||
|
|
|
|||
|
|
@ -32,3 +32,9 @@ for programName, sources in samples:
|
|||
localenv['make_target'] = programName
|
||||
localenv['make_sourcefile'] = programName + '.f90'
|
||||
makefile = localenv.SubstFile('Makefile', 'Makefile.in')
|
||||
|
||||
if env['addInstallTargets']:
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'f90'), makefile)
|
||||
installTargets.extend(inst)
|
||||
inst = localenv.Install(pjoin('$inst_sampledir', 'f90'), sconstruct)
|
||||
installTargets.extend(inst)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue