X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=Makefile;h=6497d265413c650d0ffc7e2cb2ba7ba344aa7135;hb=d38df00e1a642351bf5db2eec61a86adf2052361;hp=31418c5bbb2ecd1365acf3ac3ffc10f7c097ca54;hpb=fee731e35ebcb570b2b98f488badfe54284d4cda;p=platal.git diff --git a/Makefile b/Makefile index 31418c5..6497d26 100644 --- a/Makefile +++ b/Makefile @@ -1,74 +1,31 @@ -# $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 - -bzdist: clean pkg-bzdist +build: include/version.inc.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' $< > $@ +q: + @echo -e "Code statistics\n" + @sloccount $(wildcard */) 2> /dev/null | egrep '^[a-z]*:' ################################################################################ -# 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 +# targets +%: %.in Makefile ChangeLog + sed -e 's,@VERSION@,$(VERSION),g' $< > $@ -################################################################################ -# diogenes package targets - -pkg-build: include/platal/globals.inc.php - -$(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) - -.PHONY: build dist clean pkg-build pkg-dist +include/version.inc.php: Makefile ChangeLog + echo '' > $@ +.PHONY: build dist clean q