-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new install options for third-party dirs
Other updates: - Copy latest wscript from bde-tools - Add missing company name to LICENSE
- Loading branch information
Showing
6 changed files
with
72 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,32 @@ | ||
#!/usr/bin/env python | ||
# encoding: utf-8 | ||
|
||
# Copy this file to the root directory of a BDE-style source repo to enable | ||
# building it using the waf-based build tool. | ||
|
||
import os | ||
import sys | ||
|
||
from waflib import Logs, Utils | ||
from waflib.Configure import ConfigurationContext | ||
|
||
top = '.' | ||
out = 'build' | ||
|
||
|
||
def _get_tools_path(ctx): | ||
waf_path = sys.argv[0] | ||
|
||
base = os.path.dirname(waf_path) | ||
|
||
if os.path.isdir(os.path.join(base, 'tools', 'waf', 'bde')): | ||
return os.path.join(base, 'tools', 'waf', 'bde'); | ||
|
||
ctx.fatal("BDE waf customizations can not be found under tools/waf/bde in the path of waf.") | ||
if os.path.isdir(os.path.join(base, 'lib', 'bdebld')): | ||
return os.path.join(base, 'lib') | ||
ctx.fatal("BDE waf customizations can not be found under tools/lib in the " | ||
"path to waf.") | ||
|
||
|
||
def options(ctx): | ||
import sys | ||
|
||
ctx.load('bdewscript', tooldir = _get_tools_path(ctx)) | ||
|
||
|
||
class PreConfigure(ConfigurationContext): | ||
cmd = 'configure' | ||
|
||
def __init__(self, **kw): | ||
global out | ||
|
||
build_dir = os.getenv('BDE_WAF_BUILD_DIR') | ||
if build_dir: | ||
out = build_dir | ||
|
||
Logs.debug('config: build dir: ' + out) | ||
|
||
super(PreConfigure, self).__init__(**kw) | ||
ctx.load('bdebld.waf.wscript', tooldir=_get_tools_path(ctx)) | ||
|
||
|
||
def configure(ctx): | ||
ctx.load('bdewscript', tooldir = _get_tools_path(ctx)) | ||
ctx.load('bdebld.waf.wscript', tooldir=_get_tools_path(ctx)) | ||
|
||
def build(ctx): | ||
ctx.load('bdewscript', tooldir = _get_tools_path(ctx)) | ||
|
||
# ---------------------------------------------------------------------------- | ||
# Copyright (C) 2013-2014 Bloomberg Finance L.P. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# ----------------------------- END-OF-FILE ---------------------------------- | ||
def build(ctx): | ||
ctx.load('bdebld.waf.wscript', tooldir=_get_tools_path(ctx)) |