by DSMan195276 · 8y ago · 0 comments
With that said, I was curious how this project got around the 'install' problem, but it seems like they were largely able to just side-step the issue. They build an `initrd` from tup, and the `initrd` Tupfile copies all of the compiled executables into their proper folders before generating the `initrd`. So the projects themselves can't install themselves directly onto a system.
[0] https://groups.google.com/d/msg/tup-users/Kxw1nnXK12o/my4IYt...
I agree that the installation approach is a total copout, I would have hardlinked all the files from their installation destination to the build artifacts. (presuming state is intended to be thrown away on rebuild.)
They're make a really clear distinction between a build system, and a build support system. The "clean" command falls into build support, and the Tup team would argue this is better served with techniques like "git clean -xdf"
The "make clean" command is not perfect. Even if someone writes this make phase correctly, it may break after you sync new makefile changes on a dirty project dir. What do you do in that case?
And I agree that `make clean` isn't perfect, I think that is what makes the fact that `tup clean` doesn't exist even more annoying. A lot of people recommend including an auxiliary Makefile or script to do the cleaning, but it can never be as good as if `tup` just did it itself since it is aware of exactly what files it as created during the build process.
Every time I have needed to clean a Makefile based project it has been due to imperfections of the build system, i.e. needing to do a full rebuild. In theory (I've never used tup in anger) you should never need to do that with tup because the dependecy gathering is so robust.