Allow custom shell commands to specify weak dependencies (bug 6003 part 7, r=ds).
Allow custom shell commands to specify weak dependencies (
bug 6003 part 7, r=ds).
1.1 --- a/ambuild2/frontend/amb2/gen.py Sat Dec 28 10:21:31 2013 -0500
1.2 +++ b/ambuild2/frontend/amb2/gen.py Sat Dec 28 10:21:44 2013 -0500
1.3 @@ -595,7 +595,14 @@
1.4 def addFolder(self, context, folder):
1.5 return self.generateFolder(context.localFolder, folder)
1.6
1.7 - def addShellCommand(self, context, inputs, argv, outputs, folder=-1, dep_type=None):
1.8 + def addShellCommand(self,
1.9 + context,
1.10 + inputs,
1.11 + argv,
1.12 + outputs,
1.13 + folder=-1,
1.14 + dep_type=None,
1.15 + weak_inputs=[]):
1.16 if folder is -1:
1.17 folder = context.localFolder
1.18
1.19 @@ -620,7 +627,8 @@
1.20 folder = folder,
1.21 data = data,
1.22 inputs = inputs,
1.23 - outputs = outputs
1.24 + outputs = outputs,
1.25 + weak_inputs = weak_inputs
1.26 )
1.27
1.28 def addConfigureFile(self, context, path):
2.1 --- a/ambuild2/frontend/base_gen.py Sat Dec 28 10:21:31 2013 -0500
2.2 +++ b/ambuild2/frontend/base_gen.py Sat Dec 28 10:21:44 2013 -0500
2.3 @@ -122,8 +122,15 @@
2.4 def AddCopy(self, source, output_path):
2.5 return self.generator.addCopy(self, source, output_path)
2.6
2.7 - def AddCommand(self, inputs, argv, outputs, dep_type=None):
2.8 - return self.generator.addShellCommand(self, inputs, argv, outputs, dep_type=dep_type)
2.9 + def AddCommand(self, inputs, argv, outputs, dep_type=None, weak_inputs=[]):
2.10 + return self.generator.addShellCommand(
2.11 + self,
2.12 + inputs,
2.13 + argv,
2.14 + outputs,
2.15 + dep_type = dep_type,
2.16 + weak_inputs = weak_inputs
2.17 + )
2.18
2.19 def AddConfigureFile(self, path):
2.20 return self.generator.addConfigureFile(self, path)
2.21 @@ -236,7 +243,7 @@
2.22 def addCopy(self, context, source, output_path):
2.23 raise Exception('Must be implemented!')
2.24
2.25 - def addShellCommand(self, context, inputs, argv, outputs, dep_type=None):
2.26 + def addShellCommand(self, context, inputs, argv, outputs, dep_type=None, weak_inputs=[]):
2.27 raise Exception('Must be implemented!')
2.28
2.29 def addConfigureFile(self, context, path):