Fixed a bug in the R-tree implementation.
[aesalon.git] / build / SConscript
blob6c7e4f9ced4c438d86913ed8a00037910fa13e2f
1 import subprocess
3 def createConfig(target, source, values):
4     outFile = file(str(target), "w")
5     inFile = file(str(source), "r")
6     outFile.write(inFile.read() % values)
7     inFile.close()
8     outFile.close()
10 def generateConfig(target):
11         def getCommandOutput(command):
12                 process = subprocess.Popen("getconf PAGESIZE", shell=True, stdout=subprocess.PIPE)
13                 return process.stdout.read()
15         tf = file(target, "w")
16         tf.write("/* This file is automatically generated. Do not edit unless you know what you are doing. */\n\n")
17         tf.write("#define AesalonPageSize %s\n" % getCommandOutput("getconf PAGESIZE").strip())
18         tf.close()
20 config = file("config", "r")
21 buildConfig = eval(config.read())
22 config.close()
24 createConfig("../include/Config.h", "templates/Config.h.in", buildConfig)
26 generateConfig("../include/Config.h.auto")