My code generates a lot of directories and file "artifacts" that need to be manually deleted. Is there a way to have a script or single command in gdb/lldb:

A. Deletes those files
B. Recompiles the code
C. Re-runs the code

@mdszy Please explain? These files are arbitrarily generated, the equivalent of running "echo Hi > some_file", where I want to delete some_file. That file name changes every time.


@farhan hm, they can't be thrown into a specific directory?

I was just thinking:

create dummy rules for "clean", "build" and "run" and then another dummy of your choosing that depends on all three of these rules, so it runs all three of them at once when you call it

otherwise it doesn't do anything special for figuring out what file you've created unless it can be wildcard matched I guess

Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either! We adhere to an adapted version of the TootCat Code of Conduct and have documented a list of blocked instances. Ash is the admin and is supported by Fuzzface, Brian!, and Daniel Glus as moderators. Hosting costs are largely covered by our generous supporters on Patreon – thanks for all the help!