Commit b198a071 authored by conrad's avatar conrad

use $(LN_S) and $(RM) for installing and uninstalling symlinks to deprecated

tool names.

Also add a comment to the Makefile.am based on Ralph's observation that:
  According to the docs, AC_PROG_LN_S will substitute 'ln' or 'cp -p' if
  the system doesn't support 'ln -s'. So that makes it more likely for
  the install to work, but may break the 'was this me?' test in the
  uninstall target.


git-svn-id: http://svn.annodex.net/liboggz/trunk@3777 8158c8cd-e7e1-0310-9fa4-c5954c97daef
parent 771cf875
......@@ -71,16 +71,20 @@ oggz_sort_LDADD = $(OGGZ_LIBS)
install-exec-local:
for p in dump diff info merge rip ; do \
if test -e $(exec_prefix)/bin/oggz$$p ; then \
rm $(exec_prefix)/bin/oggz$$p ; \
ln -s $(exec_prefix)/bin/oggz-$$p $(exec_prefix)/bin/oggz$$p ; \
$(RM) $(exec_prefix)/bin/oggz$$p ; \
$(LN_S) $(exec_prefix)/bin/oggz-$$p $(exec_prefix)/bin/oggz$$p ; \
fi ; \
done
# On 'make uninstall', remove the deprecated tool -- but only if it is a
# symlink, to keep to the policy of only uninstalling what we installed.
# Note that the $(LN_S) above may be substitued with "cp -p" on systems that
# do not have ln, so the test below will fail. As a result, 'make uninstall'
# will fail to uninstall the copied versions of oggzdump, oggzdiff etc. on
# such systems.
uninstall-local:
for p in dump diff info merge rip ; do \
if test -L $(exec_prefix)/bin/oggz$$p ; then \
rm $(exec_prefix)/bin/oggz$$p ; \
$(RM) $(exec_prefix)/bin/oggz$$p ; \
fi ; \
done
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment