MAKE-like build that deletes orphans?

I have a complex multi-stage (media conversion and formatting) build process that leaves orphan target files needing deleting automatically (i.e. by reference only to the build rules themselves, not any parallel config) upon each regular build. Since MAKE cannot do this, what can? Thanks.

Why build orphan targets in the first place if you're just going to delete them? Make won't build orphans unless that target is either given or first since nothing pulls them in. Or are you just saying you want intermediate files deleted?

I suspect Make can be made to do what you want, but to tell you how you'll need to be a lot more specific about what you're actually doing.

> Why build orphan targets in the first place if you're just going to delete them?

The orphan target files aren't orphans when built...

> Make won't build orphans unless that target is either given or first since nothing pulls them in

... being orphaned only subsequently - by the removal of source files from this highly changeable set.

Hence I'd like an option that pulls them out.

So the rules change?

You need to be a lot more specific about what you're actually doing.

Not necessarily. In a regular MAKE project, simply removing a source file will leave an orphan target.

That's but what I require a solution to is the general problem.