aboutsummaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct19
1 files changed, 17 insertions, 2 deletions
diff --git a/SConstruct b/SConstruct
index 8e92fb6..9a098df 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,4 +1,19 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-
-SConscript('src/SConscript', variant_dir='build', duplicate=0)
+def build_lib():
+ SConscript('src/SConscript', variant_dir='build', duplicate=0)
+
+def build_doc():
+ SConscript('doc/SConscript')
+
+if not BUILD_TARGETS:
+ # Default target: lib
+ build_lib()
+else:
+ if 'lib' in BUILD_TARGETS or 'install' in BUILD_TARGETS:
+ build_lib()
+ if 'doc' in BUILD_TARGETS:
+ # Note: building the doc requires the lib to be built and the pyexiv2
+ # module to be in the python path.
+ build_doc()
+