ghost targets/sources after the file is no longer present?

18 views
Skip to first unread message

Karolis K

unread,
Mar 16, 2020, 4:33:06 PM3/16/20
to redo
So I ran into this situation today.

There was a target file "foo.x" and a root-level default do script "default.x.do" that has instructions about producing '.x' files.
I have a lot of ".x" files and I needed to move one of them to another place. So I moved it but I cannot get rid of it still showing in redo-targets.

redo-targets manual says that targets that were removed along with their do scripts will not be visible. That is great.
However in my case the .do file was a default.do file and I will not be removing it.

Is there a way to get rid of ghost targets in such a situation?

Nils Dagsson Moskopp

unread,
Mar 17, 2020, 3:03:59 AM3/17/20
to Karolis K, redo
My redo implementation in Bourne Shell only lists targets that exist –
to quote the man page: “Files that do not exist are not listed because
they might not be targets anymore.” … similar for redo-sources(1) btw.

http://news.dieweltistgarnichtso.net/bin/redo-sh.html
signature.asc

Karolis K

unread,
Mar 17, 2020, 5:08:03 AM3/17/20
to redo
Thank you for a quick reply, interesting. Maybe I should try your implementation because having those dead targets lingering around makes redo-targets command useless.

Is your redo compatible as a drop-in replacement for the Python implementation by apenwarr? Will try to find a list of differences.

Also I have one questions/suggestion - is there a reason redo-targets do not accept a source as an optional parameter?
To me it seems like that would be a nice way to get all targets that depend on a particular source (and similar for redo-sources - it might accept target as an optional argument?)
Reply all
Reply to author
Forward
0 new messages