X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=818598aaf9a74e3abb3eb3f976f80162091eff66;hb=fa25dc0b9d2d751562d60216467a298066141d16;hp=dfdbb8989c80490b335b727bb37c41bcd85817f9;hpb=9380b1bfd1372ab70883622380d73a784df12f11;p=platal.git diff --git a/Makefile b/Makefile index dfdbb89..818598a 100644 --- a/Makefile +++ b/Makefile @@ -1,99 +1,37 @@ -# $Id: Makefile,v 1.5 2004/11/25 20:18:39 x99laine Exp $ ################################################################################ # definitions -VERSION := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/\t.*//;s/ .*//") - -PKG_NAME = platal -PKG_DIST = $(PKG_NAME)-$(VERSION) -PKG_FILES = AUTHORS ChangeLog COPYING README Makefile -PKG_DIRS = configs htdocs include install.d plugins po scripts templates upgrade - -VCS_FILTER = ! -name .arch-ids ! -name CVS +VERSNUM := $(shell grep VERSION ChangeLog | head -1 | sed -e "s/VERSION //;s/ .*//") +VERSTAG := $(shell grep VERSION ChangeLog | head -1 | grep 'XX' > /dev/null 2> /dev/null && echo 'beta') +VERSION = $(VERSNUM)$(VERSTAG) ################################################################################ # global targets all: build -build: core banana wiki - -%: %.in Makefile - sed -e 's,@VERSION@,$(VERSION),g' $< > $@ - -################################################################################ -# targets - -## -## core -## - -core: spool/templates_c include/platal/globals.inc.php - -spool/templates_c spool/uploads: - mkdir -p $@ - chmod o+w $@ - - -## -## wiki -## - -WIKI_NEEDS = \ - wiki/local/farmconfig.php \ - wiki/pub/skins/empty \ - wiki/cookbook/e-protect.php \ - spool/wiki.d \ - htdocs/uploads \ - htdocs/wiki \ - -wiki: get-wiki build-wiki +build: include/version.inc.php -build-wiki: $(WIKI_NEEDS) | get-wiki +test: + phpunit pltestsuite classes/pltestsuite.php -htdocs/uploads: spool/uploads - cd htdocs && ln -sf ../spool/uploads +clean: + -rm include/version.inc.php -htdocs/wiki: - cd htdocs && ln -sf ../wiki/pub wiki +q: + @echo -e "Code statistics\n" + @sloccount $(wildcard */) 2> /dev/null | egrep '^[a-z]*:' - -spool/wiki.d: - mkdir -p $@ - chmod o+w $@ - cd $@ && ln -sf ../../install.d/wiki/wiki.d/* . - - -wiki/cookbook/e-protect.php: - cd wiki/cookbook && ln -sf ../../install.d/wiki/e-protect.php - -wiki/local/farmconfig.php: - cd wiki/local/ && ln -sf ../../plugins/pmwiki.config.php farmconfig.php - -wiki/pub/skins/empty: - cd wiki/pub/skins/ && ln -sf ../../../install.d/wiki/empty - - -get-wiki: - @if ! test -d wiki; then \ - wget http://www.pmwiki.org/pub/pmwiki/pmwiki-latest.tgz; \ - tar -xzvf pmwiki-latest.tgz; \ - rm pmwiki-latest.tgz; \ - mv pmwiki-* wiki; \ - fi - -## -## banana -## - -banana: htdocs/images/banana htdocs/css/banana.css -htdocs/images/banana: - cd $(@D) && ln -sf /usr/share/banana/img $(@F) - -htdocs/css/banana.css: - cd $(@D) && ln -sf /usr/share/banana/css/style.css $(@F) +doc: + @doxygen doc/doxygen.cfg ################################################################################ +# targets + +%: %.in Makefile ChangeLog + sed -e 's,@VERSION@,$(VERSION),g' $< > $@ -.PHONY: build dist clean wiki build-wiki banana +include/version.inc.php: Makefile ChangeLog + echo '' > $@ +.PHONY: build dist clean q test doc