Skip to content

Commit

Permalink
Make lite version of Julia
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottPJones committed May 18, 2015
1 parent 5010c13 commit 67e716c
Show file tree
Hide file tree
Showing 7 changed files with 207 additions and 177 deletions.
7 changes: 7 additions & 0 deletions Make.inc
Expand Up @@ -54,6 +54,9 @@ USE_INTEL_JITEVENTS ?= 0
USEICC ?= 0
USEIFC ?= 0

# Set to 1 to build a "lite" version of Julia
BUILD_LITE ?= 0

ifeq ($(USE_MKL), 1)
$(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL")
USE_INTEL_MKL = 1
Expand Down Expand Up @@ -91,7 +94,11 @@ JULIA_COMMIT = $(JULIA_VERSION)
endif

# Whether to use GPL libraries or not.
ifeq ($(BUILD_LITE), 1)
USE_GPL_LIBS ?= 0
else
USE_GPL_LIBS ?= 1
endif

# Directories where said libraries get installed to
prefix ?= $(abspath julia-$(JULIA_COMMIT))
Expand Down
5 changes: 5 additions & 0 deletions base/Makefile
Expand Up @@ -54,6 +54,11 @@ ifeq ($(USE_GPL_LIBS), 1)
@echo "const USE_GPL_LIBS = true" >> $@
else
@echo "const USE_GPL_LIBS = false" >> $@
endif
ifeq ($(BUILD_LITE), 1)
@echo "const BUILD_LITE = true" >> $@
else
@echo "const BUILD_LITE = false" >> $@
endif
@echo "const libfftw_name = \"$(LIBFFTWNAME)\"" >> $@
@echo "const libfftwf_name = \"$(LIBFFTWFNAME)\"" >> $@
Expand Down
5 changes: 4 additions & 1 deletion base/constants.jl
Expand Up @@ -121,9 +121,12 @@ const golden = φ
for T in (MathConst, Rational, Integer, Number)
^(::MathConst{:e}, x::T) = exp(x)
end
for T in (Range, BitArray, SparseMatrixCSC, StridedArray, AbstractArray)
for T in (Range, BitArray, StridedArray, AbstractArray)
.^(::MathConst{:e}, x::T) = exp(x)
end
if !BUILD_LITE
.^(::MathConst{:e}, x::SparseMatrixCSC) = exp(x)
end
^(::MathConst{:e}, x::AbstractMatrix) = expm(x)

log(::MathConst{:e}) = 1 # use 1 to correctly promote expressions like log(x)/log(e)
Expand Down
2 changes: 2 additions & 0 deletions base/deprecated.jl
Expand Up @@ -374,8 +374,10 @@ end
end

# 8898
if !BUILD_LITE
@deprecate precision(x::DateTime) eps(x)
@deprecate precision(x::Date) eps(x)
end

@deprecate names(t::DataType) fieldnames(t)
@deprecate names(v) fieldnames(v)
Expand Down

0 comments on commit 67e716c

Please sign in to comment.