leahneukirchen / redo-c

An implementation of the redo build system in portable C with zero dependencies
105 stars 12 forks source link

Fix Issue #25: Prevent creation of virtual targets #37

Closed lions-tech closed 1 year ago

lions-tech commented 1 year ago

This small PR fixes issue #25 by simply deleting the target.

This change fully complies to the feature advertised in the README.md: "When a target makes no output, no target file is created. The target is considered always out of date."

Deleting the target after it has been renamed and written as dependency for itself, causes the target to always be considered out of date.

This PR can be tested using my test project: https://github.com/lions-tech/redo-c-testproj

What do you think about this?

lions-tech commented 1 year ago

Just realised: This currently makes problems with explicit creation in the do files (e. g. "touch").