8 ms·
> That way if the script fails it doesn't leave things in a broken state with "output" appearing to be up-to-date. Perhaps a replacement for "make" would incorp
by ynik 8y ago
> That way if the script fails it doesn't leave things in a broken state with "output" appearing to be up-to-date. Perhaps a replacement for "make" would incorporate this mechanism?
GNU make has ".DELETE_ON_ERROR" for this.
But yes, make is quite horrible if you want reliable incremental builds. For example, $OLD_VERSION of your software generates a file $output/plugins/stuff.so, and $NEW_VERSION no longer does so, the file will stick around and the new version of the software will load an outdated plugin. This type of stuff causes weird issues that disappear on the next fresh checkout (especially during development, where the plugin ABI may be unstable). If a rule disappears, so should its output file(s) on the next build.
Why are there so many build systems that don't even attempt to handle this stuff? Surely we aren't the only project that uses glob patterns like plugins/*.so? You can't fix these fundamental design problems by using meta-build-tools that end up generating makefiles...