Skip to content

Commit ae4035a

Browse files
haampiestaticfloat
authored andcommitted
Symlink 7z when USE_SYSTEM_P7ZIP (#43005)
* Symlink 7z * Simplify Co-authored-by: Elliot Saba <[email protected]> Co-authored-by: Elliot Saba <[email protected]> (cherry picked from commit 5e2894b)
1 parent 976a79e commit ae4035a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

base/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,19 @@ SYMLINK_SYSTEM_LIBRARIES += symlink_$2
185185
endif
186186
endef
187187

188+
# libexec executables
189+
symlink_p7zip: $(build_bindir)/7z$(EXE)
190+
191+
ifneq ($(USE_SYSTEM_P7ZIP),0)
192+
SYMLINK_SYSTEM_LIBRARIES += symlink_p7zip
193+
7Z_PATH := $(shell which 7z$(EXE))
194+
endif
195+
196+
$(build_bindir)/7z$(EXE):
197+
[ -e "$(7Z_PATH)" ] && \
198+
([ ! -e "$@" ] || rm "$@") && \
199+
ln -svf "$(7Z_PATH)" "$@"
200+
188201
# the following excludes: libuv.a, libutf8proc.a
189202

190203
ifneq ($(USE_SYSTEM_LIBM),0)

0 commit comments

Comments
 (0)