Skip to content

Commit

Permalink
Fixed issue d-widget-toolkit#8
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhouxuan committed Jul 5, 2013
1 parent 7f1f738 commit 52e1810
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion build.d
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ immutable LIBNAMES_DRAW2D = [ "org.eclipse.draw2d" ];
//

bool isDebug = ("1" == .getenv("DEBUG"));
string[] extraOptions;

void createLib( in string[] libobjs, string name ) {
.mkdirRecurseE(win_path(DIR_LIB));
Expand All @@ -157,6 +158,9 @@ void createLib( in string[] libobjs, string name ) {
rsp ~= win_path(obj);
}
}

rsp ~= extraOptions;

std.file.write(FILE_RSP, rsp.join(.newline));

static if (isWindows)
Expand Down Expand Up @@ -217,6 +221,9 @@ void buildTree( string basedir, string srcdir, string resdir, string[] dcargs=nu
if (-1 != std.string.indexOf(path, "mozilla")) continue;
rsp ~= win_path(path)[ srcdir_abs.length+1 .. $ ];
}

rsp ~= extraOptions;

std.file.write(FILE_RSP, rsp.join(.newline));

{
Expand Down Expand Up @@ -324,6 +331,8 @@ void buildApp( string basedir, string srcdir, string resdir, in string[] dflags,
}
}

rsp ~= extraOptions;

std.file.write(FILE_RSP, rsp.join(.newline));

{
Expand Down Expand Up @@ -600,6 +609,7 @@ taskEx["bindsnippets"] = (string explicit_snp) {
bool printTasks = false;
bool printHelp = false;
.getopt(args,
std.getopt.config.passThrough,
"T|tasks", &printTasks,
"h|H|help", &printHelp
);
Expand Down Expand Up @@ -659,7 +669,11 @@ void addDepAndTask(string task) {
addTaskSeq(task);
}
foreach (arg; args[1 .. $]) {
if (arg in task) {
if (arg[0] == '-') {
extraOptions ~= arg;
continue;
}
else if (arg in task) {
// Build task.
addDepAndTask(arg);
continue;
Expand Down

0 comments on commit 52e1810

Please sign in to comment.