-DISTDEBIAN=$(shell grep -qi Debian /etc/issue && echo debian)
+DISTDEBIAN=$(shell [ -f /etc/debian_version ] && echo debian)
DISTREDHAT=$(shell grep -qi 'Red Hat' /etc/issue && echo rh)
DISTSUSE=$(shell grep -qi 'SuSE' /etc/issue && echo rh)
DIST=$(DISTDEBIAN)$(DISTREDHAT)$(DISTSUSE)
BUILDRESULT=$(CURDIR)/result
VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
-ID=$(shell LANG=C svnversion)
-URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
-TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
+in_svn_repo:= $(wildcard .svn/)
+ifeq ($(strip $(in_svn_repo)),)
+ ID=unknown
+ URL=unknown
+ TAG=unknown
+else
+ ID=$(shell LANG=C svnversion)
+ URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
+ 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=fusionforge-$(VER)-$(ID)
else
@echo "Use one of the following target with "
@echo "make -f Makefile.$(DIST) <target>"
@echo "=========================================================================="
- @make -f Makefile.$(DIST)
+ @$(MAKE) -f Makefile.$(DIST)
check:
cd tests ; php 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-full-tests:
- find $(BUILDDIR)/packages -type f -exec rm -f {} \;
- mkdir -p $(BUILDDIR)/reports/coverage
+ mkdir -p $(BUILDDIR)/build/packages $(BUILDDIR)/reports/coverage
+ find $(BUILDDIR)/build/packages -type f -exec rm -f {} \;
phpdoc --title 'API Documentation' -ue on -t $(BUILDDIR)/apidocs -d gforge/common -tb '/usr/share/php/data/phpUnderControl/data/phpdoc' -o HTML:Phpuc:phpuc
-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
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
+ 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
-%:
- @make -f Makefile.$(DIST) $@
+%: gforge/plugins/mediawiki/mediawiki-skin/FusionForge.php
+ $(MAKE) -f Makefile.$(DIST) $@