forked from JuliaLang/julia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to bring some sanity to the embedding makefile
we'll still want to eventually decide how to make julia-config.jl output correct relative rpaths but this should at least get `make -C embedding' working correctly
- Loading branch information
Showing
12 changed files
with
92 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
## this is a simple wrapper just to forward on known commands to the | ||
## embedding example with values pulled from Make.inc | ||
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) | ||
BUILDDIR := . | ||
JULIAHOME := $(abspath $(SRCDIR)/..) | ||
BUILDDIR := . | ||
include $(JULIAHOME)/Make.inc | ||
|
||
outdir := $(libexecdir) | ||
|
||
embedding_binary := $(abspath $(outdir)/embedding$(JULIA_LIBSUFFIX)$(EXE)) | ||
|
||
release: embedding | ||
debug: embedding-debug | ||
|
||
embedding: $(embedding_binary) | ||
embedding-debug: $(embedding_binary) | ||
|
||
$(embedding_binary): $(wildcard embedding/*) | ||
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/examples/embedding $(JULIA_BUILD_MODE) \ | ||
JULIA="$(bindir)/julia$(JULIA_LIBSUFFIX)$(EXE)" BIN="$(outdir)" \ | ||
SPAWN="$(spawn)" CC="$(CC)" | ||
|
||
clean: | ||
-rm -f $(embedding_binary) $(embedding_binary)-debug | ||
|
||
.PHONY: all embedding clean | ||
|
||
release: # default target | ||
# forward all variables expected by the embedding example | ||
JULIA:=$(call spawn,$(JULIA_EXECUTABLE)) | ||
BIN:=$(BUILDDIR)/embedding | ||
CC:=$(CC) | ||
include $(SRCDIR)/embedding/Makefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/embedding | ||
/embedding-debug |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# This file is a part of Julia. License is MIT: https://julialang.org/license | ||
|
||
# tests the output of the embedding example is correct | ||
using Base.Test | ||
|
||
@test length(ARGS) == 1 | ||
let | ||
stdout = Pipe() | ||
stderr = Pipe() | ||
p = spawn(pipeline(Cmd(ARGS), stdin=DevNull, stdout=stdout, stderr=stderr)) | ||
close(stdout.in) | ||
close(stderr.in) | ||
stderr_task = @async readlines(stderr) | ||
lines = readlines(stdout) | ||
@test length(lines) == 6 | ||
@test parse(Float64, lines[1]) ≈ sqrt(2) | ||
lines = wait(stderr_task) | ||
@test lines == ["UndefVarError(:this_function_does_not_exist)"] | ||
@test success(p) | ||
end |
This file was deleted.
Oops, something went wrong.