Skip to content

Commit

Permalink
remove join_with_build_dir workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Oct 7, 2024
1 parent 351aa41 commit 90424d5
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -2058,18 +2058,6 @@ def ar_command():

program_suffix = options.program_suffix or osinfo.program_suffix

def join_with_build_dir(path):
# jom (and mingw32-make) seem to string-compare Makefile targets and
# requirements. For them, `./botan.lib` is NOT equal to `botan.lib` or
# `C:\botan\botan-test.exe` is NOT equal to `C:\botan/botan-test.exe`
#
# `normalize_source_path` will "fix" the path slashes but remove
# a redundant `./` for the "trivial" relative path.
normalized = normalize_source_path(os.path.join(build_paths.out_dir, path))
if build_paths.out_dir == '.':
normalized = './%s' % normalized
return normalized

def all_targets(options):
yield 'libs'
if options.with_documentation:
Expand Down Expand Up @@ -2156,9 +2144,9 @@ def test_exe_extra_ldflags():
'python_dir': source_paths.python_dir,

'cli_exe_name': osinfo.cli_exe_name + program_suffix,
'cli_exe': join_with_build_dir(osinfo.cli_exe_name + program_suffix),
'cli_exe': normalize_source_path(os.path.join(build_paths.out_dir, osinfo.cli_exe_name + program_suffix)),
'build_cli_exe': bool('cli' in options.build_targets),
'test_exe': join_with_build_dir('botan-test' + program_suffix),
'test_exe': normalize_source_path(os.path.join(build_paths.out_dir, 'botan-test' + program_suffix)),

'lib_prefix': osinfo.lib_prefix,
'static_suffix': osinfo.static_suffix,
Expand Down Expand Up @@ -2362,7 +2350,7 @@ def test_exe_extra_ldflags():
if options.build_shared_lib:
lib_targets.append('shared_lib_name')

variables['library_targets'] = ' '.join([join_with_build_dir(variables[t]) for t in lib_targets])
variables['library_targets'] = ' '.join(normalize_source_paths([os.path.join(build_paths.out_dir, variables[t]) for t in lib_targets]))

if options.os == 'llvm' or options.compiler == 'msvc':
# llvm-link and msvc require just naming the file directly
Expand Down

0 comments on commit 90424d5

Please sign in to comment.