summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct82
1 files changed, 82 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
new file mode 100644
index 0000000..dd1e218
--- /dev/null
+++ b/SConstruct
@@ -0,0 +1,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')