From: <sg...@us...> - 2007-10-21 01:11:35
|
Revision: 102 http://toc.svn.sourceforge.net/toc/?rev=102&view=rev Author: sgbeal Date: 2007-10-20 18:11:39 -0700 (Sat, 20 Oct 2007) Log Message: ----------- egg Added Paths: ----------- trunk/toc2/make/makerules.swig-php5-cpp trunk/toc2/make/makerules.swig-python-cpp Added: trunk/toc2/make/makerules.swig-php5-cpp =================================================================== --- trunk/toc2/make/makerules.swig-php5-cpp (rev 0) +++ trunk/toc2/make/makerules.swig-php5-cpp 2007-10-21 01:11:39 UTC (rev 102) @@ -0,0 +1,72 @@ +#!/bin/sh +# creates some makefile code for SWIG PHP5 modules. + +test -z "$1" && { + echo "usage: $0 module1 [module2 ... moduleN]" + exit 1 +} +cat <<EOF +######################################################################## +# Auto-generated by $0 +# $(date) +$0: + +ifeq (,\$(toc2.bins.swig)) + toc2.bins.swig := \$(call toc2.call.find-program,swig) + \$(if \$(toc2.bins.swig),,\$(error 'swig' not found in PATH)) +endif + +ifeq (,\$(toc2.bins.php-config5)) + toc2.bins.php-config5 := \$(call toc2.call.find-program,php-config5) + \$(if \$(toc2.bins.php-config5),,\$(error It seems that php-config5 was not found!)) +endif +toc2.bins.php5-config.includes := \$(shell \$(toc2.bins.php-config5) --includes) + +ifeq (,\$(toc2.makefile.c)) + include \$(toc2.dirs.makefiles)/toc2-c.make +endif + +swig-modules: +EOF + +for t in $@; do + cat <<EOF +######################################################################## +# Start auto-generated rules for SWIG PHP5 module ${t}... + +${t}.SWIG.PHP5-CPP.INTERFACE := ${t}.i +${t}.SWIG.PHP5-CPP.FLAGS := -php5 -c++ -module ${t} +${t}.SWIG.PHP5-CPP.WRAP.cpp := ${t}_wrap.cpp +${t}.SWIG.PHP5-CPP.WRAP.o := ${t}_wrap.o +${t}.SWIG.PHP5-CPP.OBJECTS += \$(${t}.SWIG.PHP5-CPP.WRAP.o) +${t}.SWIG.PHP5-CPP.WRAP.h := php_${t}.h +${t}.SWIG.PHP5-CPP.WRAP.php := ${t}.php + +\$(${t}.SWIG.PHP5-CPP.WRAP.o): CPPFLAGS:=\$(toc2.bins.php5-config.includes) + + +\$(${t}.SWIG.PHP5-CPP.WRAP.cpp): \$(${t}.SWIG.PHP5-CPP.INTERFACE) $0 \$(toc2.files.makefile) +ifeq (0,\$(toc2.flags.making_clean)) + \$(toc2.bins.swig) \$(${t}.SWIG.PHP5-CPP.FLAGS) \$(${t}.SWIG.PHP5-CPP.INTERFACE) +else + @echo "clean: skipping generation of SWIG module '${t}'." +endif +# ^^^^ toc2.flags.making_clean + + +${t}.DLL.OBJECTS += \$(${t}.SWIG.PHP5-CPP.OBJECTS) +\$(call toc2.call.rules.c-dll,${t}) + +swig-modules: \$(${t}.DLL) + + +${t}.SWIG.PHP5-CPP.clean_files := \$(${t}.SWIG.PHP5-CPP.WRAP.cpp) \ + \$(${t}.SWIG.PHP5-CPP.WRAP.o) \ + \$(${t}.SWIG.PHP5-CPP.WRAP.h) \ + \$(${t}.SWIG.PHP5-CPP.WRAP.php) + +\$(call toc2.call.define-cleanup-set,${t}.SWIG.PHP5-CPP) +# end auto-generated rules for SWIG PHP5 module ${t} +######################################################################## +EOF +done Property changes on: trunk/toc2/make/makerules.swig-php5-cpp ___________________________________________________________________ Name: svn:executable + * Added: trunk/toc2/make/makerules.swig-python-cpp =================================================================== --- trunk/toc2/make/makerules.swig-python-cpp (rev 0) +++ trunk/toc2/make/makerules.swig-python-cpp 2007-10-21 01:11:39 UTC (rev 102) @@ -0,0 +1,70 @@ +#!/bin/sh +# creates some makefile code for SWIG PYTHON modules. + +test -z "$1" && { + echo "usage: $0 module1 [module2 ... moduleN]" + exit 1 +} +cat <<EOF +######################################################################## +# Auto-generated by $0 +# $(date) +$0: + +ifeq (,\$(toc2.bins.swig)) + toc2.bins.swig := \$(call toc2.call.find-program,swig) + \$(if \$(toc2.bins.swig),,\$(error 'swig' not found in PATH)) +endif + +ifeq (,\$(toc2.bins.python-config)) + toc2.bins.python-config := \$(call toc2.call.find-program,python-config) + \$(if \$(toc2.bins.python-config),,\$(error It seems that python-config was not found!)) +endif +toc2.bins.python-config.includes := \$(shell \$(toc2.bins.python-config) --includes) + +ifeq (,\$(toc2.makefile.c)) + include \$(toc2.dirs.makefiles)/toc2-c.make +endif + +swig-modules: +EOF + +for t in $@; do + pyt=_${t} + cat <<EOF +######################################################################## +# Start auto-generated rules for SWIG PYTHON module ${t}... + +${t}.SWIG.PYTHON-CPP.INTERFACE := ${t}.i +${t}.SWIG.PYTHON-CPP.WRAP.cxx := ${pyt}_wrap.cxx +${t}.SWIG.PYTHON-CPP.FLAGS := -python -c++ -module ${t} -o \$(${t}.SWIG.PYTHON-CPP.WRAP.cxx) +${t}.SWIG.PYTHON-CPP.WRAP.o := ${pyt}_wrap.o +${t}.SWIG.PYTHON-CPP.OBJECTS += \$(${t}.SWIG.PYTHON-CPP.WRAP.o) +${t}.SWIG.PYTHON-CPP.WRAP.py := ${t}.py + +\$(${t}.SWIG.PYTHON-CPP.WRAP.o): CPPFLAGS:=\$(toc2.bins.python-config.includes) + +\$(${t}.SWIG.PYTHON-CPP.WRAP.cxx): \$(${t}.SWIG.PYTHON-CPP.INTERFACE) $0 \$(toc2.files.makefile) +ifeq (0,\$(toc2.flags.making_clean)) + \$(toc2.bins.swig) \$(${t}.SWIG.PYTHON-CPP.FLAGS) \$(${t}.SWIG.PYTHON-CPP.INTERFACE) +else + @echo "clean: skipping generation of SWIG PYTHON module '${t}'." +endif +# ^^^^ toc2.flags.making_clean + + +${pyt}.DLL.OBJECTS += \$(${t}.SWIG.PYTHON-CPP.OBJECTS) +\$(call toc2.call.rules.c-dll,${pyt}) + +swig-modules: \$(${pyt}.DLL) + + +${t}.SWIG.PYTHON-CPP.clean_files := \$(${t}.SWIG.PYTHON-CPP.WRAP.cxx) \ + \$(${t}.SWIG.PYTHON-CPP.WRAP.o) \ + \$(${t}.SWIG.PYTHON-CPP.WRAP.py) + +\$(call toc2.call.define-cleanup-set,${t}.SWIG.PYTHON-CPP) +# end auto-generated rules for SWIG PYTHON module ${t} +######################################################################## +EOF +done Property changes on: trunk/toc2/make/makerules.swig-python-cpp ___________________________________________________________________ Name: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |