Skip to content

Commit

Permalink
Merge pull request #224 from Shougo/src
Browse files Browse the repository at this point in the history
Fix #220 split to bin and src files
  • Loading branch information
Shougo committed Oct 12, 2015
2 parents 36992e4 + ebaeff3 commit 18b5182
Show file tree
Hide file tree
Showing 22 changed files with 52 additions and 56 deletions.
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
autoload/vimproc_*.so
autoload/vimproc_*.dll
autoload/vimproc_*.dll.old
autoload/vimproc_*.dll.manifest
autoload/vimproc_*.exp
autoload/vimproc_*.lib
autoload/*.pdb
lib/*
doc/tags
*.obj
*.o
Expand Down
4 changes: 2 additions & 2 deletions README.mkd
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Not supported platforms:

* Clone this repo
* Build vimproc's native extensions (see Building for details)
* Copy `autoload/*` and `plugin/*` files to your 'runtimepath' directory (see
`:help runtimepath`).
* Copy `autoload/*`, `lib/*` and `plugin/*` files to your 'runtimepath'
directory (see `:help runtimepath`).

### NeoBundle

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ build_script:
test_script:
- '%APPVEYOR_BUILD_FOLDER%\tools\appveyor.bat test'
artifacts:
- path: autoload/vimproc_*.dll
- path: lib/vimproc_*.dll
name: vimproc.dll
deploy:
provider: GitHub
Expand Down
4 changes: 2 additions & 2 deletions autoload/vimproc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endif

call vimproc#util#set_default(
\ 'g:vimproc#dll_path',
\ expand('<sfile>:p:h') . '/' . s:vimproc_dll_basename,
\ expand('<sfile>:p:h:h') . '/lib/' . s:vimproc_dll_basename,
\ 'g:vimproc_dll_path')
unlet s:vimproc_dll_basename

Expand Down Expand Up @@ -141,7 +141,7 @@ if !filereadable(g:vimproc#dll_path) || !has('libcall') "{{{
endif"}}}

function! vimproc#version() "{{{
return str2nr(printf('%2d%02d', 9, 1))
return str2nr(printf('%2d%02d', 9, 2))
endfunction"}}}
function! vimproc#dll_version() "{{{
let [dll_version] = s:libcall('vp_dlversion', [])
Expand Down
21 changes: 11 additions & 10 deletions doc/vimproc.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*vimproc.txt* Asynchronous execution plugin for Vim

Version: 9.1
Version: 9.2
Author : Shougo <Shougo.Matsu at gmail.com>
Original Author : Yukihiro Nakadaira <yukihiro.nakadaira at gmail.com>
License: MIT license {{{
Expand Down Expand Up @@ -48,7 +48,7 @@ I'm maintaining it now. Instead of external shell (example: 'shell'),
==============================================================================
INSTALL *vimproc-install*

In first, you get vimproc from git repository.
In first, you must get vimproc from git repository.

http://github.com/Shougo/vimproc.vim

Expand Down Expand Up @@ -92,7 +92,8 @@ Mac OS X
>
$ make
<
Note: If you want to build for multiple architectures, you can use $ARCHS and $CC variables.
Note: If you want to build for multiple architectures, you can use $ARCHS and
$CC variables.

Build for i386 and x86-64:
>
Expand Down Expand Up @@ -379,13 +380,13 @@ VARIABLES *vimproc-variables*

*g:vimproc#dll_path*
g:vimproc#dll_path (default
Win32: "$VIMRUNTIME/autoload/vimproc_win32.dll"
Win64: "$VIMRUNTIME/autoload/vimproc_win64.dll"
Cygwin: "$VIMRUNTIME/autoload/vimproc_cygwin.dll"
Mac: "$VIMRUNTIME/autoload/vimproc_mac.so"
Linux32: "$VIMRUNTIME/autoload/vimproc_linux32.so"
Linux64: "$VIMRUNTIME/autoload/vimproc_linux64.so"
Others: "$VIMRUNTIME/autoload/vimproc_unix.so")
Win32: "$VIMRUNTIME/lib/vimproc_win32.dll"
Win64: "$VIMRUNTIME/lib/vimproc_win64.dll"
Cygwin: "$VIMRUNTIME/lib/vimproc_cygwin.dll"
Mac: "$VIMRUNTIME/lib/vimproc_mac.so"
Linux32: "$VIMRUNTIME/lib/vimproc_linux32.so"
Linux64: "$VIMRUNTIME/lib/vimproc_linux64.so"
Others: "$VIMRUNTIME/lib/vimproc_unix.so")
This variable stores a dll name used by vimproc. You must
compile this dll file. If this dll does not exist, vimproc
will echo error.
Expand Down
Empty file added lib/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions make_android.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
CFLAGS+=-W -Wall -Wno-unused -Wno-unused-parameter -std=c99 -O2 -fPIC -pedantic
LDFLAGS+=-shared

TARGET=autoload/vimproc_unix.so
SRC=autoload/proc.c autoload/ptytty.c
INC=autoload/vimstack.c autoload/ptytty.h
TARGET=lib/vimproc_unix.so
SRC=src/proc.c src/ptytty.c
INC=src/vimstack.c src/ptytty.h

all: $(TARGET)

Expand Down
6 changes: 3 additions & 3 deletions make_bsd.mak
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

SUFFIX!=uname -sm | tr '[:upper:]' '[:lower:]' | sed -e 's/ /_/'

TARGET=autoload/vimproc_$(SUFFIX).so
TARGET=lib/vimproc_$(SUFFIX).so

SRC=autoload/proc.c
SRC=src/proc.c
CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC
LDFLAGS+=-lutil

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

clean:
Expand Down
6 changes: 3 additions & 3 deletions make_cygwin.mak
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -use=gnu99 -shared
TARGET=autoload/vimproc_cygwin.dll
SRC=autoload/proc.c
TARGET=lib/vimproc_cygwin.dll
SRC=src/proc.c
LDFLAGS+=-lutil

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
gcc $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

clean:
Expand Down
6 changes: 3 additions & 3 deletions make_mac.mak
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ CC=gcc
endif
endif

TARGET=autoload/vimproc_mac.so
SRC=autoload/proc.c
TARGET=lib/vimproc_mac.so
SRC=src/proc.c
ARCHS=
CFLAGS+=-O2 -W -Wall -Wno-unused -Wno-unused-parameter -bundle -fPIC $(foreach ARCH,$(ARCHS),-arch $(ARCH))
LDFLAGS=

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

.PHONY : clean
Expand Down
6 changes: 3 additions & 3 deletions make_mingw32.mak
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# for MinGW.

TARGET=autoload/vimproc_win32.dll
SRC=autoload/proc_w32.c
TARGET=lib/vimproc_win32.dll
SRC=src/proc_w32.c
CC=gcc
CFLAGS+=-O2 -Wall -shared -m32
LDFLAGS+=-lwsock32

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

clean:
Expand Down
6 changes: 3 additions & 3 deletions make_mingw64.mak
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# for MinGW.

TARGET=autoload/vimproc_win64.dll
SRC=autoload/proc_w32.c
TARGET=lib/vimproc_win64.dll
SRC=src/proc_w32.c
CC=x86_64-w64-mingw32-gcc
CFLAGS+=-O2 -Wall -shared -m64
LDFLAGS+=-lwsock32

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

clean:
Expand Down
11 changes: 6 additions & 5 deletions make_msvc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ VIMPROC=vimproc_win64
VIMPROC=vimproc_win32
!endif

SRCDIR = autoload
SRCDIR = src
LIBDIR = lib
OUTDIR = $(SRCDIR)\obj$(CPU)

OBJS = $(OUTDIR)/proc_w32.obj
Expand All @@ -52,16 +53,16 @@ CFLAGS = $(CFLAGS) $(DEFINES) /wd4100 /wd4127 /O2

# RULES

build: $(SRCDIR)\$(VIMPROC).dll
build: $(LIBDIR)\$(VIMPROC).dll

clean:
-IF EXIST $(OUTDIR)/nul RMDIR /s /q $(OUTDIR)
-DEL /F /Q $(SRCDIR)\vimproc_win32.*
-DEL /F /Q $(SRCDIR)\vimproc_win64.*
-DEL /F /Q $(LIBDIR)\vimproc_win32.*
-DEL /F /Q $(LIBDIR)\vimproc_win64.*
-DEL /F /Q $(SRCDIR)\*.obj
-DEL /F /Q $(SRCDIR)\*.pdb

$(SRCDIR)\$(VIMPROC).dll: $(OBJS)
$(LIBDIR)\$(VIMPROC).dll: $(OBJS)
$(link) /NOLOGO $(ldebug) $(dlllflags) $(conlibsdll) $(LFLAGS) \
/OUT:$@ $(OBJS) shell32.lib
IF EXIST $@.manifest \
Expand Down
6 changes: 3 additions & 3 deletions make_sunos.mak
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ LDFLAGS+=-shared
endif
CPPFLAGS+=-D_XPG6 -D__EXTENSIONS__

TARGET=autoload/vimproc_unix.so
SRC=autoload/proc.c autoload/ptytty.c
INC=autoload/vimstack.c autoload/ptytty.h
TARGET=lib/vimproc_unix.so
SRC=src/proc.c src/ptytty.c
INC=src/vimstack.c src/ptytty.h

all: $(TARGET)

Expand Down
6 changes: 3 additions & 3 deletions make_unix.mak
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ ifneq (,$(wildcard /lib*/ld-linux*.so.2))
else
SUFFIX=unix
endif
TARGET=autoload/vimproc_$(SUFFIX).so
TARGET=lib/vimproc_$(SUFFIX).so

SRC=autoload/proc.c
SRC=src/proc.c
CFLAGS+=-W -O2 -Wall -Wno-unused -Wno-unused-parameter -std=gnu99 -pedantic -shared -fPIC
LDFLAGS+=-lutil

all: $(TARGET)

$(TARGET): $(SRC) autoload/vimstack.c
$(TARGET): $(SRC) src/vimstack.c
$(CC) $(CFLAGS) -o $(TARGET) $(SRC) $(LDFLAGS)

clean:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion autoload/proc.c → src/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ vp_dlclose(char *args)
const char *
vp_dlversion(char *args)
{
vp_stack_push_num(&_result, "%2d%02d", 9, 1);
vp_stack_push_num(&_result, "%2d%02d", 9, 2);
return vp_stack_return(&_result);
}

Expand Down
2 changes: 1 addition & 1 deletion autoload/proc_w32.c → src/proc_w32.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ vp_dlclose(char *args)
const char *
vp_dlversion(char *args)
{
vp_stack_push_num(&_result, "%2d%02d", 9, 1);
vp_stack_push_num(&_result, "%2d%02d", 9, 2);
return vp_stack_return(&_result);
}

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tools/update-dll-mingw.bat
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ if ERRORLEVEL 1 (
rem Build failed.

rem Try to delete old DLLs.
if exist autoload\%vimproc_dllname%.old del autoload\%vimproc_dllname%.old
if exist autoload\%vimproc_dllname% del autoload\%vimproc_dllname%
if exist lib\%vimproc_dllname%.old del lib\%vimproc_dllname%.old
if exist lib\%vimproc_dllname% del lib\%vimproc_dllname%
rem If the DLL couldn't delete (may be it is in use), rename it.
if exist autoload\%vimproc_dllname% ren autoload\%vimproc_dllname% %vimproc_dllname%.old
if exist lib\%vimproc_dllname% ren lib\%vimproc_dllname% %vimproc_dllname%.old

mingw32-make -f make_mingw%vimproc_arch%.mak %1 %2 %3 %4 %5 %6 %7 %8 %9
)

0 comments on commit 18b5182

Please sign in to comment.