leahneukirchen / redo-c

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

redo -f tries to build source files #38

Open lions-tech opened 5 months ago

lions-tech commented 5 months ago

When executing redo -f to force a complete rebuild, redo will build source files too.

To check if a dependency is a source file, redo-c tries to determine a fitting dofile and assumes that it is a source file, if it can't find one. Unfortunately the default.do file will always fit, so every file will be treated as target.

Relevant code lines:

https://github.com/leahneukirchen/redo-c/blob/master/redo.c#L813 https://github.com/leahneukirchen/redo-c/blob/master/redo.c#L420 https://github.com/leahneukirchen/redo-c/blob/master/redo.c#L398 https://github.com/leahneukirchen/redo-c/blob/master/redo.c#L230 https://github.com/leahneukirchen/redo-c/blob/master/redo.c#L821

A workaround is, to patch the default.do file to ignore source files. When patching one needs to keep Issue #25 in mind: If the files are just ignored, redo will overwrite them with empty files.