Skip to content

Commit

Permalink
Merge pull request JuliaLang#7316 from crayxt/master
Browse files Browse the repository at this point in the history
Ease building with custom includedir.
  • Loading branch information
staticfloat committed Jun 22, 2014
2 parents 3e9b588 + fe5214a commit 98deb70
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@ LLVM_CONFIG ?= llvm-config$(EXE)
LLVM_LLC ?= llc$(EXE)
JCPPFLAGS+=-DSYSTEM_LLVM
else
LLVM_CONFIG=$(LLVMROOT)/bin/llvm-config$(EXE)
LLVM_LLC=$(LLVMROOT)/bin/llc$(EXE)
LLVM_CONFIG=$(build_bindir)/llvm-config$(EXE)
LLVM_LLC=$(build_bindir)/llc$(EXE)
endif

ifeq ($(USE_SYSTEM_PCRE), 1)
Expand Down
4 changes: 4 additions & 0 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ endif
all: pcre_h.jl errno_h.jl build_h.jl.phony fenv_constants.jl file_constants.jl uv_constants.jl version_git.jl.phony

pcre_h.jl:
ifeq ($(USE_SYSTEM_PCRE), 1)
@$(call PRINT_PERL, $(CPP) -dM $(shell $(PCRE_CONFIG) --prefix)/include/pcre.h | perl -nle '/^\s*#define\s+PCRE_(\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "const $$1 = uint32($$2)"' | sort > $@)
else
@$(call PRINT_PERL, $(CPP) -dM $(build_includedir)/pcre.h | perl -nle '/^\s*#define\s+PCRE_(\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "const $$1 = uint32($$2)"' | sort > $@)
endif

errno_h.jl:
@$(call PRINT_PERL, echo '#include "errno.h"' | $(CPP) -dM - | perl -nle 'print "const $$1 = int32($$2)" if /^#define\s+(E\w+)\s+(\d+)\s*$$/' | sort > $@)
Expand Down
6 changes: 4 additions & 2 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ $(LLVM_OBJ_TARGET): $(LLVM_OBJ_SOURCE) | $(llvm_python_workaround)
# LLVM has weird install prefixes (see llvm-$(LLVM_VER)/build_$(LLVM_BUILDTYPE)/Makefile.config for the full list)
# We map them here to the "normal" ones, which means just prefixing "PROJ_" to the variable name.
export PATH=$(abspath llvm-$(LLVM_VER)/python2_path):$$PATH && \
$(MAKE) -C llvm-$(LLVM_VER)/build_$(LLVM_BUILDTYPE) install $(MAKE_COMMON) PROJ_libdir=$(build_libdir) PROJ_bindir=$(build_bindir)
$(MAKE) -C llvm-$(LLVM_VER)/build_$(LLVM_BUILDTYPE) install $(MAKE_COMMON) PROJ_libdir=$(build_libdir) PROJ_bindir=$(build_bindir) PROJ_includedir=$(build_includedir)
touch -c $@

clean-llvm:
Expand Down Expand Up @@ -480,7 +480,7 @@ pcre-$(PCRE_VER)/configure: pcre-$(PCRE_VER).tar.bz2
touch -c $@
pcre-$(PCRE_VER)/config.status: pcre-$(PCRE_VER)/configure
cd pcre-$(PCRE_VER) && \
./configure $(CONFIGURE_COMMON) --enable-utf --enable-unicode-properties --enable-jit
./configure $(CONFIGURE_COMMON) --enable-utf --enable-unicode-properties --enable-jit --includedir=$(build_includedir)
touch -c $@
$(PCRE_SRC_TARGET): pcre-$(PCRE_VER)/config.status
$(MAKE) -C pcre-$(PCRE_VER) $(LIBTOOL_CCLD)
Expand Down Expand Up @@ -1413,6 +1413,8 @@ gmp-$(GMP_VER)/configure: gmp-$(GMP_VER).tar.bz2
touch -c $@
gmp-$(GMP_VER)/config.status: gmp-$(GMP_VER)/configure
cd gmp-$(GMP_VER) && \
sed -ibackup 's|includeexecdir = $$(exec_prefix)/include|includeexecdir = $$(includedir)|g' Makefile.in && \
sed -ibackup 's|includeexecdir = $$(exec_prefix)/include|includeexecdir = $$(includedir)|g' Makefile.am && \
./configure $(CONFIGURE_COMMON) F77= --enable-shared --disable-static
touch -c $@
$(GMP_SRC_TARGET): gmp-$(GMP_VER)/config.status
Expand Down
2 changes: 1 addition & 1 deletion src/flisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LLTDIR = ../support
LLT = $(LLTDIR)/libsupport.a $(LIBUV) $(LIBUTF8PROC)

FLAGS = -I$(LLTDIR) $(CFLAGS) $(HFILEDIRS:%=-I%) \
-I$(LIBUV_INC) -I$(JULIAHOME)/usr/include $(LIBDIRS:%=-L%) \
-I$(LIBUV_INC) -I$(build_includedir) $(LIBDIRS:%=-L%) \
-DLIBRARY_EXPORTS
ifneq ($(USEMSVC), 1)
FLAGS += -Wall -Wno-strict-aliasing -DUSE_COMPUTED_GOTO -fvisibility=hidden
Expand Down

0 comments on commit 98deb70

Please sign in to comment.