From 4c747e4b375949d1874c68d82dd990b76244f667 Mon Sep 17 00:00:00 2001
From: Damien Fouilleul <damienf@videolan.org>
Date: Wed, 14 Dec 2005 13:53:36 +0000
Subject: [PATCH] Makefile.am: target 'package-win32-base-exe' is now a bit
 smarter when looking for makensis, which also cover cygwin. Hence, target
 'package-win32-base-exe-cygwin' is now redundant

---
 Makefile.am | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 6dfa465f4d..1f9d5c84a0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -905,13 +905,19 @@ endif
 
 package-win32-base-exe:
 # Create package
-	wine C:/Program\ Files/NSIS/makensis.exe \
-             /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
+	if [ -x makensis ]; then \
+	    MAKENSIS=makensis; \
+	elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
+	    MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis"; \
+	elif [ -x wine ]; then \
+	    MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe"; \
+	else \
+	    echo 'Error: cannot locate makensis tool'; exit 1; \
+	fi; \
+	eval "$$MAKENSIS /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi"
 
-package-win32-base-exe-cygwin:
+package-win32-base-exe-cygwin: package-win32-base-exe
 # Create package
-	C:/Program\ Files/NSIS/makensis.exe \
-             /DVERSION=${VERSION} $(top_builddir)/vlc-${VERSION}/vlc.win32.nsi
 
 package-win32-base-exe-linux:
 # Create package
-- 
2.25.4