Skip to content

Commit

Permalink
Use git-external to install Pkg during build.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Oct 15, 2018
1 parent c72fe1b commit 9a8e808
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ endif
julia-deps: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/julia/test $(build_defaultpkgdir)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/deps

julia-stdlib:
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/stdlib

julia-base: julia-deps $(build_sysconfdir)/julia/startup.jl $(build_man1dir)/julia.1 $(build_datarootdir)/julia/julia-config.jl
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/base

Expand All @@ -74,10 +77,10 @@ julia-ui-release julia-ui-debug : julia-ui-% : julia-src-%
julia-sysimg : julia-base julia-ui-$(JULIA_BUILD_MODE)
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.ji JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'

julia-sysimg-release : julia-sysimg julia-ui-release
julia-sysimg-release : julia-stdlib julia-sysimg julia-ui-release
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.$(SHLIB_EXT)

julia-sysimg-debug : julia-sysimg julia-ui-debug
julia-sysimg-debug : julia-stdlib julia-sysimg julia-ui-debug
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys-debug.$(SHLIB_EXT)

julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest julia-base-cache
Expand Down Expand Up @@ -543,6 +546,7 @@ clean: | $(CLEAN_TARGETS)
@-$(MAKE) -C $(BUILDROOT)/src clean
@-$(MAKE) -C $(BUILDROOT)/ui clean
@-$(MAKE) -C $(BUILDROOT)/test clean
@-$(MAKE) -C $(BUILDROOT)/stdlib clean-pkg
-rm -f $(BUILDROOT)/julia
-rm -f $(BUILDROOT)/*.tar.gz
-rm -f $(build_depsbindir)/stringreplace \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
26e8969718332693a53a3c752024caf0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eed29d96cb09b5e4a8bb0e7802bd5c0a1e7d30c792d52e82f0727194a0c8f992fe7aef690961acf873a44d48560d67fa2be2a69ac771d8d90fe241e032d03995
2 changes: 2 additions & 0 deletions stdlib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/srccache
/Pkg
24 changes: 24 additions & 0 deletions stdlib/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
default: Pkg
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
JULIAHOME := $(abspath $(SRCDIR)/..)
SRCCACHE := $(abspath $(SRCDIR)/srccache)
BUILDDIR := $(SRCCACHE)

include $(JULIAHOME)/Make.inc
include $(JULIAHOME)/deps/tools/common.mk
include $(JULIAHOME)/deps/tools/git-external.mk

PKG := https://github.com/JuliaLang/Pkg.jl
PKG_TAR_URL = https://api.github.com/repos/JuliaLang/Pkg.jl/tarball/$1
$(eval $(call git-external,Pkg,PKG,,,$(BUILDDIR)))

extract-pkg: $(BUILDDIR)/$(PKG_SRC_DIR)/source-extracted
Pkg: $(BUILDDIR)/$(PKG_SRC_DIR)/source-extracted
rm -rf $@
cp -r $(BUILDDIR)/$(PKG_SRC_DIR) $@
get-pkg: Pkg
clean-pkg:
-rm -rf Pkg
-rm -rf $(BUILDDIR)/$(PKG_SRC_DIR)

.PHONY: default extract-pkg Pkg get-pkg clean-pkg
2 changes: 2 additions & 0 deletions stdlib/Pkg.version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PKG_BRANCH = master
PKG_SHA1 = a93be66e169ea16c3b1585ed5c9696bd40121030
2 changes: 1 addition & 1 deletion test/choosetests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Random, Sockets

const STDLIB_DIR = joinpath(Sys.BINDIR, "..", "share", "julia", "stdlib", "v$(VERSION.major).$(VERSION.minor)")
const STDLIBS = filter!(x -> isdir(joinpath(STDLIB_DIR, x)), readdir(STDLIB_DIR))
const STDLIBS = filter!(x -> isfile(joinpath(STDLIB_DIR, x, "src", "$(x).jl")), readdir(STDLIB_DIR))

"""
Expand Down

0 comments on commit 9a8e808

Please sign in to comment.