]> git.llucax.com Git - software/bife/bife.git/blob - Makefile
Last general corrections for start releasing the modules.
[software/bife/bife.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.11
29 MODULE_FILE=BIFE.php
30 MODULE_NAME=Core
31 PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find src -name '*.php')))
32 EXAMPLE_FILES=$(subst ./,,$(shell find examples -regex '.*\.svn.*'))
33 DOC_FILES=README ROADMAP
34 X2C_TEMPLATE=xmi2code.tpl.php
35
36 package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES)
37         pear package
38
39 code: bife.xmi xmi2code.config
40         @xmi2code
41
42 code-clean:
43         @find src -name '*.bak' | xargs rm -vf
44
45 $(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
46         @( \
47                 ( \
48                         cat $(X2C_TEMPLATE) | \
49                         grep -v '@@date' | \
50                         grep -v '$$Id' | \
51                         egrep -v '^//$$' \
52                 ); \
53                 echo '//'; \
54                 echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
55                 date; \
56                 echo '//'; \
57                 ( \
58                         cat $(PHP_FILES) | \
59                         grep -v require_once | \
60                         grep -v '?>' | \
61                         grep -v '<?php' | \
62                         egrep -v '^\s*//' \
63                 ); \
64                 echo -n '?>' \
65         ) > $(MODULE_FILE)