Release plat/al core v1.1.13
[platal.git] / Makefile
index 31418c5..818598a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,74 +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.*//")
-
-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
 
-headers:
-       headache -c install.d/platal-dev/templates/header.conf -h install.d/platal-dev/templates/header \
-               `find templates -name '*.tpl' ! -path 'templates/xnet/skin.tpl' ! -path 'templates/skin/*.tpl' ! -name 'vcard.tpl' `
-
-build: pkg-build 
-
-dist: clean pkg-dist
+build: include/version.inc.php
 
-bzdist: clean pkg-bzdist
+test:
+       phpunit pltestsuite classes/pltestsuite.php
 
 clean:
-       rm -rf include/platal/globals.inc.php
-       rm -f htdocs/banana/banana.css htdocs/valid.html include/banana htdocs/banana/img
+       -rm include/version.inc.php
 
-%: %.in Makefile
-       sed -e 's,@VERSION@,$(VERSION),g' $< > $@
-
-################################################################################
-# devel targets
-templates_c:
-       mkdir templates_c
-       chmod o+w templates_c
-
-htdocs/valid.html:
-       touch templates_c/valid.html
-       ln -sf ../templates_c/valid.html htdocs/valid.html
-
-devel: build templates_c htdocs/valid.html
+q:
+       @echo -e "Code statistics\n"
+       @sloccount $(wildcard */) 2> /dev/null | egrep '^[a-z]*:'
 
+doc:
+       @doxygen doc/doxygen.cfg
 
 ################################################################################
-# diogenes package targets
-
-pkg-build: include/platal/globals.inc.php
+# targets
 
-$(PKG_DIST): pkg-build
-       mkdir $(PKG_DIST)
-       cp -a $(PKG_FILES) $(PKG_DIST)
-       for dir in `find $(PKG_DIRS) -type d $(VCS_FILTER)`; \
-       do \
-          mkdir -p $(PKG_DIST)/$$dir; \
-         find $$dir -type f -maxdepth 1 -exec cp {} $(PKG_DIST)/$$dir \; ; \
-       done
-
-pkg-dist: $(PKG_DIST)
-       rm -f $(PKG_DIST).tar.gz
-       tar czf $(PKG_DIST).tar.gz $(PKG_DIST)
-       rm -rf $(PKG_DIST)
-
-pkg-bzdist: $(PKG_DIST)
-       rm -f $(PKG_DIST).tar.bz2
-       tar cjf $(PKG_DIST).tar.bz2 $(PKG_DIST)
-       rm -rf $(PKG_DIST)
+%: %.in Makefile ChangeLog
+       sed -e 's,@VERSION@,$(VERSION),g' $< > $@
 
-.PHONY: build dist clean pkg-build pkg-dist
+include/version.inc.php: Makefile ChangeLog
+       echo '<?php define("PLATAL_CORE_VERSION", "${VERSION}"); ?>' > $@
 
+.PHONY: build dist clean q test doc