3 ms·
Yes, I didn't read properly. I guess you could do some magic to delete "unexpected" files, but are there tools which do solve this problem?
by rustybolt 3y ago
Yes, I didn't read properly.
I guess you could do some magic to delete "unexpected" files, but are there tools which do solve this problem?
- IshKebab 3y agoThe cleanest way to do it is essentially "make install". You do all the heavy build steps into a build directory, and then the final stage is to delete the "output" directory and copy all the files you need there. Incremental builds should still be pretty fast since the only repeated action is copying files (and you could link them if you want instead).
- cratermoon 3y agoConventionally, install puts the outputs in their where they will live for use. It does so in a way that 'make uninstall' will leave things as they were before install. The install target should also run any pre- and post-install commands. There's also a 'make dist' convention, to build a release tarball.
- Karellen 3y agoThis is the way, because intermediate build artefacts also end up in `build/`. You don't want those in your `output/` directory, but you also don't want to delete them because they help speed up the incremental builds. Edit: `make install` also protects you against broken builds breaking your live site.