summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2007-01-11 19:21:53 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2007-01-11 19:21:53 +0000
commitcbf18a70c01f12ae47059c3de20dc5dc4a0922a6 (patch)
tree30a60bb412d533655e7ce303cd4921576528638f
parent32b14723c227c57729ec55f30a58918c28996f62 (diff)
downloadMPC-cbf18a70c01f12ae47059c3de20dc5dc4a0922a6.tar.gz
ChangeLogTag: Thu Jan 11 19:19:55 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog18
-rw-r--r--config/swig_php.mpb19
-rw-r--r--config/swig_python.mpb20
-rw-r--r--config/swig_ruby.mpb19
-rw-r--r--config/swig_tcl.mpb15
-rwxr-xr-xgenerate_export_header.pl2
-rw-r--r--modules/ProjectCreator.pm31
7 files changed, 113 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 635caf35..74ef53b7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+Thu Jan 11 19:19:55 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
+
+ * config/swig_php.mpb:
+ * config/swig_python.mpb:
+ * config/swig_ruby.mpb:
+ * config/swig_tcl.mpb:
+
+ Added SWIG base projects for php, python, ruby, and tcl.
+
+ * generate_export_header.pl:
+
+ Simplified code to determine the output file name.
+
+ * modules/ProjectCreator.pm:
+
+ Fixed a bug where when the -ti option is used within a workspace,
+ subsequent uses of -ti are ignored.
+
Mon Jan 8 13:39:23 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
* modules/AutomakeWorkspaceCreator.pm:
diff --git a/config/swig_php.mpb b/config/swig_php.mpb
new file mode 100644
index 00000000..1d121330
--- /dev/null
+++ b/config/swig_php.mpb
@@ -0,0 +1,19 @@
+// -*- MPC -*-
+// $Id$
+
+project {
+ Define_Custom(SWIG) {
+ automatic = 1
+ command = swig
+ commandflags = -php -c++
+ inputext = .swg, .swig, .i
+ source_outputext = _wrap.cpp
+ header_pre_filename = php_
+ header_outputext = .h
+ generic_outputext = .php
+ }
+ requires += swig_php
+ includes += $(PHP_INCLUDE) $(PHP_INCLUDE)/main $(PHP_INCLUDE)/Zend \
+ $(PHP_INCLUDE)/TSRM
+ libpaths += $(PHP_LIBPATH)/.
+}
diff --git a/config/swig_python.mpb b/config/swig_python.mpb
new file mode 100644
index 00000000..3b7b2493
--- /dev/null
+++ b/config/swig_python.mpb
@@ -0,0 +1,20 @@
+// -*- MPC -*-
+// $Id$
+
+project {
+ Define_Custom(SWIG) {
+ automatic = 1
+ command = swig
+ commandflags = -python -c++
+ inputext = .swg, .swig, .i
+ source_outputext = _wrap.cxx
+ generic_outputext = .py
+ }
+ requires += swig_python
+ includes += $(PYTHON_INCLUDE)/.
+ libpaths += $(PYTHON_LIBPATH)/.
+
+ specific {
+ lib_prefix =
+ }
+}
diff --git a/config/swig_ruby.mpb b/config/swig_ruby.mpb
new file mode 100644
index 00000000..868eeac2
--- /dev/null
+++ b/config/swig_ruby.mpb
@@ -0,0 +1,19 @@
+// -*- MPC -*-
+// $Id$
+
+project {
+ Define_Custom(SWIG) {
+ automatic = 1
+ command = swig
+ commandflags = -ruby -c++
+ inputext = .swg, .swig, .i
+ source_outputext = _wrap.cxx
+ }
+ requires += swig_ruby
+ includes += $(RUBY_INCLUDE)/.
+ libpaths += $(RUBY_LIBPATH)/.
+
+ specific {
+ lib_prefix =
+ }
+}
diff --git a/config/swig_tcl.mpb b/config/swig_tcl.mpb
new file mode 100644
index 00000000..020564e5
--- /dev/null
+++ b/config/swig_tcl.mpb
@@ -0,0 +1,15 @@
+// -*- MPC -*-
+// $Id$
+
+project {
+ Define_Custom(SWIG) {
+ automatic = 1
+ command = swig
+ commandflags = -tcl -c++
+ inputext = .swg, .swig, .i
+ source_outputext = _wrap.cxx
+ }
+ requires += swig_tcl
+ includes += $(TCL_INCLUDE)/.
+ libpaths += $(TCL_LIBPATH)/.
+}
diff --git a/generate_export_header.pl b/generate_export_header.pl
index e0fb1248..9c331112 100755
--- a/generate_export_header.pl
+++ b/generate_export_header.pl
@@ -112,7 +112,7 @@ elsif (index($name, '-') == 0) {
}
if (!defined $output) {
- $output = $name . '_' . (substr($name, 0, 1) =~ /[A-Z]/ ? 'E' : 'e') .
+ $output = $name . '_' . ($name =~ /^[A-Z]/ ? 'E' : 'e') .
'xport.h';
}
diff --git a/modules/ProjectCreator.pm b/modules/ProjectCreator.pm
index 2d9699da..83a8362a 100644
--- a/modules/ProjectCreator.pm
+++ b/modules/ProjectCreator.pm
@@ -274,8 +274,8 @@ sub new {
$self->{'project_info'} = [];
$self->{'lib_locations'} = {};
$self->{'reading_parent'} = [];
- $self->{'dexe_template_input'} = {};
- $self->{'lexe_template_input'} = {};
+ $self->{'dll_exe_template_input'}= {};
+ $self->{'lib_exe_template_input'}= {};
$self->{'lib_template_input'} = {};
$self->{'dll_template_input'} = {};
$self->{'flag_overrides'} = {};
@@ -1740,7 +1740,7 @@ sub read_template_input {
if ($self->exe_target()) {
if ($self->get_static() == 1) {
- $tag = 'lexe_template_input';
+ $tag = 'lib_exe_template_input';
if (!defined $self->{$tag}->{$lang}) {
if (defined $$ti{'lib_exe'}) {
$file = $$ti{'lib_exe'};
@@ -1752,7 +1752,7 @@ sub read_template_input {
}
}
else {
- $tag = 'dexe_template_input';
+ $tag = 'dll_exe_template_input';
if (!defined $self->{$tag}->{$lang}) {
if (defined $$ti{'dll_exe'}) {
$file = $$ti{'dll_exe'};
@@ -1792,15 +1792,15 @@ sub read_template_input {
}
if (defined $file) {
- my($file) = $self->search_include_path("$file.$TemplateInputExtension");
- if (defined $file) {
+ my($tfile) = $self->search_include_path("$file.$TemplateInputExtension");
+ if (defined $tfile) {
$self->{$tag}->{$lang} = new TemplateInputReader($self->get_include_path());
- ($status, $errorString) = $self->{$tag}->{$lang}->read_file($file);
+ ($status, $errorString) = $self->{$tag}->{$lang}->read_file($tfile);
}
else {
if ($override) {
$status = 0;
- $errorString = 'Unable to locate template input file.';
+ $errorString = "Unable to locate template input file: $file";
}
}
}
@@ -4274,10 +4274,10 @@ sub get_template_input {
## checking for exe target and then defaulting to a lib target
if ($self->exe_target()) {
if ($self->get_static() == 1) {
- return $self->{'lexe_template_input'}->{$lang};
+ return $self->{'lib_exe_template_input'}->{$lang};
}
else {
- return $self->{'dexe_template_input'}->{$lang};
+ return $self->{'dll_exe_template_input'}->{$lang};
}
}
@@ -4664,6 +4664,17 @@ sub restore_state_helper {
$self->get_features(), $new);
}
}
+ elsif ($skey eq 'ti') {
+ my($lang) = $self->get_language();
+ my(@keys) = keys %$old;
+ @keys = keys %$new if (!defined $keys[0]);
+ foreach my $key (@keys) {
+ if (!defined $$old{$key} || !defined $$new{$key} ||
+ $$old{$key} ne $$new{$key}) {
+ $self->{$key . '_template_input'}->{$lang} = undef;
+ }
+ }
+ }
}