Skip to content

Commit

Permalink
Fix symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
securitykernel committed Aug 3, 2023
1 parent 66221ee commit 90281fa
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions src/build-data/ninja.in
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,14 @@ rule link_shared
command = %{lib_link_cmd} ${ABI_FLAGS} ${LDFLAGS} $in ${LIB_LINKS_TO} %{dash_o}$out

build %{out_dir}/%{shared_lib_name}: link_shared %{join lib_objs}

%{endif}
%{if symlink_shared_lib}

rule symlink_shared
rule symlink
command = cd %{out_dir} && ln -fs $in $out

# TODO create symlinks
#symlink_shared %{soname_base}
#symlink_shared %{soname_patch}
build %{out_dir}/%{soname_base}: symlink %{out_dir}/%{shared_lib_name}
build %{out_dir}/%{soname_patch}: symlink %{out_dir}/%{shared_lib_name}

%{endif}

Expand All @@ -72,7 +70,7 @@ rule link_tests

# Executable targets

# TODO don't always link statically?
# TODO don't always link statically
build %{cli_exe}: link_cli %{join cli_objs} | %{out_dir}/%{static_lib_name}

build %{test_exe}: link_tests %{join test_objs} | %{out_dir}/%{static_lib_name}
Expand All @@ -85,14 +83,22 @@ rule build_docs

build %{doc_stamp_file}: build_docs

rule install
command = "${PYTHON_EXE}" "${SCRIPTS_DIR}/install.py" --build-dir="build"

build install: install


# Target aliases

build cli: phony %{cli_exe}

build tests: phony %{test_exe}

build libs: phony %{library_targets}
build libs: phony %{library_targets} $
%{if symlink_shared_lib}
%{out_dir}/%{soname_base} %{out_dir}/%{soname_patch}
%{endif}

build docs: phony %{doc_stamp_file}

Expand Down

0 comments on commit 90281fa

Please sign in to comment.