ftilmann / latexdiff

Compares two latex files and marks up significant differences between them. Releases on www.ctan.org and mirrors
GNU General Public License v3.0
516 stars 73 forks source link

Improve installation procedure #136

Closed arcctgx closed 6 years ago

arcctgx commented 6 years ago

make install currently assumes that the target directories INSTALLPATH/{bin,man/man1} already exist. This can lead to installation errors when INSTALLPATH is overriden to install into arbitrary location. This change causes install program to create target directories if they don't exist.

Additionally the permissions of installed man pages are corrected to 644 instead of the default 755 - they don't need the exec bit.

ftilmann commented 6 years ago

Thanks for the pull request. The permission bit correction makes sense. However, I am not so sure about automatically generating the target directories. To me, it seems, if the target directory does not exist, then INSTALLPATH or its descendants might be set inappropriately for the system, and it is better for the installation to fail. The user can then either generate the target directory by hand before rerunning, or correct the INSTALLPATH settings.

arcctgx commented 6 years ago

The reason behind my pull request is that I found latexdiff very useful, and I wanted to make it available in Slackware Linux by creating a "SlackBuild". That's a script which automatically builds a Slackware package from a source tarball. At some point a SlackBuild tries to make install into a temporary installation directory, from which a package is created later. (That's why I wanted to override INSTALLPATH in the first place.)

My experience so far is that most of the applications I was writing SlackBuilds for are creating the directory structure at the target location by themselves during make install phase. As far as I know, that's typically achieved either with arguments to the install command, or by defining a separate make target which creates installation directories. I rarely had to resort to creating installation directory structure manually before invoking make install.

Of course you have the final say here. If you prefer not to create the directories during install phase, I will modify the pull request so that it only removes the exec bit from man files, and leaves other install commands as they were before.

ftilmann commented 6 years ago

I mostly included the Makefile as a proof of concept, and did not actually expected it to be used much. If it happens to improve your workflow I don't see too much harm in making your suggested modifications, so will merge.