summaryrefslogtreecommitdiff
path: root/cpp/src/slice2py/Main.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2004-09-07 18:17:22 +0000
committerMark Spruiell <mes@zeroc.com>2004-09-07 18:17:22 +0000
commit557fbda36bb911214956ef4aca8e53e3f5741125 (patch)
tree43f636a6c1d5b991a8e5637bfb549ae28ed63fd9 /cpp/src/slice2py/Main.cpp
parentgenerate import statements for included files; improving exception mapping (diff)
downloadice-557fbda36bb911214956ef4aca8e53e3f5741125.tar.bz2
ice-557fbda36bb911214956ef4aca8e53e3f5741125.tar.xz
ice-557fbda36bb911214956ef4aca8e53e3f5741125.zip
clean up; adding --no-package
Diffstat (limited to 'cpp/src/slice2py/Main.cpp')
-rw-r--r--cpp/src/slice2py/Main.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/cpp/src/slice2py/Main.cpp b/cpp/src/slice2py/Main.cpp
index 028f67b5e0f..dca96772e89 100644
--- a/cpp/src/slice2py/Main.cpp
+++ b/cpp/src/slice2py/Main.cpp
@@ -272,8 +272,6 @@ usage(const char* n)
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
- "--header-ext EXT Use EXT instead of the default `h' extension.\n"
- "--source-ext EXT Use EXT instead of the default `cpp' extension.\n"
"-DNAME Define NAME as 1.\n"
"-DNAME=DEF Define NAME as DEF.\n"
"-UNAME Remove any definition for NAME.\n"
@@ -282,6 +280,7 @@ usage(const char* n)
"-d, --debug Print debug messages.\n"
"--ice Permit `Ice' prefix (for building Ice source code only)\n"
"--all Generate code for Slice definitions in included files.\n"
+ "--no-package Do not create Python packages.\n"
;
// Note: --case-sensitive is intentionally not shown here!
}
@@ -295,6 +294,7 @@ main(int argc, char* argv[])
bool ice = false;
bool caseSensitive = false;
bool all = false;
+ bool noPackage = false;
int idx = 1;
while(idx < argc)
@@ -367,6 +367,15 @@ main(int argc, char* argv[])
}
--argc;
}
+ else if(strcmp(argv[idx], "--no-package") == 0)
+ {
+ noPackage = true;
+ for(int i = idx ; i + 1 < argc ; ++i)
+ {
+ argv[i] = argv[i + 1];
+ }
+ --argc;
+ }
else if(strcmp(argv[idx], "--output-dir") == 0)
{
if(idx + 1 >= argc)
@@ -463,13 +472,16 @@ main(int argc, char* argv[])
//
// Generate the Python mapping.
//
- generate(u, out);
+ generate(u, all, out);
//
// Create or update the Python package hierarchy.
//
- PackageVisitor visitor(argv[0], base + "_ice", output);
- u->visit(&visitor, false);
+ if(!noPackage)
+ {
+ PackageVisitor visitor(argv[0], base + "_ice", output);
+ u->visit(&visitor, false);
+ }
}
u->destroy();