[bugs:#1101] make install fails if already installed to the same prefix

Status: open
Labels: buildsystem
Created: Wed Aug 07, 2013 11:09 AM UTC by Claude Heiland-Allen
Last Updated: Wed Aug 07, 2013 11:09 AM UTC
Owner: nobody

Pd fresh from git.

Reproduction

./autogen.sh ; ./configure --prefix=${HOME}/opt ; make ; make install ; make install

What Happens

ln: failed to create symbolic link `expr.pd_linux': File exists
ln: failed to create symbolic link `fexpr~.pd_linux': File exists
ln: failed to create symbolic link `expr.pd_linux': File exists
ln: failed to create symbolic link `expr~.pd_linux': File exists
ln: failed to create symbolic link `fexpr~.pd_linux': File exists
ln: failed to create symbolic link `expr-help.pd': File exists
ln: failed to create symbolic link `expr~-help.pd': File exists
ln: failed to create symbolic link `fexpr~-help.pd': File exists
make[5]: *** [install-data-hook] Error 1
make[4]: *** [install-data-am] Error 2
make[3]: *** [install-am] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

Expected Happenings

Pd's make install doesn't break if Pd has already been installed to the same prefix.

Simple Bugfix

diff --git a/extra/expr~/GNUmakefile.am b/extra/expr~/GNUmakefile.am
index ab93dd9..b976dc3 100644
--- a/extra/expr~/GNUmakefile.am
+++ b/extra/expr~/GNUmakefile.am
@@ -26,15 +26,15 @@ externaldir = $(pkglibdir)/extra/$(NAME)
 # so we install everything in the install-data-hook
 install-data-hook:
    cd $(DESTDIR)$(externaldir) && ( \
-     $(LN_S) expr~.@EXTERNAL_EXTENSION@ expr.@EXTERNAL_EXTENSION@; \
-     $(LN_S) expr~.@EXTERNAL_EXTENSION@ fexpr~.@EXTERNAL_EXTENSION@; \
+     $(LN_S) -f expr~.@EXTERNAL_EXTENSION@ expr.@EXTERNAL_EXTENSION@; \
+     $(LN_S) -f expr~.@EXTERNAL_EXTENSION@ fexpr~.@EXTERNAL_EXTENSION@; \
      cd ..; \
-     $(LN_S) $(NAME)/expr.@EXTERNAL_EXTENSION@ expr.@EXTERNAL_EXTENSION@; \
-     $(LN_S) $(NAME)/expr~.@EXTERNAL_EXTENSION@ expr~.@EXTERNAL_EXTENSION@; \
-     $(LN_S) $(NAME)/fexpr~.@EXTERNAL_EXTENSION@ fexpr~.@EXTERNAL_EXTENSION@; \
-     $(LN_S) $(NAME)/expr-help.pd expr-help.pd; \
-     $(LN_S) $(NAME)/expr-help.pd expr~-help.pd; \
-     $(LN_S) $(NAME)/expr-help.pd fexpr~-help.pd; \
+     $(LN_S) -f $(NAME)/expr.@EXTERNAL_EXTENSION@ expr.@EXTERNAL_EXTENSION@; \
+     $(LN_S) -f $(NAME)/expr~.@EXTERNAL_EXTENSION@ expr~.@EXTERNAL_EXTENSION@; \
+     $(LN_S) -f $(NAME)/fexpr~.@EXTERNAL_EXTENSION@ fexpr~.@EXTERNAL_EXTENSION@; \
+     $(LN_S) -f $(NAME)/expr-help.pd expr-help.pd; \
+     $(LN_S) -f $(NAME)/expr-help.pd expr~-help.pd; \
+     $(LN_S) -f $(NAME)/expr-help.pd fexpr~-help.pd; \
    )

 uninstall-hook:

The -f flag for ln is specified by POSIX, but I could only test on Debian Wheezy with ln (GNU coreutils) 8.13

Probably would be better to get the configure script to check the best way to force symlink update...


Sent from sourceforge.net because pd-dev@lists.iem.at is subscribed to https://sourceforge.net/p/pure-data/bugs/

To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/pure-data/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.