diff --git a/payload/reggae/options.d b/payload/reggae/options.d index f211fc93..6a78a8fd 100644 --- a/payload/reggae/options.d +++ b/payload/reggae/options.d @@ -68,6 +68,7 @@ struct Options { bool dubTargetPathAbs; bool buildReggaefileSingle; // single-threaded build using the binary backend bool buildReggaefileOptimise; // compile the build description with optimisations + bool forceReggaefileDeps; string[string] userVars; // must be last Options dup() @safe pure const nothrow scope { @@ -334,6 +335,7 @@ Options getOptions(Options defaultOptions, string[] args) @trusted { "build-reggaefile-with-dub", "Build the reggaefile with dub instead of the binary backend", &options.buildReggaefileWithDub, "build-reggaefile-single", "Build the reggaefile using a single thread", &options.buildReggaefileSingle, "build-reggaefile-release", "Build the reggaefile with optimisations", &options.buildReggaefileOptimise, + "force-reggaefile-deps", "Force calculating reggaefile import dependencies", &options.forceReggaefileDeps, ); if(helpInfo.helpWanted) { diff --git a/src/reggae/reggae.d b/src/reggae/reggae.d index 7238b204..0a6d9061 100644 --- a/src/reggae/reggae.d +++ b/src/reggae/reggae.d @@ -379,7 +379,7 @@ private void calculateReggaeFileDeps(O)(auto ref O output, in Options options) { import std.path: dirName; // No imports => no dependencies => no need to spend time calculating. - if(noExternalImports(options)) { + if(!options.forceReggaefileDeps && noExternalImports(options)) { if(!options.reggaeFileDepFile.dirName.exists) mkdirRecurse(options.reggaeFileDepFile.dirName); write(options.reggaeFileDepFile, "reggaefile.o: \\\n " ~ options.reggaeFilePath);