Skip to content

Commit

Permalink
Fix building of embedding example for out of tree build
Browse files Browse the repository at this point in the history
dont set prefix in examples/Makefile

install libexecdir on windows too

run make install on appveyor

use installed julia exe to run tests on appveyor
  • Loading branch information
tkelman committed Apr 14, 2017
1 parent b4d01d9 commit c0d01c9
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ endif
USE_GPL_LIBS ?= 1
# Directories where said libraries get installed to
prefix ?= $(abspath julia-$(JULIA_COMMIT))
prefix ?= $(BUILDROOT)/julia-$(JULIA_COMMIT)
bindir := $(prefix)/bin
libdir := $(prefix)/lib
libexecdir := $(prefix)/libexec
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ all: debug release
# sort is used to remove potential duplicates
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_man1dir))
ifneq ($(BUILDROOT),$(JULIAHOME))
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps test test/perf)
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps test test/perf examples examples/embedding)
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS))
DIRS := $(DIRS) $(BUILDDIRS)
$(BUILDDIRMAKE): | $(BUILDDIRS)
Expand Down Expand Up @@ -339,16 +339,15 @@ install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index
done

$(INSTALL_M) $(build_bindir)/julia* $(DESTDIR)$(bindir)/
-cp -a $(build_libexecdir) $(DESTDIR)$(prefix)
ifeq ($(OS),WINNT)
-$(INSTALL_M) $(build_bindir)/*.dll $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_libdir)/libjulia.dll.a $(DESTDIR)$(libdir)/
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
else
-cp -a $(build_libexecdir) $(DESTDIR)$(prefix)

# Copy over .dSYM directories directly
ifeq ($(OS),Darwin)
# Copy over .dSYM directories directly
-cp -a $(build_libdir)/*.dSYM $(DESTDIR)$(libdir)
-cp -a $(build_private_libdir)/*.dSYM $(DESTDIR)$(private_libdir)
endif
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ build_script:
test_script:
- usr\bin\julia -e "versioninfo()"
- usr\bin\julia --precompiled=no -e "true"
- cd test && ..\usr\bin\julia --check-bounds=yes runtests.jl all &&
..\usr\bin\julia --check-bounds=yes runtests.jl libgit2-online download pkg embedding
- cd julia-* && .\bin\julia.exe --check-bounds=yes share\julia\test\runtests.jl all &&
.\bin\julia.exe --check-bounds=yes share\julia\test\runtests.jl libgit2-online download pkg embedding
4 changes: 2 additions & 2 deletions contrib/windows/msys_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fi
echo 'FORCE_ASSERTIONS = 1' >> Make.user

cat Make.user
make -j3 VERBOSE=1
make -j3 VERBOSE=1 install
cp usr/bin/busybox.exe julia-*/bin
make build-stats
#make debug
make VERBOSE=1 -C examples
1 change: 0 additions & 1 deletion examples/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
BUILDDIR := .
JULIAHOME := $(abspath $(SRCDIR)/..)
prefix := $(JULIAHOME)/usr
include $(JULIAHOME)/Make.inc

outdir := $(libexecdir)
Expand Down
7 changes: 5 additions & 2 deletions examples/embedding/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ ifndef BIN
endif

#=============================================================================
# this source directory where embedding.c is located
SRCDIR := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))

# get the executable suffix, if any
EXE := $(suffix $(abspath $(JULIA)))

Expand All @@ -26,10 +29,10 @@ DEBUGFLAGS += -g
release: $(BIN)/embedding$(EXE)
debug: $(BIN)/embedding-debug$(EXE)

$(BIN)/embedding$(EXE): embedding.c
$(BIN)/embedding$(EXE): $(SRCDIR)/embedding.c
$(CC) $^ -o $@ $(CFLAGS)

$(BIN)/embedding-debug$(EXE): embedding.c
$(BIN)/embedding-debug$(EXE): $(SRCDIR)/embedding.c
$(CC) $^ -o $@ $(CFLAGS) $(DEBUGFLAGS)

clean:
Expand Down

0 comments on commit c0d01c9

Please sign in to comment.