3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-12 20:18:18 +00:00

fixed bug where mk_make.py --build=... would fail to handle absolute paths correctly.

This commit is contained in:
Michael Lowell Roberts 2017-02-28 08:24:35 -08:00
parent 4792229c2b
commit 3415672f31
4 changed files with 35 additions and 40 deletions

View file

@ -12,10 +12,6 @@ import shutil
ML_ENABLED=False ML_ENABLED=False
BUILD_DIR='../build' BUILD_DIR='../build'
def norm_path(p):
# We use '/' on mk_project for convenience
return os.path.join(*(p.split('/')))
def display_help(exit_code): def display_help(exit_code):
print("mk_api_doc.py: Z3 documentation generator\n") print("mk_api_doc.py: Z3 documentation generator\n")
print("\nOptions:") print("\nOptions:")
@ -36,7 +32,7 @@ def parse_options():
for opt, arg in options: for opt, arg in options:
if opt in ('-b', '--build'): if opt in ('-b', '--build'):
BUILD_DIR = norm_path(arg) BUILD_DIR = mk_util.norm_path(arg)
elif opt in ('h', '--help'): elif opt in ('h', '--help'):
display_help() display_help()
exit(1) exit(1)

View file

@ -42,7 +42,7 @@ def mk_dir(d):
def set_build_dir(path): def set_build_dir(path):
global BUILD_DIR global BUILD_DIR
BUILD_DIR = path BUILD_DIR = mk_util.norm_path(path)
mk_dir(BUILD_DIR) mk_dir(BUILD_DIR)
def display_help(): def display_help():

View file

@ -153,8 +153,7 @@ def is_cygwin_mingw():
return IS_CYGWIN_MINGW return IS_CYGWIN_MINGW
def norm_path(p): def norm_path(p):
# We use '/' on mk_project for convenience return os.path.expanduser(os.path.normpath(p))
return os.path.join(*(p.split('/')))
def which(program): def which(program):
import os import os

View file

@ -46,7 +46,7 @@ def mk_dir(d):
def set_build_dir(path): def set_build_dir(path):
global BUILD_DIR, BUILD_X86_DIR, BUILD_X64_DIR global BUILD_DIR, BUILD_X86_DIR, BUILD_X64_DIR
BUILD_DIR = path BUILD_DIR = mk_util.norm_path(path)
BUILD_X86_DIR = os.path.join(path, 'x86') BUILD_X86_DIR = os.path.join(path, 'x86')
BUILD_X64_DIR = os.path.join(path, 'x64') BUILD_X64_DIR = os.path.join(path, 'x64')
mk_dir(BUILD_X86_DIR) mk_dir(BUILD_X86_DIR)