Op dinsdag 3 juli 2018 00:59:51 CEST schreef DaveC49: > Geert, > > I had realised the same thing about needing to uninstall before building and > shifted the section on uninstalling to before the section on Building on > the Wiki page and specifically mentioned using the previous version's build > directory. I might make the note clearer about retaining the build > directory for uninstalling. > Thanks for documenting all this.
> From the tarball the source directory installs with the version number > attached (from github it is a generic gnucash). It has become my practice to > put the build directory inside the source directory (I have had no problems > with that) so it is clearly identified which version it is for, or > alternatively one could tag the build directory with the version number as > there is no real need to keep the source directory once the build is done. This is a subtlety I'm not so sure about. I think in order for "make/ninja-build uninstall" to work properly you need to keep both the source directory and the build directory. In addition the source directory should reflect the version of gnucash you wish to uninstall. Here's a quick experiment to illustrate this: I have a build directory outside my source tree and I have successfully run ninja-build install Next I move the source tree aside (move source source-org) And then from my build directory run ninja-buile uninstall This gives the following error message: ninja-build uninstall [0/1] Re-running CMake... CMake Error: The source directory "source" does not exist. Specify --help for usage, or press the help button on the CMake GUI. FAILED: build.ninja /usr/bin/cmake -Hsource-Bbuild ninja: error: rebuilding 'build.ninja': subcommand failed Cmake tries very hard to detect source changes when running make/ninja-build based instructions. This also means cmake will check dependencies before trying to run "make uninstall". The uninstall command depends on "install_manifest.txt". That file seems to be a file generated and tracked by the cmake build system itself. Our CMakeLists.txt files don't manipulate it explicitly. And clearly cmake attempts track dependencies on this file (namely each file that got installed). > I'm not pushed for space so I don't bother to delete the source files until > I've installed another version and I'm happy with it but others won't > necessarily have that luxury. > > At the moment the uninstall from a ninja build I did is a kludge. I will see > if I can find how/where cmake generates the install secion when creating > build.ninja and populate the uninstall target. If I succeed, i'll generate > a patch. Are you referring to the fact that uninstall doesn't remove empty directories ? Maybe that can be improved indeed. I don't know. Keep in mind the intended final install destination is typically into a set of directories that already contain applications and libraries. So we can't unconditionally delete all directories. We should at least verify whether they are empty or not. And we probably don't want to delete any common top-level directory like bin or lib when dealing with standard install locations. Regards, Geert _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information. ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.