Skip to content

Commit

Permalink
Install julia binaries in $JULIAHOME instead of $JULIAHOME/usr/bin
Browse files Browse the repository at this point in the history
Update library search path for new directory structure
  • Loading branch information
ViralBShah committed Apr 30, 2012
1 parent 1f1b686 commit cbe3bd7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@
/sys.ji
/sys0.ji
/h2j

/usr
4 changes: 2 additions & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ endif

ifeq ($(OS), Linux)
SHLIB_EXT = so
RPATH = -Wl,-rpath,'$$ORIGIN/../lib'
RPATH = -Wl,-rpath,'$$ORIGIN/usr/lib'
OSLIBS += -ldl -lrt -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap $(LIBUNWIND)
WHOLE_ARCHIVE = -Wl,--whole-archive
NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
Expand All @@ -156,7 +156,7 @@ endif
ifeq ($(OS), FreeBSD)
SHLIB_EXT = so
OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap -lutil -lm $(LIBUNWIND)
RPATH = -Wl,-rpath,'$$ORIGIN/lib'
RPATH = -Wl,-rpath,'$$ORIGIN/usr/lib'
WHOLE_ARCHIVE = -Wl,--whole-archive
NO_WHOLE_ARCHIVE = -Wl,--no-whole-archive
endif
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ julia-debug julia-release:
@$(MAKE) -sC src lib$@
@$(MAKE) -sC base
@$(MAKE) -sC ui $@
@ln -sf $(USRBIN)/$@-$(DEFAULT_REPL) julia
@ln -f $@-$(DEFAULT_REPL) julia

sys0.ji: src/boot.jl src/dump.c base/stage0.jl
$(QUIET_JULIA) cd base && ../julia -b stage0.jl
Expand Down
2 changes: 1 addition & 1 deletion deps/install-name-Darwin.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#! /bin/bash

install_name_tool -id @executable_path/../lib/$1 $2
install_name_tool -id @executable_path/usr/lib/$1 $2
4 changes: 2 additions & 2 deletions src/dlload.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ void *jl_load_dynamic_library(char *fname)
handle = NULL;
if (modname[0] != '/') {
if (julia_home) {
/* try julia_home/lib */
/* try julia_home/usr/lib */
strncpy(path, julia_home, PATHBUF-1);
strncat(path, "/lib/", PATHBUF-1-strlen(path));
strncat(path, "/usr/lib/", PATHBUF-1-strlen(path));
strncat(path, modname, PATHBUF-1-strlen(path));
strncat(path, ext, PATHBUF-1-strlen(path));
handle = dlopen(path, RTLD_NOW);
Expand Down
20 changes: 10 additions & 10 deletions ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ release debug:
%.do: %.c repl.h
$(QUIET_CC) $(CC) $(CFLAGS) $(DEBUGFLAGS) -c $< -o $@

julia-release-basic: $(USRBIN)/julia-release-basic
julia-debug-basic: $(USRBIN)/julia-debug-basic
julia-release-readline: $(USRBIN)/julia-release-readline
julia-debug-readline: $(USRBIN)/julia-debug-readline
julia-release-basic: $(JULIAHOME)/julia-release-basic
julia-debug-basic: $(JULIAHOME)/julia-debug-basic
julia-release-readline: $(JULIAHOME)/julia-release-readline
julia-debug-readline: $(JULIAHOME)/julia-debug-readline

$(USRBIN)/julia-release-basic: repl.o repl-basic.o
$(JULIAHOME)/julia-release-basic: repl.o repl-basic.o
$(QUIET_LINK) $(CXX) $(SHIPFLAGS) $^ -o $@ -L$(USRLIB) -ljulia-release $(JLDFLAGS)
$(USRBIN)/julia-debug-basic: repl.do repl-basic.do
$(QUIET_LINK) $(CXX) $(JLDFLAGS) $(DEBUGFLAGS) $^ -o $@ $(USRLIB) -ljulia-debug $(JLDFLAGS)
$(JULIAHOME)/julia-debug-basic: repl.do repl-basic.do
$(QUIET_LINK) $(CXX) $(JLDFLAGS) $(DEBUGFLAGS) $^ -o $@ -L$(USRLIB) -ljulia-debug

$(USRBIN)/julia-release-readline: repl.o repl-readline.o
$(JULIAHOME)/julia-release-readline: repl.o repl-readline.o
$(QUIET_LINK) $(CXX) $(SHIPFLAGS) $^ -o $@ $(READLINE) -L$(USRLIB) -ljulia-release $(JLDFLAGS)
$(USRBIN)/julia-debug-readline: repl.do repl-readline.do
$(JULIAHOME)/julia-debug-readline: repl.do repl-readline.do
$(QUIET_LINK) $(CXX) $(JLDFLAGS) $(DEBUGFLAGS) $^ -o $@ $(READLINE) -L$(USRLIB) -ljulia-debug

clean:
$(MAKE) -C webserver $@
rm -f *.o *.do
rm -f $(USRBIN)/julia-*-basic $(USRBIN)/julia-*-readline $(USRBIN)/julia
rm -f $(JULIAHOME)/julia-*-basic $(JULIAHOME)/julia-*-readline $(JULIAHOME)/julia

0 comments on commit cbe3bd7

Please sign in to comment.