Re: [pulseaudio-discuss] [PATCH 3/9] build: copy instead of link pacat to other utils on win32

2011-03-17 Thread Colin Guthrie
'Twas brillig, and Maarten Bosmans at 16/03/11 09:55 did gyre and gimble:
 This is necessary as symlinks are not supported on Windows.  Also use the 
 $(EXEEXT) variable.
 
 As a side effect on POSIX, an absolute symbolic link is now created instead 
 of a relative one.

NAK. The absolute link cannot include DESTDIR I believe as most
RPMs/packages use DESTDIR to create install routes that ultimately end
up in /. DESTDIR cannot appear in any symbolic links.

Also relative symlinks are preferred for relocated installs an for
seeing working links when installing in chroots etc.

Also, (as I've got other issues with this particular patch) can you call
the variable something other than LINK_PROGRAM to avoid any confusion
with library linking? SYMLINK_PROGRAM or something (even if it's invalid
on win32) would IMO be less confusing.

Col.


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss


[pulseaudio-discuss] [PATCH 3/9] build: copy instead of link pacat to other utils on win32

2011-03-16 Thread Maarten Bosmans
This is necessary as symlinks are not supported on Windows.  Also use the 
$(EXEEXT) variable.

As a side effect on POSIX, an absolute symbolic link is now created instead of 
a relative one.
---
 src/Makefile.am |   21 +
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index b57172b..3736669 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1896,21 +1896,26 @@ daemon.conf: daemon/daemon.conf.in Makefile
sed -e 's,@PA_DLSEARCHPATH\@,$(modlibexecdir),g' \
-e 's,@PA_DEFAULT_CONFIG_FILE\@,$(DEFAULT_CONFIG_DIR),g'  $  
$@
 
+if OS_IS_WIN32
+LINK_PROGRAM=cp
+else
+LINK_PROGRAM=ln -sf
+endif
 install-exec-hook:
-chown root $(DESTDIR)$(pulselibexecdir)/proximity-helper
-chmod u+s $(DESTDIR)$(pulselibexecdir)/proximity-helper
-   ln -sf pacat $(DESTDIR)$(bindir)/parec
-   ln -sf pacat $(DESTDIR)$(bindir)/pamon
-   ln -sf pacat $(DESTDIR)$(bindir)/paplay
-   ln -sf pacat $(DESTDIR)$(bindir)/parecord
+   $(LINK_PROGRAM) $(DESTDIR)$(bindir)/pacat$(EXEEXT) 
$(DESTDIR)$(bindir)/parec$(EXEEXT)
+   $(LINK_PROGRAM) $(DESTDIR)$(bindir)/pacat$(EXEEXT) 
$(DESTDIR)$(bindir)/pamon$(EXEEXT)
+   $(LINK_PROGRAM) $(DESTDIR)$(bindir)/pacat$(EXEEXT) 
$(DESTDIR)$(bindir)/paplay$(EXEEXT)
+   $(LINK_PROGRAM) $(DESTDIR)$(bindir)/pacat$(EXEEXT) 
$(DESTDIR)$(bindir)/parecord$(EXEEXT)
rm -f $(DESTDIR)$(libdir)/libpulsedsp.la
rm -f $(DESTDIR)$(modlibexecdir)/*.la
 
 uninstall-hook:
-   rm -f $(DESTDIR)$(bindir)/parec
-   rm -f $(DESTDIR)$(bindir)/pamon
-   rm -f $(DESTDIR)$(bindir)/paplay
-   rm -f $(DESTDIR)$(bindir)/parecord
+   rm -f $(DESTDIR)$(bindir)/parec$(EXEEXT)
+   rm -f $(DESTDIR)$(bindir)/pamon$(EXEEXT)
+   rm -f $(DESTDIR)$(bindir)/paplay$(EXEEXT)
+   rm -f $(DESTDIR)$(bindir)/parecord$(EXEEXT)
rm -f $(DESTDIR)$(libdir)/libpulsedsp.*
rm -f $(DESTDIR)$(modlibexecdir)/*.so
 
-- 
1.7.1

___
pulseaudio-discuss mailing list
pulseaudio-discuss@mail.0pointer.de
https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss