Avoid using sed -i which seems to be non standard.
authorRafaël Carré <funman@videolan.org>
Mon, 17 Sep 2007 23:36:25 +0000 (23:36 +0000)
committerRafaël Carré <funman@videolan.org>
Mon, 17 Sep 2007 23:36:25 +0000 (23:36 +0000)
Use makensis when it's installed in the default location.
Patch by Hannes Domani

Makefile.am
modules/gui/qt4/Modules.am

index 070d80b..7b2a9e8 100644 (file)
@@ -746,8 +746,11 @@ package-win32-base-debug: package-win-common
                done; \
        done
        unix2dos $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg;
-       sed -i 's%share/osdmenu%osdmenu%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg
-       sed -i 's%/%\\%g' $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg 
+       for file in $(top_builddir)/vlc-${VERSION}/osdmenu/*.cfg; do \
+               if sed 's%share/osdmenu%osdmenu%g' $$file >$$file.tmp; then :; else exit 1; fi; \
+               if sed 's%/%\\%g' $$file.tmp >$$file; then :; else exit 1; fi; \
+               rm -f $$file.tmp; \
+       done
 
 
 package-win32-base: package-win32-base-debug package-win-common-strip
@@ -760,6 +763,8 @@ package-win32-base-exe: package-win32-base
            MAKENSIS="makensis -DVERSION=${VERSION}"; \
        elif [ -x "/cygdrive/c/Program Files/NSIS/makensis" ]; then \
            MAKENSIS="/cygdrive/c/Program\ Files/NSIS/makensis /DVERSION=${VERSION}"; \
+       elif [ -x "${PROGRAMFILES}/NSIS/makensis" ]; then \
+           MAKENSIS="${PROGRAMFILES}/NSIS/makensis -DVERSION=${VERSION}"; \
        elif wine --version >dev/null 2>&1; then \
            MAKENSIS="wine C:/Program\ Files/NSIS/makensis.exe /DVERSION=${VERSION}"; \
        else \
index cc899ab..581a382 100644 (file)
@@ -78,8 +78,8 @@ resources.cpp: res.qrc
        rm -f $@ $@.tmp
        echo "#define Q_(a,b) QString::fromUtf8(_(a))" > $@.tmp
        $(UIC) -tr "Q_" $< >> $@.tmp
-       sed -i -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp
-       mv -f $@.tmp $@
+       sed -e 's/Q_(\"_(\\\"\(.*\)\\\")"/Q_("\1"/' $@.tmp >$@
+       rm -f $@.tmp
 
 dialogs/help.cpp: dialogs/about.hpp