Note the requirement of the hyphen on the 2nd set of flags, also the -C should go first because traditionally tar went via order of flags it doesn’t matter as much anymore but it’s better to add it first.
Maybe add a waf extract command to do the extraction for the user if the prefix is already set then you can throw a makedirs in there to create the path as well.
I was going to mention install but is it really installing? Kind of feels like that it’s just doing an extra step for you. If you think officially supporting it as a way to install the results then yes I’d use that command.
I think it is suitable if tar files are built. The catch is knowing the tar file is OK or not? A distclean cleans the tar directory so I suppose we can assume any tar file in the --targets= list is OK to install. Package builds like RPM are outside this process.
That’s even more reason to call it ‘extract’ instead of install. I would argue that it’s not really installing anything but doing the extraction step for you.
I would call it extract-tar in case we have other formats in the future we’d want to extract. I think it’s more likely to have more extract-* commands than tar-* commands unless you think the reverse then tar-* sounds good.