build-sys: simulate ln -s correctly on Windows
authorSalvador Fandino <sfandino@yahoo.com>
Wed, 4 Oct 2017 13:21:24 +0000 (15:21 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Sat, 7 Oct 2017 19:16:07 +0000 (22:16 +0300)
make install was failing on Windows because there cp is
used to replace ln -s commands but cp doesn't resolve its
first argument as relative to the second one.

This patch changes the install-bashcompletion-aliases rules
to chdir to the target dir so that cp works correctly. This
is the solution recomended in the automake documentation.

Makefile.am

index 9a6b42a9f52318c6bffae88b3a146a6b0d564e77..275ceeac2ee71b2e5737207edbf2e94171cdb1a4 100644 (file)
@@ -68,14 +68,14 @@ bashcompletiondir=@bashcompletiondir@
 dist_bashcompletion_DATA = shell-completion/bash/pulseaudio
 
 install-bashcompletion-aliases:
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pactl
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacmd
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pasuspender
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/padsp
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/pacat
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/paplay
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parec
-       $(LN_S) -f pulseaudio $(DESTDIR)$(bashcompletiondir)/parecord
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pactl
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacmd
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pasuspender
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio padsp
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio pacat
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio paplay
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parec
+       cd $(DESTDIR)$(bashcompletiondir) && $(LN_S) -f pulseaudio parecord
 
 install-data-hook: install-bashcompletion-aliases