diff options
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/ChangeLog | 10 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.am | 17 | ||||
-rw-r--r-- | Build/source/texk/texlive/linked_scripts/Makefile.in | 14 |
3 files changed, 30 insertions, 11 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ChangeLog b/Build/source/texk/texlive/linked_scripts/ChangeLog index 52f092f47d4..fb534ea1f51 100644 --- a/Build/source/texk/texlive/linked_scripts/ChangeLog +++ b/Build/source/texk/texlive/linked_scripts/ChangeLog @@ -1,3 +1,13 @@ +2011-12-05 Peter Breitenlohner <peb@mppmu.mpg.de> + + * Makefile.am (uninstall-hook): Only remove man if it is a link. + +2011-12-03 Karl Berry <karl@tug.org> + + * Makefile.am (install-data-hook): only create the man link if it + is a link already, and if TL_INSTALL_OMIT_MAN_LINK is unset + in the environment. Report from Bruce Dubbs, 18 Nov 2011 18:56:22. + 2011-05-30 Peter Breitenlohner <peb@mppmu.mpg.de> * Makefile.am (bin_links): Move mpost:metafun and mpost:mfplain diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.am b/Build/source/texk/texlive/linked_scripts/Makefile.am index 2fde925e6f9..b278866543e 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.am +++ b/Build/source/texk/texlive/linked_scripts/Makefile.am @@ -199,12 +199,15 @@ install-links: echo "creating link '$$link' -> '$$file'"; \ $(LN_S) $$file $$link || exit 1; \ done && \ - rm -f man && \ - if test -d $(REL)/texmf/doc/man; then \ - echo "creating link 'man' -> '$(REL)/texmf/doc/man'" && \ - (ln -s $(REL)/texmf/doc/man man || :); \ + if test -d "$$REL/texmf/doc/man" \ + && test -z "$(TL_INSTALL_OMIT_MAN_LINK)" \ + && (test -h man || test ! -e man); then \ + echo "creating link 'man' -> '$$REL/texmf/doc/man'"; \ + rm -f man; \ + (ln -s "$$REL/texmf/doc/man" man || :); \ else :; fi -## man dir link for those mans which can use it. +## man dir link for those mans which can use it, but don't overwrite a +## real file, e.g., /usr/bin/man. ## For WIN32 (MinGW or native) we have wrapper binaries with .exe, ## for Cygwin and Unix we have symlinks without .exe. @@ -224,6 +227,8 @@ uninstall-hook: rm -f $(DESTDIR)$(bindir)/$$link$(WINEXT); \ done if !WIN32 - rm -f $(DESTDIR)$(bindir)/man + if test -h $(DESTDIR)$(bindir)/man; then \ + rm -f $(DESTDIR)$(bindir)/man; \ + else :; fi endif !WIN32 diff --git a/Build/source/texk/texlive/linked_scripts/Makefile.in b/Build/source/texk/texlive/linked_scripts/Makefile.in index c366a6c27b8..47cf89ce33c 100644 --- a/Build/source/texk/texlive/linked_scripts/Makefile.in +++ b/Build/source/texk/texlive/linked_scripts/Makefile.in @@ -650,10 +650,12 @@ install-links: echo "creating link '$$link' -> '$$file'"; \ $(LN_S) $$file $$link || exit 1; \ done && \ - rm -f man && \ - if test -d $(REL)/texmf/doc/man; then \ - echo "creating link 'man' -> '$(REL)/texmf/doc/man'" && \ - (ln -s $(REL)/texmf/doc/man man || :); \ + if test -d "$$REL/texmf/doc/man" \ + && test -z "$(TL_INSTALL_OMIT_MAN_LINK)" \ + && (test -h man || test ! -e man); then \ + echo "creating link 'man' -> '$$REL/texmf/doc/man'"; \ + rm -f man; \ + (ln -s "$$REL/texmf/doc/man" man || :); \ else :; fi uninstall-hook: @@ -667,7 +669,9 @@ uninstall-hook: link=`echo $$s | sed 's,.*:,,'`; \ rm -f $(DESTDIR)$(bindir)/$$link$(WINEXT); \ done -@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/man +@WIN32_FALSE@ if test -h $(DESTDIR)$(bindir)/man; then \ +@WIN32_FALSE@ rm -f $(DESTDIR)$(bindir)/man; \ +@WIN32_FALSE@ else :; fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. |