DOXYGEN=doxygen
-VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
+VER=$(shell LC_ALL=C sed -n '/>software_version/s/^.*'\''\([0-9.]*\)'\''.*$$/\1/p' src/common/include/FusionForge.class.php)
in_svn_repo:= $(wildcard .svn/)
ifeq ($(strip $(in_svn_repo)),)
ID=unknown
TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
endif
ifeq ($(TAG),)
+ VERSION_ID=$(VER)-$(ID)
VERSION=fusionforge-$(VER)-$(ID)
else
+ VERSION_ID=$(VER)
VERSION=fusionforge-$(VER)
endif
@echo "=========================================================================="
@$(MAKE) -f Makefile.$(DIST)
-check:
+check: testdepends
## To run test in verbose mode :
#cd tests ; phpunit --verbose unit; phpunit --verbose code;
- cd tests ; php AllTests.php
+ cd tests ; php AllTests.php | perl -p -e '$$e=1 if /FAILURE/ ; END { exit 1 if $$e }'
-buildtar:
+checkfull: testdepends
+ ## To run test in verbose mode :
+ #cd tests ; phpunit --verbose unit; phpunit --verbose code; phpunit --verbose build
+ cd tests ; php AllFullTests.php
+
+checkdebtools:
+ sudo apt-get install php5-cli phpunit php-htmlpurifier pcregrep moreutils createrepo xalan #ubuntu-keyring
+
+buildtar: $(BUILDRESULT)
rm -fr /tmp/$(VERSION)
- cd gforge; find . -type f -or -type l | grep -v '/.svn/' | grep -v '^./debian' | grep -v '^./deb-specific' | grep -v '^./rpm-specific' | grep -v '^./contrib' | grep -v '^./gforge.spec' | grep -v '^./README.setup' | grep -v '^./setup' | cpio -pdumB --quiet /tmp/$(VERSION)
+ cd src; find . -type f -or -type l | grep -v '/.svn/' | grep -v '^./debian' | grep -v '^./deb-specific' | grep -v '^./rpm-specific' | grep -v '^./contrib' | grep -v '^./fusionforge.spec' | cpio -pdumB --quiet /tmp/$(VERSION)
cd /tmp/$(VERSION); utils/manage-translations.sh build
cd /tmp/; tar jcf $(BUILDRESULT)/$(VERSION).tar.bz2 $(VERSION)
rm -fr /tmp/$(VERSION)
+$(BUILDRESULT):
+ mkdir $(BUILDRESULT)
+
build-unit-tests:
mkdir -p $(BUILDDIR)/reports/coverage
- cd tests; phpunit --log-xml $(BUILDDIR)/reports/phpunit.xml --log-pmd $(BUILDDIR)/reports/phpunit.pmd.xml --coverage-clover $(BUILDDIR)/reports/coverage/clover.xml --coverage-html $(BUILDDIR)/reports/coverage/ AllTests.php
+ cd tests; phpunit --log-junit $(BUILDDIR)/reports/phpunit.xml --coverage-clover $(BUILDDIR)/reports/coverage/clover.xml --coverage-html $(BUILDDIR)/reports/coverage/ AllTests.php
cp $(BUILDDIR)/reports/phpunit.xml $(BUILDDIR)/reports/phpunit.xml.org; xalan -in $(BUILDDIR)/reports/phpunit.xml.org -xsl fix_phpunit.xslt -out $(BUILDDIR)/reports/phpunit.xml
build-doc:
- $(DOXYGEN) gforge/docs/fusionforge.doxygen
- $(DOXYGEN) gforge/plugins/wiki/www/doc/phpwiki.doxygen
+ $(DOXYGEN) src/docs/fusionforge.doxygen
+ $(DOXYGEN) src/plugins/wiki/www/doc/phpwiki.doxygen
build-full-tests:
mkdir -p $(BUILDDIR)/build/packages $(BUILDDIR)/reports/coverage
find $(BUILDDIR)/build/packages -type f -exec rm -f {} \;
- -phpcs --tab-width=4 --standard=PEAR --report=checkstyle gforge/common > $(BUILDDIR)/reports/checkstyle.xml
- cd tests; phpunit --log-xml $(BUILDDIR)/reports/phpunit.xml --log-pmd $(BUILDDIR)/reports/phpunit.pmd.xml --coverage-clover $(BUILDDIR)/reports/coverage/clover.xml --coverage-html $(BUILDDIR)/reports/coverage/ AllFullTests.php
+ -phpcs --tab-width=4 --standard=PEAR --report=checkstyle src/common > $(BUILDDIR)/reports/checkstyle.xml
+ cd tests; phpunit --log-junit $(BUILDDIR)/reports/phpunit.xml --coverage-clover $(BUILDDIR)/reports/coverage/clover.xml --coverage-html $(BUILDDIR)/reports/coverage/ AllFullTests.php
cp $(BUILDDIR)/reports/phpunit.xml $(BUILDDIR)/reports/phpunit.xml.org; xalan -in $(BUILDDIR)/reports/phpunit.xml.org -xsl fix_phpunit.xslt -out $(BUILDDIR)/reports/phpunit.xml
- cd tests; phpunit --log-xml $(BUILDDIR)/reports/phpunit-selenium.xml TarCentos52Tests.php
+ cd tests; phpunit --log-junit $(BUILDDIR)/reports/phpunit-selenium.xml TarCentos52Tests.php
cp $(BUILDDIR)/reports/phpunit-selenium.xml $(BUILDDIR)/reports/phpunit-selenium.xml.org; xalan -in $(BUILDDIR)/reports/phpunit-selenium.xml.org -xsl fix_phpunit.xslt -out $(BUILDDIR)/reports/phpunit-selenium.xml
-gforge/plugins/mediawiki/mediawiki-skin/FusionForge.php:
- $(MAKE) -C gforge/plugins/mediawiki/mediawiki-skin
+src/plugins/mediawiki/mediawiki-skin/FusionForge.php:
+ $(MAKE) -C src/plugins/mediawiki/mediawiki-skin
-%: gforge/plugins/mediawiki/mediawiki-skin/FusionForge.php
+%: src/plugins/mediawiki/mediawiki-skin/FusionForge.php
$(MAKE) -f Makefile.$(DIST) $@
+
+wslink: /etc/apache2/mods-enabled/userdir.load
+ [ -d ~/public_html ] || mkdir ~/public_html
+ [ -L ~/public_html/ws ] || ln -s $(CURDIR) ~/public_html/ws
+
+/etc/apache2/mods-enabled/userdir.load:
+ sudo a2enmod userdir