-outdir commandline option support => directory for proxy class and other language specific files
-help tidy up git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4981 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
edc0896b2b
commit
06ed231b7d
17 changed files with 150 additions and 115 deletions
|
|
@ -60,7 +60,6 @@ class CSHARP : public Language {
|
|||
String *upcasts_code; //C++ casts for inheritance hierarchies C++ code
|
||||
String *imclass_cppcasts_code; //C++ casts up inheritance hierarchies intermediary class code
|
||||
String *destructor_call; //C++ destructor call if any
|
||||
String *outfile;
|
||||
|
||||
enum type_additions {none, pointer, reference};
|
||||
|
||||
|
|
@ -109,8 +108,7 @@ class CSHARP : public Language {
|
|||
module_class_modifiers(NULL),
|
||||
upcasts_code(NULL),
|
||||
imclass_cppcasts_code(NULL),
|
||||
destructor_call(NULL),
|
||||
outfile(NULL)
|
||||
destructor_call(NULL)
|
||||
|
||||
{
|
||||
}
|
||||
|
|
@ -179,7 +177,7 @@ class CSHARP : public Language {
|
|||
virtual int top(Node *n) {
|
||||
|
||||
/* Initialize all of the output files */
|
||||
outfile = Getattr(n,"outfile");
|
||||
String *outfile = Getattr(n,"outfile");
|
||||
|
||||
f_runtime = NewFile(outfile,"w");
|
||||
if (!f_runtime) {
|
||||
|
|
@ -256,7 +254,7 @@ class CSHARP : public Language {
|
|||
|
||||
// Generate the intermediary class
|
||||
{
|
||||
String *filen = NewStringf("%s%s.cs", Swig_file_dirname(outfile), imclass_name);
|
||||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), imclass_name);
|
||||
File *f_im = NewFile(filen,"w");
|
||||
if(!f_im) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
|
|
@ -293,7 +291,7 @@ class CSHARP : public Language {
|
|||
|
||||
// Generate the C# module class
|
||||
{
|
||||
String *filen = NewStringf("%s%s.cs", Swig_file_dirname(outfile), module_class_name);
|
||||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), module_class_name);
|
||||
File *f_module = NewFile(filen,"w");
|
||||
if(!f_module) {
|
||||
Printf(stderr,"Unable to open %s\n", filen);
|
||||
|
|
@ -1120,7 +1118,7 @@ class CSHARP : public Language {
|
|||
SWIG_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
String *filen = NewStringf("%s%s.cs", Swig_file_dirname(outfile), proxy_class_name);
|
||||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), proxy_class_name);
|
||||
f_proxy = NewFile(filen,"w");
|
||||
if(!f_proxy) {
|
||||
Printf(stderr, "Unable to create proxy class file: %s\n", filen);
|
||||
|
|
@ -1855,7 +1853,7 @@ class CSHARP : public Language {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
void emitTypeWrapperClass(String *classname, SwigType *type) {
|
||||
String *filen = NewStringf("%s%s.cs", Swig_file_dirname(outfile), classname);
|
||||
String *filen = NewStringf("%s%s.cs", SWIG_output_directory(), classname);
|
||||
File *f_swigtype = NewFile(filen,"w");
|
||||
String *swigtype = NewString("");
|
||||
|
||||
|
|
@ -2010,7 +2008,8 @@ swig_csharp(void) {
|
|||
|
||||
const char *CSHARP::usage = (char*)"\
|
||||
C# Options (available with -csharp)\n\
|
||||
-package <name> - set name of the assembly\n\
|
||||
-noproxy - Generate the low-level functional interface instead of proxy classes\n\
|
||||
-package <name> - set name of the assembly to <name>\n\
|
||||
-noproxy - Generate the low-level functional interface instead\n\
|
||||
of proxy classes\n\
|
||||
\n";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue