-
Notifications
You must be signed in to change notification settings - Fork 51
/
Makefile
45 lines (37 loc) · 1.01 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
source := README.md \
ChangeLog.md \
composer.json \
composer.lock \
bootstrap.php \
PHPCtags.class.php
.PHONY: all
all: build/phpctags.phar
.PHONY: clean
clean:
@echo "Cleaning executables ..."
@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
@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