Skip to content

Commit 74eefbe

Browse files
committed
added ability to specify target of build
1 parent 6b6df36 commit 74eefbe

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/bin/tectonic/v2cli.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ pub struct BuildCommand {
238238
/// Open built document using system handler
239239
#[structopt(long)]
240240
open: bool,
241+
242+
/// Specify a target to be used by the build
243+
#[structopt(long, help = "Specify the target of the build.")]
244+
target: Option<String>,
241245
}
242246

243247
impl BuildCommand {
@@ -262,6 +266,14 @@ impl BuildCommand {
262266
setup_options.only_cached(self.only_cached);
263267

264268
for output_name in doc.output_names() {
269+
270+
// Added checking to see if the output name matches the specified target name
271+
if let Some(out) = self.target.clone() {
272+
if out != output_name {
273+
continue;
274+
}
275+
}
276+
265277
let mut builder = doc.setup_session(output_name, &setup_options, status)?;
266278

267279
builder

0 commit comments

Comments
 (0)