-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
57 lines (45 loc) · 1.28 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
source := README.md \
ChangeLog.md \
bin/phpctags \
plugin/tagbar-phpctags.vim
version := 0.10.0
.PHONY: all
all: bin/phpctags
.PHONY: clean
clean:
@echo "Cleaning old build files ..."
@rm -f bin/*
@rm -f build/tagbar-phpctags-$(version).zip
@cd build/phpctags-$(version) && $(MAKE) clean
@rm -rf build/*
@echo "Done!"
.PHONY: dist-clean
dist-clean:
@echo "Cleaning old build files ..."
@rm -rf bin/
@rm -rf build/
@echo "Done!"
.PHONY: archive
archive: build/tagbar-phpctags-$(version).zip
bin:
@mkdir bin/
bin/phpctags: build/phpctags-$(version)/phpctags | bin
@ln -s ../build/phpctags-$(version)/bin/phpctags $@
build:
@mkdir build/
build/phpctags-$(version).zip: | build
@echo "Downloading phpctags ..."
@curl -o $@ -s -L https://github.com/vim-php/phpctags/archive/$(version).zip
@echo "Done!"
build/phpctags-$(version): build/phpctags-$(version).zip | build
@echo "Preparing phpctags ..."
@cd build/ && unzip phpctags-$(version).zip
@echo "Done!"
build/phpctags-$(version)/phpctags: | build/phpctags-$(version)
@echo "Building phpctags ..."
@cd build/phpctags-$(version) && $(MAKE)
@echo "Done!"
build/tagbar-phpctags-$(version).zip: $(source)
@echo "Building tagbar-phpctags distributable archive ..."
@zip $@ $(source)
@echo "Done!"