STR: cd /tmp rm -rf claws git clone git://git.claws-mail.org/claws.git cd /tmp/claws ./autogen.sh █ Note the --prefix value: ./configure \ --build=$(uname -m)-suse-linux-gnu \ --prefix=/usr \ --disable-jpilot \ --disable-maintainer-mode \ --disables-manual \ --disable-static \ --enable-bogofilter-plugin \ --enable-crash-dialog \ --enable-enchant \ --enable-gnutls \ --enable-ldap \ --enable-pgpmime-plugin \ --enable-silent-rules \ --enable-spamassassin-plugin \ --disable-dillo-plugin \ --disable-fancy-plugin make su - cd /tmp/claws make install make uninistall █ Note: the output shows many attempts to remove files from '/usr/local' instead of '/usr' as specified in the --prefix above which claws-mail EXPECTED: which: no claws-mail in (/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/sbin) ACTUAL: /usr/bin/claws-mail Additionally directories like /usr/lib64/claws-mail/plugins/ remain. (I don't know which others too since I am not familiar with the whole tree structure)
Correction: I obviously have a typo: --disables-manual should be --disable-manual due to which the prefix is ignored. After correcting this changes the ACTUAL to: Empty (nested) directories remain in /usr/include/claws-mail, in /usr/lib64/claws mail (and perhaps others). I.e. as far as I understand the 'make uninstall' should remove those directories too but it doesn't.
Testing the same scenario with --prefix=/opt: After running 'make uninstall' the following structure remains: [/opt]: tree . ├── bin │ └── sylpheed-claws -> claws-mail ├── include │ └── claws-mail │ ├── common │ ├── etpan │ ├── gtk │ └── plugins │ └── pgpcore ├── lib64 │ ├── claws-mail │ │ └── plugins │ └── pkgconfig └── share ├── applications ├── doc │ └── claws-mail ├── icons │ └── hicolor │ ├── 128x128 │ │ └── apps │ ├── 48x48 │ │ └── apps │ └── 64x64 │ └── apps ├── locale │ ├── ca │ │ └── LC_MESSAGES │ ├── cs │ │ └── LC_MESSAGES │ ├── da │ │ └── LC_MESSAGES │ ├── de │ │ └── LC_MESSAGES │ ├── en_GB │ │ └── LC_MESSAGES │ ├── es │ │ └── LC_MESSAGES │ ├── fi │ │ └── LC_MESSAGES │ ├── fr │ │ └── LC_MESSAGES │ ├── hu │ │ └── LC_MESSAGES │ ├── id_ID │ │ └── LC_MESSAGES │ ├── it │ │ └── LC_MESSAGES │ ├── ja │ │ └── LC_MESSAGES │ ├── nb │ │ └── LC_MESSAGES │ ├── nl │ │ └── LC_MESSAGES │ ├── pl │ │ └── LC_MESSAGES │ ├── pt_BR │ │ └── LC_MESSAGES │ ├── ro │ │ └── LC_MESSAGES │ ├── ru │ │ └── LC_MESSAGES │ ├── sk │ │ └── LC_MESSAGES │ ├── sv │ │ └── LC_MESSAGES │ ├── tr │ │ └── LC_MESSAGES │ └── zh_TW │ └── LC_MESSAGES └── man └── man1 71 directories, 1 file
https://stackoverflow.com/questions/19521335 Research is done, waiting for your patch ;-)
I suppose the relevant thing would be to add lines to the existing uninstall-hook target based on the the mkdir lines from /po/Makefile.in.in, perhaps using: find <dir> -type d -empty -delete && rmdir <dir> However I can't provide a patch as I am not familiar with the intricacies of the variable names used. I tried to figure those out by looking at the code of the various files but still - it looks all interrelated and complex.
"make uninstall" is not supposed to remove empty directories, just files. As its own documentation states, the "uninstall" target is not meant to be a replacement for package management, see https://www.gnu.org/software/automake/manual/automake.html#index-installdirs The only bug here is that the "sylpheed-claws" symlink is not removed, we will be fixing that soon.