[vlc-commits] Simplify MAKE detection and ./compile creation

Rafaël Carré git at videolan.org
Mon Jan 30 18:43:18 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Thu Jan  5 21:42:27 2012 -0500| [56b900c0b93dbd084cb32e00dd6dc21c411119df] | committer: Rémi Denis-Courmont

Simplify MAKE detection and ./compile creation

Clarify what ./compile does
(cherry picked from commit 468e5ea3ff71fd453a2c0b05e4f5f90597226f27)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=56b900c0b93dbd084cb32e00dd6dc21c411119df
---

 configure.ac |   30 ++++++++++++++++++------------
 1 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8a139d7..d1dff8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4306,21 +4306,27 @@ dnl Generate makefiles
 AC_OUTPUT
 
 dnl Do we have to use make or gmake ?
-USE_MAKE_OR_GMAKE=`case "${SYS}" in openbsd*) echo "gmake";; *) echo "make";; esac`
+if make --version 2>&1|grep -q GNU
+then
+    # GNU make, all seems good
+    MAKE=make
+else
+    # Known GNU make alias (on BSD)
+    MAKE=gmake
+fi
 dnl Shortcut to nice compile message
-rm -f compile
 if test -n $SHELL; then
   SHELL=${CONFIG_SHELL-/bin/sh}
 fi
-echo '#! '$SHELL >compile
-echo rm -f .error\$\$ >>compile
-echo ERROR=0 >>compile
-echo export PATH=$PATH LANG=C >>compile
-echo "($USE_MAKE_OR_GMAKE V=1 \$@ 2>&1 || touch .error\$\$)| \\" >>compile
-echo '`sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl' >>compile
-echo test -f .error\$\$ \&\& ERROR=1 >>compile
-echo rm -f .error\$\$ >>compile
-echo exit \$ERROR >>compile
+rm -f compile
+echo "#! $SHELL
+rm -f .error\$\$
+ERROR=0
+export PATH=\"$PATH\" LANG=C
+($MAKE V=1 \$@ 2>&1 || touch .error\$\$)| `sed -ne "s/^top_srcdir *= *//p" < Makefile`/extras/buildsystem/make.pl
+test -f .error\$\$ \&\& ERROR=1
+rm -f .error\$\$
+exit \$ERROR" >compile
 chmod a+x compile
 
 echo "
@@ -4336,4 +4342,4 @@ else
 echo "build vlc executable  : no"
 fi
 echo "
-To build vlc and its plugins, type \`./compile' or \`$USE_MAKE_OR_GMAKE'."
+To build vlc and its plugins, type \`$MAKE', or \`./compile' if you like nice colors."



More information about the vlc-commits mailing list