diff options
author | Christian Schneider | 2006-10-26 13:35:12 +0000 |
---|---|---|
committer | Christian Schneider | 2006-10-26 13:35:12 +0000 |
commit | a5a19fd672bc0b8113d620669b557f17dccd343a (patch) | |
tree | 876ba4fec8362ac2e9374f61b9b7f67fcd2b8e59 /Makefile | |
download | itools-a5a19fd672bc0b8113d620669b557f17dccd343a.tar.gz itools-a5a19fd672bc0b8113d620669b557f17dccd343a.tar.bz2 itools-a5a19fd672bc0b8113d620669b557f17dccd343a.zip |
Moved itools to live branch
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1bdb140 --- /dev/null +++ b/Makefile @@ -0,0 +1,68 @@ +## +## $Id$ +## +## Makefile for itools.lib +## +## Copyright (C) 1995-2003 by the ITools Authors. +## This program is free software; you can redistribute it and/or +## modify it under the terms of either the GNU General Public License +## or the GNU Lesser General Public License as published by the Free +## Software Foundation. +## + +CPP= cpp -traditional +QUIETMAKE= $(MAKE) -s +PHPCOMPILE= /usr/local/bin/phpcompile + +MODULE= itools +SUBDIRS= banner darwin license sms urlcache +CLASSES= support.pinc it.class browser.class db.class db_record.class db_table.class dbi.class debug.class html.class html_form.class html_page.class itjs.class mail.class fax.class session.class text.class url.class user.class xml.class + +# +# Library creation rules, do not change stuff below... +# +SLIB= $(MODULE).slib +LIB= $(MODULE)-compiled.lib +DEVEL= $(MODULE)-devel.lib + +all: + @echo Nothing to do. You may want to make $(MODULE)-compiled.lib + +all2: $(LIB) $(DEVEL) $(SUBDIRS) + +$(LIB): $(SLIB) Makefile + @if [ -x $(PHPCOMPILE) ]; then (echo Compiling $(SLIB) to $(LIB) ...) 1>&2; cat $(SLIB) license/license.slib | $(PHPCOMPILE) >$(LIB); else (echo $(PHPCOMPILE) not found, copying $(SLIB) to $(LIB) ...) 1>&2; cp $(SLIB) $(LIB); fi + +$(SLIB): $(CLASSES) DUMMY + @(echo Creating $(SLIB) from $(SUBDIRS) $(CLASSES) ...) 1>&2 + @echo -e "<?php\nrequire_once('itools/config.class');" >$(SLIB) + @(for class in DUMMY $(CLASSES); do test -f $$class && cat $$class; done) | $(CPP) -P -undef | perl -ne 's/^\s+//g; print unless /^\s*$$/' | grep -v "^<?php" | grep -v "^?>" >>$(SLIB) + @echo "?>" >>$(SLIB) + +$(DEVEL): $(CLASSES) Makefile + @echo "<?php" >$(DEVEL) + @(for class in $(CLASSES); do test -f $$class && echo "require_once('itools/$$class');"; done) >>$(DEVEL) + @echo "?>" >>$(DEVEL) + +## Rule to merge all of SLIB and SUBDIRS/SLIBS into one big SLIB +#$(SLIB): $(CLASSES) DUMMY +# @(echo Creating $(SLIB) from $(SUBDIRS) $(CLASSES) ...) 1>&2 +# @echo "<?php" >$(SLIB) +# @(for dir in DUMMY $(SUBDIRS); do (test -d $$dir && cd $$dir && $(QUIETMAKE) cat); done; for class in DUMMY $(CLASSES); do test -f $$class && cat $$class; done) | $(CPP) -P -undef | perl -ne 's/^\s+//g; print unless /^\s*$$/' | grep -v "^<?php" | grep -v "^?>" >>$(SLIB) +# @echo "?>" >>$(SLIB) + +$(SUBDIRS):: + @(cd $@; $(QUIETMAKE)) + +DUMMY: + +cat: $(SLIB) + @cat $(SLIB) + +clean: + @(echo Cleaning $(SLIB) $(LIB) ...) 1>&2 + @rm -f $(SLIB) $(LIB) $(DEVEL) + @for dir in DUMMY $(SUBDIRS); do (test -d $$dir && cd $$dir && $(QUIETMAKE) $@) || :; done + +delsource: + @rm -rf *.slib license.lib $(DEVEL) $(CLASSES) $(SUBDIRS) |