#! /usr/bin/env python

"""
help       -> scons -h
compile    -> scons
clean      -> scons -c
install    -> scons install
uninstall  -> scons -c install
configure  -> scons configure prefix=/tmp/ita debug=full extraincludes=/usr/local/include:/tmp/include prefix=/usr/local

Run from a subdirectory -> scons -u
The variables are saved automatically after the first run (look at cache/kde.cache.py, ..)
"""

###################################################################
# LOAD THE ENVIRONMENT AND SET UP THE TOOLS
###################################################################

## Load the builders in config
env = Environment(tools=['default', 'generic', 'kde'], toolpath=['./', './bksys'])
env.KDEuse("environ rpath")

#env['DUMPCONFIG']=1

###################################################################
# SCRIPTS FOR BUILDING THE TARGETS
###################################################################
env.set_build_dir('po opale doc', 'build')



############################
## Process the documentation
############################
## Use docfolder for each documentation directory
## The parameters of docfolder are: documentation dir, language code, app name
#env.docfolder('build/doc/en/', 'en', 'opale/')
#env.docfolder('build/doc/fr/', 'fr', 'opale/')

############################
## Process the translations
############################
env.KDElang('build/po/', 'opale')


############################
## Sources to process
############################
env.subdirs('build/opale')


###################################################################
# CONVENIENCE FUNCTIONS TO EMULATE 'make dist' and 'make distclean'
###################################################################
env.dist('opale', '0.7.1')


