summaryrefslogtreecommitdiff
path: root/cpp/src/slice2js/Main.cpp
diff options
context:
space:
mode:
authorJoe George <joe@zeroc.com>2015-04-23 14:33:12 -0400
committerJoe George <joe@zeroc.com>2015-04-23 14:35:45 -0400
commit8a1b65e8f91a442be280b5ba53cc76937b5f16b3 (patch)
treedb2462a40b516641ae0dd70facf3e51fc44e2041 /cpp/src/slice2js/Main.cpp
parentMake js use npm ice-gulp-builder package (diff)
downloadice-8a1b65e8f91a442be280b5ba53cc76937b5f16b3.tar.bz2
ice-8a1b65e8f91a442be280b5ba53cc76937b5f16b3.tar.xz
ice-8a1b65e8f91a442be280b5ba53cc76937b5f16b3.zip
ICE-6466 - Replace --icejs metadata js:ice-build
Diffstat (limited to 'cpp/src/slice2js/Main.cpp')
-rw-r--r--cpp/src/slice2js/Main.cpp26
1 files changed, 11 insertions, 15 deletions
diff --git a/cpp/src/slice2js/Main.cpp b/cpp/src/slice2js/Main.cpp
index 35aca5463d4..b751dd295bf 100644
--- a/cpp/src/slice2js/Main.cpp
+++ b/cpp/src/slice2js/Main.cpp
@@ -75,7 +75,6 @@ usage(const char* n)
"-d, --debug Print debug messages.\n"
"--ice Permit `Ice' prefix (for building Ice source code only).\n"
"--underscore Permit underscores in Slice identifiers.\n"
- "--icejs Build icejs module\n"
;
}
@@ -98,7 +97,6 @@ compile(int argc, char* argv[])
opts.addOpt("d", "debug");
opts.addOpt("", "ice");
opts.addOpt("", "underscore");
- opts.addOpt("", "icejs");
vector<string> args;
try
@@ -146,11 +144,11 @@ compile(int argc, char* argv[])
bool preprocess = opts.isSet("E");
bool useStdout = opts.isSet("stdout");
-
+
string output = opts.optArg("output-dir");
bool depend = opts.isSet("depend");
-
+
bool dependJSON = opts.isSet("depend-json");
bool dependxml = opts.isSet("depend-xml");
@@ -163,8 +161,6 @@ compile(int argc, char* argv[])
bool underscore = opts.isSet("underscore");
- bool icejs = opts.isSet("icejs");
-
if(args.empty())
{
getErrorStream() << argv[0] << ": error: no input file" << endl;
@@ -207,7 +203,7 @@ compile(int argc, char* argv[])
{
out.os() << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<dependencies>" << endl;
}
-
+
//
// Create a copy of args without the duplicates.
//
@@ -220,9 +216,9 @@ compile(int argc, char* argv[])
sources.push_back(*i);
}
}
-
+
for(vector<string>::const_iterator i = sources.begin(); i != sources.end();)
- {
+ {
if(depend || dependJSON || dependxml)
{
PreprocessorPtr icecpp = Preprocessor::create(argv[0], *i, cppArgs);
@@ -243,9 +239,9 @@ compile(int argc, char* argv[])
out.cleanup();
return EXIT_FAILURE;
}
-
+
bool last = (++i == sources.end());
-
+
if(!icecpp->printMakefileDependencies(out.os(),
depend ? Preprocessor::JavaScript : (dependJSON ? Preprocessor::JavaScriptJSON : Preprocessor::SliceXML),
includePaths,
@@ -260,7 +256,7 @@ compile(int argc, char* argv[])
out.cleanup();
return EXIT_FAILURE;
}
-
+
if(dependJSON)
{
if(!last)
@@ -315,12 +311,12 @@ compile(int argc, char* argv[])
{
if(useStdout)
{
- Gen gen(icecpp->getBaseName(), includePaths, output, icejs, cout);
+ Gen gen(icecpp->getBaseName(), includePaths, output, cout);
gen.generate(p);
}
else
{
- Gen gen(icecpp->getBaseName(), includePaths, output, icejs);
+ Gen gen(icecpp->getBaseName(), includePaths, output);
gen.generate(p);
}
}
@@ -352,7 +348,7 @@ compile(int argc, char* argv[])
}
}
}
-
+
if(dependJSON)
{
out.os() << "}" << endl;