View sourcecode

The following files exists in this folder. Click to view.

Makefile

1 lines ASCII Unix (LF)
1
#!/usr/bin/make -f
#
#

# ------------------------------------------------------------------------
#
# General and combined targets
#

# target: all - Default target, run tests and build
.PHONY:  all
all: test build


# target: test - Do all tests
.PHONY:  prepare test
#test: js-cs js-hint less-lint html-lint
test: phpunit phpcs phpmd



# target: build - Do all build
.PHONY:  build
build: test doc #less-compile less-minify js-minify



# target: doc - Generate documentation.
.PHONY:  doc
doc: phpdoc



# target: prepare - Prepare for tests and build
.PHONY:  prepare
prepare:
    [ -d build ] || mkdir build
    rm -rf build/*



# target: update - Update the codebase.
.PHONY:  update
update:
    git pull
    composer update



# target: clean - Removes generated files and directories.
.PHONY:  clean
clean:
    @echo "Target clean not implemented."
    #rm -f $(CSS_MINIFIED) $(JS_MINIFIED)



# target: help - Displays help.
.PHONY:  help
help:
    @echo "make [target] ..."
    @echo "target:"
    @egrep "^# target:" Makefile | sed 's/# target: / /g'



# ------------------------------------------------------------------------
#
# PHP
#

# target: phpcs - Codestyle for PHP.
.PHONY: phpcs

phpcs:
    @echo "==> PHP Codestyle"
    phpcs --standard=.phpcs.xml | tee build/phpcs



# target: phpcbf - Fix codestyle for PHP.
.PHONY: phpcbf

phpcbf:
    @echo "==> PHP fix codestyle"
    phpcbf --standard=.phpcs.xml



# target: phpmd - Mess detector for PHP.
.PHONY: phpmd

phpmd:
    @echo "==> PHP Mess detector"
    - phpmd . text .phpmd.xml | tee build/phpmd


# target: phpunit - Run unit tests for PHP.
.PHONY: phpunit

phpunit:
    @echo "==> PHP unittests"
    phpunit --configuration .phpunit.xml



# target: phpdoc - Create documentation for PHP.
.PHONY: phpdoc

phpdoc:
    @echo "==> Building documentation"
    phpdoc --config=.phpdoc.xml