1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#!/usr/bin/python
# kio-locate
#
# Copyright (C) 2005 by Tobi Vollebregt
# tobivollebregt@gmail.com
#
# Thanks to Google's Summer Of Code Program!
#
# Copyright (C) 2005 by Armin Straub
# linux@arminstraub.de
#
# Adapted from the example shipping with bksys.
# Thomas Nagy, 2004, 2005
# Thanks for this great tool!
"""
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=['./admin'])
# Set the build directory so we can do "rm -rf build" to clean up.
BuildDir('build/src', 'src')
env.KDEuse("environ")
#env.KDEuse("environ rpath lang_qt thread nohelp")
# Add -DHAVE_UDS_HIDDEN if we detected the UDS_HIDDEN patch.
if '1' in env['HAVE_UDS_HIDDEN']:
env.Append(CPPFLAGS = ['-DHAVE_UDS_HIDDEN'])
###################################################################
# SCRIPTS FOR BUILDING THE TARGETS
###################################################################
## target processing is done in the subdirectories
env.subdirs('build/src')
############################
## Process the documentation
############################
## Use a distinct environment
myenv=env.Copy()
## Define this to enable docbook file dependency tracking
#myenv['i_am_a_documentation_writer']=1
# This shouldn't be needed, but it works around a (possible) bug in bksys 1.5.2.rc1.
# myenv['_BUILDDIR_']='build'
## Use docfolder for each documentation directory
## The parameters of docfolder are: documentation dir, language code, app name
myenv.docfolder('doc/en/', 'en', 'kio-locate/')
#myenv.docfolder('doc/fr/', 'fr', 'kio-locate/')
############################
## Process the translations
############################
## They are usually located in the po/ directory
## We use myenv here because it has the _BUILDDIR_ workaround. See above.
myenv.KDElang('po/', 'kio-locate')
###################################################################
# CONVENIENCE FUNCTIONS TO EMULATE 'make dist' and 'make distclean'
###################################################################
env.dist('kio-locate')
|