Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ private_libdir := $(libdir)/julia
endif
build_private_libdir := $(build_libdir)/julia

private_libexecdir := $(libexecdir)/julia
build_private_libexecdir := $(build_libexecdir)/julia

# A helper functions for dealing with lazily-evaluated, expensive operations.. Spinning
# up a python process to, for exaxmple, parse a TOML file is expensive, and we must wait
# until the TOML files are on-disk before we can parse them. This means that we cannot
Expand All @@ -310,7 +313,7 @@ define cache_rel_path
$(1)_rel_eval = $(call rel_path,$(2),$($(1)))
$(1)_rel = $$(call hit_cache,$(1)_rel_eval)
endef
$(foreach D,libdir private_libdir datarootdir libexecdir docdir sysconfdir includedir,$(eval $(call cache_rel_path,$(D),$(bindir))))
$(foreach D,libdir private_libdir datarootdir libexecdir private_libexecdir docdir sysconfdir includedir,$(eval $(call cache_rel_path,$(D),$(bindir))))
$(foreach D,build_libdir build_private_libdir,$(eval $(call cache_rel_path,$(D),$(build_bindir))))

# Save a special one: reverse_private_libdir_rel: usually just `../`, but good to be general:
Expand Down
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ endef

install: $(build_depsbindir)/stringreplace docs
@$(MAKE) $(QUIET_MAKE) $(JULIA_BUILD_MODE)
@for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(libexecdir); do \
@for subdir in $(bindir) $(datarootdir)/julia/stdlib/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir) $(private_libexecdir); do \
mkdir -p $(DESTDIR)$$subdir; \
done

Expand All @@ -268,8 +268,8 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
-$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
endif

# We have a single exception; we want 7z.dll to live in libexec, not bin, so that 7z.exe can find it.
-mv $(DESTDIR)$(bindir)/7z.dll $(DESTDIR)$(libexecdir)/
# We have a single exception; we want 7z.dll to live in private_libexecdir, not bindir, so that 7z.exe can find it.
-mv $(DESTDIR)$(bindir)/7z.dll $(DESTDIR)$(private_libexecdir)/
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
-$(INSTALL_M) $(build_libdir)/libssp.dll.a $(DESTDIR)$(libdir)/
# The rest are compiler dependencies, as an example memcpy is exported by msvcrt
Expand Down Expand Up @@ -331,14 +331,14 @@ endif
done \
done
endif
# Install `7z` into libexec/
$(INSTALL_M) $(build_bindir)/7z$(EXE) $(DESTDIR)$(libexecdir)/
# Install `7z` into private_libexecdir
$(INSTALL_M) $(build_bindir)/7z$(EXE) $(DESTDIR)$(private_libexecdir)/

# Install `lld` into libexec/
$(INSTALL_M) $(build_depsbindir)/lld$(EXE) $(DESTDIR)$(libexecdir)/
# Install `lld` into private_libexecdir
$(INSTALL_M) $(build_depsbindir)/lld$(EXE) $(DESTDIR)$(private_libexecdir)/

# Install `dsymutil` into libexec/
$(INSTALL_M) $(build_depsbindir)/dsymutil$(EXE) $(DESTDIR)$(libexecdir)/
# Install `dsymutil` into private_libexecdir/
$(INSTALL_M) $(build_depsbindir)/dsymutil$(EXE) $(DESTDIR)$(private_libexecdir)/

# Copy public headers
cp -R -L $(build_includedir)/julia/* $(DESTDIR)$(includedir)/julia
Expand Down
2 changes: 2 additions & 0 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ ifeq ($(OS),WINNT)
@printf 'const LIBDIR = "%s"\n' '$(subst /,\\,$(libdir_rel))' >> $@
@printf 'const LIBEXECDIR = "%s"\n' '$(subst /,\\,$(libexecdir_rel))' >> $@
@printf 'const PRIVATE_LIBDIR = "%s"\n' '$(subst /,\\,$(private_libdir_rel))' >> $@
@printf 'const PRIVATE_LIBEXECDIR = "%s"\n' '$(subst /,\\,$(private_libexecdir_rel))' >> $@
@printf 'const INCLUDEDIR = "%s"\n' '$(subst /,\\,$(includedir_rel))' >> $@
else
@echo "const SYSCONFDIR = \"$(sysconfdir_rel)\"" >> $@
Expand All @@ -74,6 +75,7 @@ else
@echo "const LIBDIR = \"$(libdir_rel)\"" >> $@
@echo "const LIBEXECDIR = \"$(libexecdir_rel)\"" >> $@
@echo "const PRIVATE_LIBDIR = \"$(private_libdir_rel)\"" >> $@
@echo "const PRIVATE_LIBEXECDIR = \"$(private_libexecdir_rel)\"" >> $@
@echo "const INCLUDEDIR = \"$(includedir_rel)\"" >> $@
endif
ifeq ($(DARWIN_FRAMEWORK), 1)
Expand Down
6 changes: 3 additions & 3 deletions base/linking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ end

function __init_lld_path()
# Prefer our own bundled lld, but if we don't have one, pick it up off of the PATH
# If this is an in-tree build, `lld` will live in `tools`. Otherwise, it'll be in `libexec`
for bundled_lld_path in (joinpath(Sys.BINDIR, Base.LIBEXECDIR, lld_exe),
# If this is an in-tree build, `lld` will live in `tools`. Otherwise, it'll be in `private_libexecdir`
for bundled_lld_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, lld_exe),
joinpath(Sys.BINDIR, "..", "tools", lld_exe),
joinpath(Sys.BINDIR, lld_exe))
if isfile(bundled_lld_path)
Expand All @@ -64,7 +64,7 @@ end

function __init_dsymutil_path()
#Same as with lld but for dsymutil
for bundled_dsymutil_path in (joinpath(Sys.BINDIR, Base.LIBEXECDIR, dsymutil_exe),
for bundled_dsymutil_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, dsymutil_exe),
joinpath(Sys.BINDIR, "..", "tools", dsymutil_exe),
joinpath(Sys.BINDIR, dsymutil_exe))
if isfile(bundled_dsymutil_path)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/LLD_jll/src/LLD_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ end

function init_lld_path()
# Prefer our own bundled lld, but if we don't have one, pick it up off of the PATH
# If this is an in-tree build, `lld` will live in `tools`. Otherwise, it'll be in `libexec`
for bundled_lld_path in (joinpath(Sys.BINDIR, Base.LIBEXECDIR, lld_exe),
# If this is an in-tree build, `lld` will live in `tools`. Otherwise, it'll be in `private_libexecdir`
for bundled_lld_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, lld_exe),
joinpath(Sys.BINDIR, "..", "tools", lld_exe),
joinpath(Sys.BINDIR, lld_exe))
if isfile(bundled_lld_path)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/p7zip_jll/src/p7zip_jll.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ end

function init_p7zip_path()
# Prefer our own bundled p7zip, but if we don't have one, pick it up off of the PATH
# If this is an in-tree build, `7z` will live in `bin`. Otherwise, it'll be in `libexec`
for bundled_p7zip_path in (joinpath(Sys.BINDIR, Base.LIBEXECDIR, p7zip_exe),
# If this is an in-tree build, `7z` will live in `bindir`. Otherwise, it'll be in `private_libexecdir`
for bundled_p7zip_path in (joinpath(Sys.BINDIR, Base.PRIVATE_LIBEXECDIR, p7zip_exe),
joinpath(Sys.BINDIR, p7zip_exe))
if isfile(bundled_p7zip_path)
global p7zip_path = abspath(bundled_p7zip_path)
Expand Down
2 changes: 1 addition & 1 deletion test/osutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ end
if Sys.iswindows()
@testset "path variables use correct path delimiters on windows" begin
for path in (Base.SYSCONFDIR, Base.DATAROOTDIR, Base.DOCDIR,
Base.LIBDIR, Base.PRIVATE_LIBDIR, Base.INCLUDEDIR, Base.LIBEXECDIR)
Base.LIBDIR, Base.PRIVATE_LIBDIR, Base.INCLUDEDIR, Base.LIBEXECDIR, Base.PRIVATE_LIBEXECDIR)
@test !occursin("/", path)
@test !occursin("\\\\", path)
end
Expand Down