]> git.tdb.fi Git - builder.git/commitdiff
Allow generator commands to reside outside of the package
authorMikko Rasa <tdb@tdb.fi>
Wed, 12 Jun 2019 16:40:01 +0000 (19:40 +0300)
committerMikko Rasa <tdb@tdb.fi>
Wed, 12 Jun 2019 16:40:01 +0000 (19:40 +0300)
In particular, this lets system binaries to be used as generators.

source/sourcegenerator.cpp

index 192ae289584b186461bd1442cbe1ce800391c7af..6394bd715861466eef2f6fc78640d795c35e31d2 100644 (file)
@@ -99,7 +99,10 @@ void SourceGenerator::Loader::argument(const string &a)
 
 void SourceGenerator::Loader::command(const string &c)
 {
-       obj.set_command((obj.package.get_source_directory()/c).str());
+       if(c.find('/')!=string::npos)
+               obj.set_command((obj.package.get_source_directory()/c).str());
+       else
+               obj.set_command(c);
 }
 
 void SourceGenerator::Loader::in_suffix(const string &s)