forked from vim-php/phpctags
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (43 loc) · 1.15 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
source := README.md \
ChangeLog.md \
composer.json \
composer.lock \
bootstrap.php \
PHPCtags.class.php
.PHONY: all
all: phpctags
.PHONY: clean
clean:
@echo "Cleaning executables ..."
@rm -f ./phpctags
@rm -f ./build/phpctags.phar
@echo "Done!"
.PHONY: dist-clean
dist-clean:
@echo "Cleaning old build files and vendor libraries ..."
@rm -rf ./build
@rm -rf ./vendor
@rm -f ./phpctags
@echo "Done!"
.PHONY: install
install: phpctags
@echo "Sorry, you need to move phpctags to /usr/bin/phpctags or /usr/local/bin/phpctags or any place you want manually."
build:
@if [ ! -x build ]; \
then \
mkdir build; \
fi
build/composer.phar: | build
@echo "Installing composer ..."
@curl -s http://getcomposer.org/installer | php -- --install-dir=build
vendor: composer.lock build/composer.phar
@echo "Installing vendor libraries ..."
@php build/composer.phar install
@touch vendor/
build/phpctags.phar: vendor $(source) | build
@php -dphar.readonly=0 buildPHAR.php
@chmod +x build/phpctags.phar
phpctags: build/phpctags.phar
@echo "Building phpctags ..."
@cp build/phpctags.phar phpctags
@echo "Done!"