1 DISTDEBIAN=$(shell [ -f /etc/debian_version ] && echo debian)
2 DISTREDHAT=$(shell grep -qi 'Red Hat' /etc/issue && echo rh)
3 DISTSUSE=$(shell grep -qi 'SuSE' /etc/issue && echo rh)
4 DIST=$(DISTDEBIAN)$(DISTREDHAT)$(DISTSUSE)
6 ARCHIVE=$(CURDIR)/depot
7 BUILDRESULT=$(CURDIR)/result
11 VER=$(shell LANG=C grep '>software_version' gforge/common/include/FusionForge.class.php | cut -d\' -f2)
12 in_svn_repo:= $(wildcard .svn/)
13 ifeq ($(strip $(in_svn_repo)),)
18 ID=$(shell LANG=C svnversion)
19 URL=$(shell LANG=C svn info | grep 'Root:' | awk '{print $$3}')
20 TAG=$(shell LANG=C svn log $(URL) -r $(ID) -l 1 2>/dev/null | awk '{ if ($$1=="Tag-Release") print $$1}')
23 VERSION=fusionforge-$(VER)-$(ID)
25 VERSION=fusionforge-$(VER)
29 @echo "=========================================================================="
30 @echo "Use one of the following target with "
31 @echo "make -f Makefile.$(DIST) <target>"
32 @echo "=========================================================================="
33 @$(MAKE) -f Makefile.$(DIST)
36 cd tests ; php AllTests.php
39 rm -fr /tmp/$(VERSION)
40 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)
41 cd /tmp/$(VERSION); utils/manage-translations.sh build
42 cd /tmp/; tar jcf $(BUILDRESULT)/$(VERSION).tar.bz2 $(VERSION)
43 rm -fr /tmp/$(VERSION)
46 mkdir -p $(BUILDDIR)/reports/coverage
47 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
48 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
51 $(DOXYGEN) gforge/docs/fusionforge.doxygen
52 $(DOXYGEN) gforge/plugins/wiki/www/doc/phpwiki.doxygen
55 mkdir -p $(BUILDDIR)/build/packages $(BUILDDIR)/reports/coverage
56 find $(BUILDDIR)/build/packages -type f -exec rm -f {} \;
57 -phpcs --tab-width=4 --standard=PEAR --report=checkstyle gforge/common > $(BUILDDIR)/reports/checkstyle.xml
58 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
59 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
60 cd tests; phpunit --log-xml $(BUILDDIR)/reports/phpunit-selenium.xml TarCentos52Tests.php
61 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
64 gforge/plugins/mediawiki/mediawiki-skin/FusionForge.php:
65 $(MAKE) -C gforge/plugins/mediawiki/mediawiki-skin
67 %: gforge/plugins/mediawiki/mediawiki-skin/FusionForge.php
68 $(MAKE) -f Makefile.$(DIST) $@