X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/537561c5709c3f574c5d406cb4cb28b3522f2566..HEAD:/Makefile diff --git a/Makefile b/Makefile index 808da6b..4bfa3e5 100644 --- 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 | # +--------------------------------------------------------------------+ @@ -25,23 +25,41 @@ # $Id$ # -all: doc code +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 -doc: api +package: package.xml $(PHP_FILES) $(EXAMPLE_FILES) $(DOC_FILES) + pear package -api: Doxyfile src/*.php src/BIFE/*.php - doxygen +code: bife.xmi xmi2code.config + @xmi2code -code: doc/bife.xmi - xmi2code -a +code-clean: + @find -name '*.bak' | xargs rm -vf -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: - tar --exclude bife/doxygen.warn --exclude .svn --exclude .bak --exclude .swp --exclude 'bife/doc/api/*' -C .. -cvzf ../bife.tar.gz bife +$(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 '' \ + ) > $(MODULE_FILE)