]> git.llucax.com Git - software/bife/bife-all.git/blob - Makefile
2cf53b30ce5931235ed0013d681b7f0540f7c3df
[software/bife/bife-all.git] / Makefile
1 # vim: set noexpandtab tabstop=4 softtabstop=4 shiftwidth=4:
2 # +--------------------------------------------------------------------+
3 # |                       BIFE - Buil It FastEr                        |
4 # +--------------------------------------------------------------------+
5 # | This file is part of BIFE.                                         |
6 # |                                                                    |
7 # | BIFE is free software; you can redistribute it and/or modify it    |
8 # | under the terms of the GNU General Public License as published by  |
9 # | the Free Software Foundation; either version 2 of the License, or  |
10 # | (at your option) any later version.                                |
11 # |                                                                    |
12 # | BIFE is distributed in the hope that it will be useful, but        |
13 # | WITHOUT ANY WARRANTY; without even the implied warranty of         |
14 # | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   |
15 # | General Public License for more details.                           |
16 # |                                                                    |
17 # | You should have received a copy of the GNU General Public License  |
18 # | along with Hooks; if not, write to the Free Software Foundation,   |
19 # | Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA      |
20 # +--------------------------------------------------------------------+
21 # | Created: Mon May 19 00:16:56 ART 2003                              |
22 # | Authors: Leandro Lucarella <luca@lugmen.org.ar>                    |
23 # +--------------------------------------------------------------------+
24 #
25 # $Id$
26 #
27
28 VERSION=0.10
29 PHP_FILES=src/BIFE/*.php
30 META_FILES=xmi2code.config xmi2code.tpl.php Makefile Doxyfile package.xml
31 DOC_FILES=doc/bife.xmi
32 APIDOC_FILES=doc/api/* doc/api/*/*
33 CORE_FILES=src/BIFE/Widget.php src/BIFE/Container.php src/BIFE/Root.php src/BIFE/Fallback.php src/BIFE/Parser.php
34 X2C_TEMPLATE=xmi2code.tpl.php
35
36 code: doc/bife.xmi xmi2code.config
37         xmi2code -a
38
39 all: code doc pear-packages tarball
40
41 doc: api
42
43 api: Doxyfile $(PHP_FILES)
44         doxygen
45
46 clean-code:
47         find src/ -name '*.bak' | xargs rm -vf
48
49 clean-doc:
50         rm -fvR doc/api/html doc/api/rtf doc/api/latex
51
52 clean: clean-doc clean-backup
53
54 tarball: bife.tar.gz
55
56 bife.tar.gz: $(PHP_FILES) $(DOC_FILES) $(META_FILES)
57         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
58
59 pear-packages: BIFE-$(VERSION).tgz
60
61 BIFE-$(VERSION).tgz: $(PHP_FILES) $(DOC_FILES) package.xml
62         pear package
63
64 build/BIFE.php: $(CORE_FILES) $(X2C_TEMPLATE)
65         @( \
66                 ( \
67                         cat $(X2C_TEMPLATE) | \
68                         grep -v '@@date' | \
69                         grep -v '$$Id' | \
70                         egrep -v '^//$$' \
71                 ); \
72                 echo '//'; \
73                 echo -n '// BIFE Core Version $(VERSION) - '; \
74                 date; \
75                 echo '//'; \
76                 ( \
77                         cat $(CORE_FILES) | \
78                         grep -v require_once | \
79                         grep -v '?>' | \
80                         grep -v '<?php' | \
81                         egrep -v '^\s*//' \
82                 ); \
83                 echo -n '?>' \
84         ) > build/BIFE.php