]> git.llucax.com Git - software/bife/bife-all.git/blobdiff - Makefile
Updated ROADMAP.
[software/bife/bife-all.git] / Makefile
index 407e37900a4c232ac71890b81c4713da4d0714e3..4bfa3e552d30b0eee7c5afbd6061ec140b0e616b 100644 (file)
--- a/Makefile
+++ b/Makefile
 # $Id$
 #
 
-VERSION=0.10
-PHP_FILES=src/BIFE/*.php
-META_FILES=xmi2code.config xmi2code.tpl.php Makefile Doxyfile package.xml
-DOC_FILES=doc/bife.xmi
-APIDOC_FILES=doc/api/* doc/api/*/*
+VERSION=0.11
+MODULE_FILE=BIFE.php
+MODULE_NAME=Core
+PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php')))
+EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*'))
+DOC_FILES=README ROADMAP
+X2C_TEMPLATE=xmi2code.tpl.php
 
-code: doc/bife.xmi xmi2code.config
-       xmi2code -a
-
-all: code doc pear-packages tarball
-
-doc: api
-
-api: Doxyfile $(PHP_FILES)
-       doxygen
-
-clean-code:
-       find src/ -name '*.bak' | xargs rm -vf
-
-clean-doc:
-       rm -fvR doc/api/html doc/api/rtf doc/api/latex
-
-clean: clean-doc clean-backup
-
-tarball: bife.tar.gz
+package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES)
+       pear package
 
-bife.tar.gz: $(PHP_FILES) $(DOC_FILES) $(META_FILES)
-       tar --exclude bife.tar.gz --exclude bife/doxygen.warn --exclude .svn --exclude '*.bak' --exclude '*.swp' --exclude 'bife/doc/api/*' -C .. -cvzf bife.tar.gz bife
+code: bife.xmi xmi2code.config
+       @xmi2code
 
-pear-packages: BIFE-$(VERSION).tgz
+code-clean:
+       @find -name '*.bak' | xargs rm -vf
 
-BIFE-$(VERSION).tgz: $(PHP_FILES) $(DOC_FILES) package.xml
-       pear package
+$(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
+       @( \
+               ( \
+                       cat $(X2C_TEMPLATE) | \
+                       grep -v '@@date' | \
+                       grep -v '$$Id' | \
+                       egrep -v '^//$$' \
+               ); \
+               echo '//'; \
+               echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
+               date; \
+               echo '//'; \
+               ( \
+                       cat $(PHP_FILES) | \
+                       grep -v require_once | \
+                       grep -v '?>' | \
+                       grep -v '<?php' | \
+                       egrep -v '^\s*//' \
+               ); \
+               echo -n '?>' \
+       ) > $(MODULE_FILE)