Add missing support for -outdir for -tcl -itcl and -modula3

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13906 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-18 00:46:07 +00:00
commit 138af71cfd
3 changed files with 11 additions and 8 deletions

View file

@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.9 (in progress) Version 2.0.9 (in progress)
=========================== ===========================
2012-11-17: wsfulton
[Tcl, Modula3] Add missing support for -outdir.
2012-11-17: wsfulton 2012-11-17: wsfulton
Fix segfaults when using filename paths greater than 1024 characters in length. Fix segfaults when using filename paths greater than 1024 characters in length.

View file

@ -991,7 +991,7 @@ MODULA3():
// Generate m3makefile // Generate m3makefile
// This will be unnecessary if SWIG is invoked from Quake. // This will be unnecessary if SWIG is invoked from Quake.
{ {
File *file = openWriteFile(NewStringf("%sm3makefile", Swig_file_dirname(outfile))); File *file = openWriteFile(NewStringf("%sm3makefile", SWIG_output_directory()));
Printf(file, "%% automatically generated quake file for %s\n\n", name); Printf(file, "%% automatically generated quake file for %s\n\n", name);
@ -1014,7 +1014,7 @@ MODULA3():
// Generate the raw interface // Generate the raw interface
{ {
File *file = openWriteFile(NewStringf("%s%s.i3", Swig_file_dirname(outfile), m3raw_name)); File *file = openWriteFile(NewStringf("%s%s.i3", SWIG_output_directory(), m3raw_name));
emitBanner(file); emitBanner(file);
@ -1032,7 +1032,7 @@ MODULA3():
// Generate the raw module // Generate the raw module
{ {
File *file = openWriteFile(NewStringf("%s%s.m3", Swig_file_dirname(outfile), m3raw_name)); File *file = openWriteFile(NewStringf("%s%s.m3", SWIG_output_directory(), m3raw_name));
emitBanner(file); emitBanner(file);
@ -1050,7 +1050,7 @@ MODULA3():
// Generate the interface for the comfort wrappers // Generate the interface for the comfort wrappers
{ {
File *file = openWriteFile(NewStringf("%s%s.i3", Swig_file_dirname(outfile), m3wrap_name)); File *file = openWriteFile(NewStringf("%s%s.i3", SWIG_output_directory(), m3wrap_name));
emitBanner(file); emitBanner(file);
@ -1080,7 +1080,7 @@ MODULA3():
// Generate the wrapper routines implemented in Modula 3 // Generate the wrapper routines implemented in Modula 3
{ {
File *file = openWriteFile(NewStringf("%s%s.m3", Swig_file_dirname(outfile), m3wrap_name)); File *file = openWriteFile(NewStringf("%s%s.m3", SWIG_output_directory(), m3wrap_name));
emitBanner(file); emitBanner(file);
@ -2387,7 +2387,7 @@ MODULA3():
SWIG_exit(EXIT_FAILURE); SWIG_exit(EXIT_FAILURE);
} }
String *filen = NewStringf("%s%s.m3", Swig_file_dirname(outfile), proxy_class_name); String *filen = NewStringf("%s%s.m3", SWIG_output_directory(), proxy_class_name);
f_proxy = NewFile(filen, "w", SWIG_output_files()); f_proxy = NewFile(filen, "w", SWIG_output_files());
if (!f_proxy) { if (!f_proxy) {
FileErrorDisplay(filen); FileErrorDisplay(filen);
@ -3780,7 +3780,7 @@ MODULA3():
Setfile(n, input_file); Setfile(n, input_file);
Setline(n, line_number); Setline(n, line_number);
String *filen = NewStringf("%s%s.m3", Swig_file_dirname(outfile), classname); String *filen = NewStringf("%s%s.m3", SWIG_output_directory(), classname);
File *f_swigtype = NewFile(filen, "w", SWIG_output_files()); File *f_swigtype = NewFile(filen, "w", SWIG_output_files());
if (!f_swigtype) { if (!f_swigtype) {
FileErrorDisplay(filen); FileErrorDisplay(filen);

View file

@ -185,7 +185,7 @@ public:
/* If shadow classing is enabled, we're going to change the module name to "_module" */ /* If shadow classing is enabled, we're going to change the module name to "_module" */
if (itcl) { if (itcl) {
String *filen; String *filen;
filen = NewStringf("%s%s.itcl", Swig_file_dirname(outfile), module); filen = NewStringf("%s%s.itcl", SWIG_output_directory(), module);
Insert(module, 0, "_"); Insert(module, 0, "_");