]> git.llucax.com Git - software/bife/bife-all.git/blob - core/core/Makefile
ed9979c2564d83417c91b7a3c2444a316ac811b4
[software/bife/bife-all.git] / core / core / 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 MODULE_FILE=BIFE.php
30 MODULE_NAME=Core
31 PHP_FILES=$(filter-out $(MODULE_FILE),$(subst ./,,$(shell find -name '*.php')))
32 X2C_TEMPLATE=../xmi2code.tpl.php
33
34 all: $(MODULE_FILE)
35
36 code: bife.xmi xmi2code.config
37         @xmi2code
38
39 code-clean:
40         @find -name '*.bak' | xargs rm -vf
41
42 $(MODULE_FILE): code $(PHP_FILES) $(X2C_TEMPLATE)
43         @( \
44                 ( \
45                         cat $(X2C_TEMPLATE) | \
46                         grep -v '@@date' | \
47                         grep -v '$$Id' | \
48                         egrep -v '^//$$' \
49                 ); \
50                 echo '//'; \
51                 echo -n '// BIFE $(MODULE_NAME) (version $(VERSION)) - '; \
52                 date; \
53                 echo '//'; \
54                 ( \
55                         cat $(PHP_FILES) | \
56                         grep -v require_once | \
57                         grep -v '?>' | \
58                         grep -v '<?php' | \
59                         egrep -v '^\s*//' \
60                 ); \
61                 echo -n '?>' \
62         ) > $(MODULE_FILE)