]> git.llucax.com Git - software/bife/bife-all.git/blobdiff - Makefile
WARNING: This is a broken revision!!!
[software/bife/bife-all.git] / Makefile
index f9c68d3624e941e1ce7f1c9a0b52e0e7d94bc930..2cf53b30ce5931235ed0013d681b7f0540f7c3df 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
+# vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4:
 # +--------------------------------------------------------------------+
 # |                       BIFE - Buil It FastEr                        |
 # +--------------------------------------------------------------------+
 # +--------------------------------------------------------------------+
 # |                       BIFE - Buil It FastEr                        |
 # +--------------------------------------------------------------------+
 # $Id$
 #
 
 # $Id$
 #
 
-all: doc code
+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/*/*
+CORE_FILES=src/BIFE/Widget.php src/BIFE/Container.php src/BIFE/Root.php src/BIFE/Fallback.php src/BIFE/Parser.php
+X2C_TEMPLATE=xmi2code.tpl.php
+
+code: doc/bife.xmi xmi2code.config
+       xmi2code -a
+
+all: code doc pear-packages tarball
 
 doc: api
 
 
 doc: api
 
-api: Doxyfile src/*.php src/BIFE/*.php
+api: Doxyfile $(PHP_FILES)
        doxygen
 
        doxygen
 
-code: doc/bife.xmi
-       xmi2code -a
-
 clean-code:
        find src/ -name '*.bak' | xargs rm -vf
 
 clean-code:
        find src/ -name '*.bak' | xargs rm -vf
 
@@ -42,3 +50,35 @@ clean-doc:
        rm -fvR doc/api/html doc/api/rtf doc/api/latex
 
 clean: clean-doc clean-backup
        rm -fvR doc/api/html doc/api/rtf doc/api/latex
 
 clean: clean-doc clean-backup
+
+tarball: bife.tar.gz
+
+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
+
+pear-packages: BIFE-$(VERSION).tgz
+
+BIFE-$(VERSION).tgz: $(PHP_FILES) $(DOC_FILES) package.xml
+       pear package
+
+build/BIFE.php: $(CORE_FILES) $(X2C_TEMPLATE)
+       @( \
+               ( \
+                       cat $(X2C_TEMPLATE) | \
+                       grep -v '@@date' | \
+                       grep -v '$$Id' | \
+                       egrep -v '^//$$' \
+               ); \
+               echo '//'; \
+               echo -n '// BIFE Core Version $(VERSION) - '; \
+               date; \
+               echo '//'; \
+               ( \
+                       cat $(CORE_FILES) | \
+                       grep -v require_once | \
+                       grep -v '?>' | \
+                       grep -v '<?php' | \
+                       egrep -v '^\s*//' \
+               ); \
+               echo -n '?>' \
+       ) > build/BIFE.php