path: root/TOOLS
diff options
authorStefano Pigozzi <>2013-07-16 13:28:28 +0200
committerStefano Pigozzi <>2013-11-21 21:22:36 +0100
commit7e2edad8efea55e8df1faa695d1389ef4e326d7c (patch)
treef9662620b8ecaf50f6c67804dd0d99d00d85fe5b /TOOLS
parent0cb9227a73f03a6ecdf71e837c7c33c823b194b4 (diff)
switch the build system to waf
This commit adds a new build system based on waf. configure and Makefile are deprecated effective immediately and someday in the future they will be removed (they are still available by running ./old-configure). You can find how the choice for waf came to be in `DOCS/waf-buildsystem.rst`. TL;DR: we couldn't get the same level of abstraction and customization with other build systems we tried (CMake and autotools). For guidance on how to build the software now, take a look at and the cross compilation guide. CREDITS: This is a squash of ~250 commits. Some of them are not by me, so here is the deserved attribution: - @wm4 contributed some Windows fixes, renamed configure to old-configure and contributed to the bootstrap script. Also, GNU/Linux testing. - @lachs0r contributed some Windows fixes and the bootstrap script. - @Nikoli contributed a lot of testing and discovered many bugs. - @CrimsonVoid contributed changes to the bootstrap script.
Diffstat (limited to 'TOOLS')
2 files changed, 13 insertions, 9 deletions
diff --git a/TOOLS/ b/TOOLS/
index 6cd2a227c5..66ef576efd 100755
--- a/TOOLS/
+++ b/TOOLS/
@@ -30,24 +30,28 @@ def user_dylib_lst(input_file):
return [lib for lib in dylib_lst(input_file).split("\n") if
is_user_lib(lib, input_file)]
-def bundle_name(binary_name):
+def bundle_path(binary_name):
return "" % binary_name
+def bundle_name(binary_name):
+ return os.path.basename(bundle_path(binary_name))
def target_plist(binary_name):
- return os.path.join(bundle_name(binary_name), 'Contents', 'Info.plist')
+ return os.path.join(bundle_path(binary_name), 'Contents', 'Info.plist')
def target_directory(binary_name):
- return os.path.join(bundle_name(binary_name), 'Contents', 'MacOS')
+ return os.path.join(bundle_path(binary_name), 'Contents', 'MacOS')
def target_binary(binary_name):
- return os.path.join(target_directory(binary_name), binary_name)
+ return os.path.join(target_directory(binary_name),
+ os.path.basename(binary_name))
def copy_bundle(binary_name):
- if os.path.isdir(bundle_name(binary_name)):
- shutil.rmtree(bundle_name(binary_name))
+ if os.path.isdir(bundle_path(binary_name)):
+ shutil.rmtree(bundle_path(binary_name))
os.path.join('TOOLS', 'osxbundle', bundle_name(binary_name)),
- bundle_name(binary_name))
+ bundle_path(binary_name))
def copy_binary(binary_name):
shutil.copy(binary_name, target_binary(binary_name))
@@ -91,7 +95,7 @@ def fix_dylibs_paths(target_file, dest_dir, root=True):
fix_dylibs_paths(dylib_dest_path, dest_dir, False)
def apply_plist_template(plist_file, version):
- sh("sed -i -e 's/{{VERSION}}/%s/g' %s" % (version, plist_file))
+ sh("sed -i -e 's/${VERSION}/%s/g' %s" % (version, plist_file))
def bundle_dependencies(binary_name):
lib_bundle_directory = os.path.join(target_directory(binary_name), "lib")
diff --git a/TOOLS/osxbundle/ b/TOOLS/osxbundle/
index f1e2e6f34d..0573b62e44 100644
--- a/TOOLS/osxbundle/
+++ b/TOOLS/osxbundle/
@@ -183,7 +183,7 @@
- <string>{{VERSION}}</string>
+ <string>${VERSION}</string>