Skip to content

target_name order shouldn't matter #173

@aappling-usgs

Description

@aappling-usgs

It seems I can only use target_name in a command if it's the first argument. I would like to be able to use that variable anywhere in a command.

this remake file creates an i.txt file as expected:

target_default: i.txt
targets:
  i.txt :
    command: file.create(target_name, showWarnings=FALSE)
> make()
<  MAKE > i.txt
[ BUILD ] i.txt |  file.create("i.txt", showWarnings = FALSE)

but this one gives an error:

target_default: i.txt
targets:
  i.txt :
    command: file.create(showWarnings=FALSE, target_name)
> make()
<  MAKE > i.txt
[ BUILD ] i.txt |  file.create(showWarnings = "i.txt", target_name)
Error in file.create(showWarnings = "i.txt", target_name) : 
  object 'target_name' not found

(and also my argument showWarnings=FALSE has been altered in the BUILD call)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions