Skip to content

Commit

Permalink
update libmojibake -> utf8proc 1.2 (closes JuliaLang#10654)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Mar 28, 2015
1 parent b535042 commit 49d0aa8
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 52 deletions.
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
[submodule "deps/openspecfun"]
path = deps/openspecfun
url = git://github.com/JuliaLang/openspecfun.git
[submodule "deps/libmojibake"]
path = deps/libmojibake
url = git://github.com/JuliaLang/libmojibake.git
[submodule "deps/utf8proc"]
path = deps/utf8proc
url = git://github.com/JuliaLang/utf8proc.git
12 changes: 4 additions & 8 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ USE_SYSTEM_SUITESPARSE=0
USE_SYSTEM_RMATH=0
USE_SYSTEM_LIBUV=0
USE_SYSTEM_UTF8PROC=0
USE_SYSTEM_MOJIBAKE=0
USE_SYSTEM_UTF8PROC=0
USE_SYSTEM_LIBGIT2=0

# Link to the LLVM shared library
Expand Down Expand Up @@ -594,14 +594,10 @@ else
LIBUV_INC = $(JULIAHOME)/deps/libuv/include
endif

ifeq ($(USE_SYSTEM_MOJIBAKE), 1)
LIBMOJIBAKE = -lmojibake
ifeq ($(USE_SYSTEM_UTF8PROC), 1)
LIBUTF8PROC = -lutf8proc
else
ifeq ($(USE_SYSTEM_UTF8PROC), 1)
LIBMOJIBAKE = -lutf8proc
else
LIBMOJIBAKE = $(build_libdir)/libmojibake.a
endif
LIBUTF8PROC = $(build_libdir)/libutf8proc.a
endif

# OS specific stuff
Expand Down
62 changes: 31 additions & 31 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ include $(JULIAHOME)/Make.inc
# if you are adding a new target, it can help to copy an similar, existing target
#
# autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf uv
# custom Makefile rules: openlibm Rmath-julia dsfmt suitesparse-wrapper suitesparse lapack openblas mojibake objconv
# custom Makefile rules: openlibm Rmath-julia dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc objconv
# CMake libs: libgit2
#
# downloaded from git: llvm-svn, uv, libopenlibm, mojibake, openspecfun
# downloaded from git: llvm-svn, uv, libopenlibm, utf8proc, openspecfun
#
# there are rules in this file with the . replaced by a %
# this is some magic Makefile trick that tells make
Expand Down Expand Up @@ -150,8 +150,8 @@ ifeq ($(USE_SYSTEM_SUITESPARSE), 0)
STAGE2_DEPS += suitesparse
endif

ifeq ($(USE_SYSTEM_MOJIBAKE), 0)
STAGE2_DEPS += mojibake
ifeq ($(USE_SYSTEM_UTF8PROC), 0)
STAGE2_DEPS += utf8proc
endif

# Only compile standalone LAPACK if we are not using OpenBLAS.
Expand Down Expand Up @@ -183,7 +183,7 @@ install: $(addprefix install-, $(DEP_LIBS))
cleanall: $(addprefix clean-, $(DEP_LIBS))
distcleanall: $(addprefix distclean-, $(DEP_LIBS))
rm -rf $(build_prefix)
getall: get-llvm get-uv get-pcre get-openlibm get-openspecfun get-dsfmt get-Rmath-julia get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-patchelf get-mojibake get-virtualenv get-objconv get-libgit2
getall: get-llvm get-uv get-pcre get-openlibm get-openspecfun get-dsfmt get-Rmath-julia get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-patchelf get-utf8proc get-virtualenv get-objconv get-libgit2

## PATHS ##
# sort is used to remove potential duplicates
Expand Down Expand Up @@ -1344,47 +1344,47 @@ compile-fftw-double: $(FFTW_DOUBLE_OBJ_TARGET)
check-fftw-double: fftw-$(FFTW_VER)-double/checked
install-fftw-double: $(FFTW_DOUBLE_OBJ_TARGET)

## MOJIBAKE ##
## UTF8PROC ##

MOJIBAKE_SRC_TARGET = libmojibake/libmojibake.a
MOJIBAKE_OBJ_LIB = $(build_libdir)/libmojibake.a
MOJIBAKE_OBJ_HEADER = $(build_includedir)/mojibake.h
MOJIBAKE_OBJ_TARGET = $(MOJIBAKE_OBJ_LIB) $(MOJIBAKE_OBJ_HEADER)
UTF8PROC_SRC_TARGET = utf8proc/libutf8proc.a
UTF8PROC_OBJ_LIB = $(build_libdir)/libutf8proc.a
UTF8PROC_OBJ_HEADER = $(build_includedir)/utf8proc.h
UTF8PROC_OBJ_TARGET = $(UTF8PROC_OBJ_LIB) $(UTF8PROC_OBJ_HEADER)


libmojibake/Makefile:
utf8proc/Makefile:
(cd .. && git submodule init && git submodule update)
ifeq (exists, $(shell [ -d libmojibake/.git ] && echo exists ))
$(MOJIBAKE_SRC_TARGET): libmojibake/.git/HEAD
ifeq (exists, $(shell [ -d utf8proc/.git ] && echo exists ))
$(UTF8PROC_SRC_TARGET): utf8proc/.git/HEAD
endif
ifeq (exists, $(shell [ -d $(JULIAHOME)/.git/modules/deps/libmojibake ] && echo exists ))
$(MOJIBAKE_SRC_TARGET): $(JULIAHOME)/.git/modules/deps/libmojibake/HEAD
ifeq (exists, $(shell [ -d $(JULIAHOME)/.git/modules/deps/utf8proc ] && echo exists ))
$(UTF8PROC_SRC_TARGET): $(JULIAHOME)/.git/modules/deps/utf8proc/HEAD
endif
$(MOJIBAKE_SRC_TARGET): libmojibake/Makefile
$(MAKE) -C libmojibake cc="$(CC) -O2 -std=c99 $(fPIC) -DMOJIBAKE_EXPORTS" AR="$(AR)" libmojibake.a
$(UTF8PROC_SRC_TARGET): utf8proc/Makefile
$(MAKE) -C utf8proc cc="$(CC) -O2 -std=c99 $(fPIC) -DUTF8PROC_EXPORTS" AR="$(AR)" libutf8proc.a
touch -c $@
libmojibake/checked: $(MOJIBAKE_SRC_TARGET)
utf8proc/checked: $(UTF8PROC_SRC_TARGET)
ifeq ($(OS),$(BUILD_OS))
-$(MAKE) -C libmojibake check
-$(MAKE) -C utf8proc check
endif
echo 1 > $@

$(MOJIBAKE_OBJ_LIB): $(MOJIBAKE_SRC_TARGET)
$(UTF8PROC_OBJ_LIB): $(UTF8PROC_SRC_TARGET)
cp -f $< $@

$(MOJIBAKE_OBJ_HEADER): libmojibake/Makefile
cp -f libmojibake/mojibake.h $@
$(UTF8PROC_OBJ_HEADER): utf8proc/Makefile
cp -f utf8proc/utf8proc.h $@

clean-mojibake:
-$(MAKE) -C libmojibake clean
-rm -rf $(build_libdir)/libmojibake.a $(build_includedir)/mojibake.h
distclean-mojibake: clean-mojibake
clean-utf8proc:
-$(MAKE) -C utf8proc clean
-rm -rf $(build_libdir)/libutf8proc.a $(build_includedir)/utf8proc.h
distclean-utf8proc: clean-utf8proc

get-mojibake: libmojibake/Makefile
configure-mojibake: get-mojibake
compile-mojibake: $(MOJIBAKE_SRC_TARGET)
check-mojibake: libmojibake/checked
install-mojibake: $(MOJIBAKE_OBJ_TARGET)
get-utf8proc: utf8proc/Makefile
configure-utf8proc: get-utf8proc
compile-utf8proc: $(UTF8PROC_SRC_TARGET)
check-utf8proc: utf8proc/checked
install-utf8proc: $(UTF8PROC_OBJ_TARGET)

## SUITESPARSE ##

Expand Down
1 change: 0 additions & 1 deletion deps/libmojibake
Submodule libmojibake deleted from 86447a
1 change: 1 addition & 0 deletions deps/utf8proc
Submodule utf8proc added at e1fdad
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ifeq ($(USE_LLVM_SHLIB),1)
LLVMLINK = $(call exec,$(LLVM_CONFIG) --ldflags) -lLLVM-$(call exec,$(LLVM_CONFIG) --version)
endif

COMMON_LIBS = -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBMOJIBAKE) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
COMMON_LIBS = -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS)
DEBUG_LIBS = $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
RELEASE_LIBS = $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport.a $(COMMON_LIBS)

Expand Down
4 changes: 2 additions & 2 deletions src/flisp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ HEADERS = $(wildcard *.h) $(LIBUV_INC)/uv.h
OBJS = $(SRCS:%.c=$(BUILDDIR)/%.o)
DOBJS = $(SRCS:%.c=$(BUILDDIR)/%.dbg.obj)
LLTDIR = ../support
LLT = $(BUILDDIR)/$(LLTDIR)/libsupport.a $(LIBUV) $(LIBMOJIBAKE)
LLT = $(BUILDDIR)/$(LLTDIR)/libsupport.a $(LIBUV) $(LIBUTF8PROC)

FLAGS = -I$(LLTDIR) $(CFLAGS) $(HFILEDIRS:%=-I%) \
-I$(LIBUV_INC) -I$(build_includedir) $(LIBDIRS:%=-L%) \
-DLIBRARY_EXPORTS -DMOJIBAKE_EXPORTS
-DLIBRARY_EXPORTS -DUTF8PROC_EXPORTS
ifneq ($(USEMSVC), 1)
FLAGS += -Wall -Wno-strict-aliasing -DUSE_COMPUTED_GOTO -fvisibility=hidden
endif
Expand Down
10 changes: 5 additions & 5 deletions src/flisp/Windows.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ OBJECTS = \
dirname.obj

LIBUV = $(MAKEDIR)\..\..\deps\libuv\libuv.lib
LIBMOJIBAKE = $(MAKEDIR)\..\..\deps\libmojibake\libmojibake.lib
LIBUTF8PROC = $(MAKEDIR)\..\..\deps\libutf8proc\libutf8proc.lib
LIBSUPPORT = $(MAKEDIR)\..\support\libsupport.lib

INCLUDE = $(INCLUDE);$(MAKEDIR)\..\..\deps\libuv\include;$(MAKEDIR)\..\..\deps\libmojibake;$(MAKEDIR)\..\support
INCLUDE = $(INCLUDE);$(MAKEDIR)\..\..\deps\libuv\include;$(MAKEDIR)\..\..\deps\libutf8proc;$(MAKEDIR)\..\support

CFLAGS = $(CFLAGS) /Qstd=c99 -D_CRT_SECURE_NO_WARNINGS -DLIBRARY_EXPORTS
LFLAGS = $(LFLAGS) kernel32.lib ws2_32.lib psapi.lib advapi32.lib iphlpapi.lib

default: $(NAME).exe

$(NAME).exe: lib$(NAME).lib flmain.obj $(LIBSUPPORT) $(LIBUV) $(LIBMOJIBAKE)
$(NAME).exe: lib$(NAME).lib flmain.obj $(LIBSUPPORT) $(LIBUV) $(LIBUTF8PROC)
$(LINK) $(LFLAGS) /OUT:$(NAME).exe /PDB:$(NAME).pdb /MAP $**

$(LIBSUPPORT):
Expand All @@ -48,8 +48,8 @@ $(LIBSUPPORT):
$(LIBUV):
PUSHD $(MAKEDIR)\..\..\deps\libuv && $(MAKE) /NOLOGO /F Windows.mk && POPD

$(LIBMOJIBAKE):
PUSHD $(MAKEDIR)\..\..\deps\libmojibake && cl -nologo /c utf8proc.c && $(AR) /OUT:libmojibake.lib utf8proc.obj && POPD
$(LIBUTF8PROC):
PUSHD $(MAKEDIR)\..\..\deps\libutf8proc && cl -nologo /c utf8proc.c && $(AR) /OUT:libutf8proc.lib utf8proc.obj && POPD

lib$(NAME).lib: $(OBJECTS)
$(AR) /OUT:lib$(NAME).lib $**
Expand Down
2 changes: 1 addition & 1 deletion src/flisp/julia_extensions.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <string.h>
#include <assert.h>
#include "flisp.h"
#include "mojibake.h"
#include "utf8proc.h"

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 49d0aa8

Please sign in to comment.