Cleaned up Makefile
This commit is contained in:
parent
289e1f4897
commit
e576b3b4c0
1 changed files with 35 additions and 84 deletions
119
Makefile
119
Makefile
|
@ -1,75 +1,26 @@
|
||||||
PHPCC:=$(shell which php)
|
PHPCC := $(shell which php)
|
||||||
PHPAB:=$(shell which phpab)
|
PHPAB := $(shell which phpab)
|
||||||
BUILD_PATH=build
|
BUILD_PATH := build
|
||||||
SRC_PATH=src
|
SRC_PATH := src
|
||||||
|
|
||||||
autoload:
|
AUTOLOAD_PATHS := $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption \
|
||||||
# Generates/creates all the autoloader files
|
$(SRC_PATH)/ncc/ThirdParty/jelix/version \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/nikic/php-parser/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/Process \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/Uid \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/theseer/Autoload \
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php
|
$(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php
|
|
||||||
make $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php
|
|
||||||
make $(SRC_PATH)/ncc/autoload_spl.php
|
|
||||||
cp $(SRC_PATH)/autoload/autoload.php $(SRC_PATH)/ncc/autoload.php
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php:
|
$(SRC_PATH)/%/autoload_spl.php:
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php \
|
$(PHPCC) $(PHPAB) --output $@ $(SRC_PATH)/$*
|
||||||
$(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/jelix/version
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/nikic/php-parser/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Process
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php:
|
|
||||||
$(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Uid
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/theseer/Autoload
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php:
|
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php \
|
|
||||||
$(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner
|
|
||||||
|
|
||||||
$(SRC_PATH)/ncc/autoload_spl.php:
|
$(SRC_PATH)/ncc/autoload_spl.php:
|
||||||
$(PHPCC) $(PHPAB) --output $(SRC_PATH)/ncc/autoload_spl.php \
|
$(PHPCC) $(PHPAB) --output $@ \
|
||||||
$(SRC_PATH)/ncc/Abstracts \
|
$(SRC_PATH)/ncc/Abstracts \
|
||||||
$(SRC_PATH)/ncc/Classes \
|
$(SRC_PATH)/ncc/Classes \
|
||||||
$(SRC_PATH)/ncc/CLI \
|
$(SRC_PATH)/ncc/CLI \
|
||||||
|
@ -83,38 +34,38 @@ $(SRC_PATH)/ncc/autoload_spl.php:
|
||||||
$(SRC_PATH)/ncc/ncc.php \
|
$(SRC_PATH)/ncc/ncc.php \
|
||||||
$(SRC_PATH)/ncc/Runtime.php
|
$(SRC_PATH)/ncc/Runtime.php
|
||||||
|
|
||||||
|
.PHONY: autoload
|
||||||
|
autoload: $(addsuffix /autoload_spl.php, $(AUTOLOAD_PATHS)) $(SRC_PATH)/ncc/autoload_spl.php
|
||||||
|
cp $(SRC_PATH)/autoload/autoload.php $(SRC_PATH)/ncc/autoload.php
|
||||||
|
|
||||||
|
.PHONY: redist
|
||||||
redist: autoload
|
redist: autoload
|
||||||
rm -rf $(BUILD_PATH)/src
|
rm -rf $(BUILD_PATH)/src
|
||||||
mkdir -p $(BUILD_PATH)/src
|
mkdir -p $(BUILD_PATH)/src
|
||||||
cp -rf $(SRC_PATH)/ncc/* $(BUILD_PATH)/src
|
cp -rf $(SRC_PATH)/ncc/* $(BUILD_PATH)/src
|
||||||
cp $(SRC_PATH)/installer/installer $(BUILD_PATH)/src/INSTALL
|
cp $(SRC_PATH)/installer/installer $(BUILD_PATH)/src/INSTALL
|
||||||
cp $(SRC_PATH)/installer/ncc.sh $(BUILD_PATH)/src/ncc.sh
|
cp $(SRC_PATH)/installer/ncc.sh $(BUILD_PATH)/src/ncc.sh
|
||||||
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/default_config.yaml;
|
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/default_config.yaml
|
||||||
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/CLI/template_config.yaml;
|
cp $(SRC_PATH)/config/ncc.yaml $(BUILD_PATH)/src/CLI/template_config.yaml
|
||||||
cp $(SRC_PATH)/installer/extension $(BUILD_PATH)/src/extension
|
cp $(SRC_PATH)/installer/extension $(BUILD_PATH)/src/extension
|
||||||
chmod +x $(BUILD_PATH)/src/INSTALL
|
chmod +x $(BUILD_PATH)/src/INSTALL
|
||||||
cp LICENSE $(BUILD_PATH)/src/LICENSE
|
cp LICENSE $(BUILD_PATH)/src/LICENSE
|
||||||
cp README.md $(BUILD_PATH)/src/README.md
|
cp README.md $(BUILD_PATH)/src/README.md
|
||||||
cp $(SRC_PATH)/installer/hash_check.php $(BUILD_PATH)/src/hash_check.php; $(PHPCC) $(BUILD_PATH)/src/hash_check.php; rm $(BUILD_PATH)/src/hash_check.php
|
cp $(SRC_PATH)/installer/hash_check.php $(BUILD_PATH)/src/hash_check.php
|
||||||
cp $(SRC_PATH)/installer/generate_build_files.php $(BUILD_PATH)/src/generate_build_files.php; $(PHPCC) $(BUILD_PATH)/src/generate_build_files.php; rm $(BUILD_PATH)/src/generate_build_files.php
|
$(PHPCC) $(BUILD_PATH)/src/hash_check.php
|
||||||
|
rm $(BUILD_PATH)/src/hash_check.php
|
||||||
|
cp $(SRC_PATH)/installer/generate_build_files.php $(BUILD_PATH)/src/generate_build_files.php
|
||||||
|
$(PHPCC) $(BUILD_PATH)/src/generate_build_files.php
|
||||||
|
rm $(BUILD_PATH)/src/generate_build_files.php
|
||||||
mkdir -p $(BUILD_PATH)/src/repositories
|
mkdir -p $(BUILD_PATH)/src/repositories
|
||||||
cp -rf $(SRC_PATH)/default_repositories/*.json $(BUILD_PATH)/src/repositories
|
cp -rf $(SRC_PATH)/default_repositories/*.json $(BUILD_PATH)/src/repositories
|
||||||
|
|
||||||
|
.PHONY: tar
|
||||||
tar: redist
|
tar: redist
|
||||||
cd $(BUILD_PATH)/src; tar -czvf ../build.tar.gz *
|
cd $(BUILD_PATH)/src; tar -czvf ../build.tar.gz *
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILD_PATH)
|
rm -rf $(BUILD_PATH)
|
||||||
rm -f $(SRC_PATH)/ncc/autoload_spl.php
|
rm -f $(SRC_PATH)/ncc/autoload_spl.php
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/defuse/php-encryption/autoload_spl.php
|
rm -f $(addsuffix /autoload_spl.php, $(AUTOLOAD_PATHS))
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/jelix/version/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/nikic/PhpParser/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-ctype/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-mbstring/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/polyfill-uuid/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Process/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Uid/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Filesystem/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/Symfony/Yaml/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/theseer/Autoload/autoload_spl.php
|
|
||||||
rm -f $(SRC_PATH)/ncc/ThirdParty/theseer/DirectoryScanner/autoload_spl.php
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue