From ac545c8ce4cf55051ca41143d77773ffa884864a Mon Sep 17 00:00:00 2001 From: Joachim Bauch Date: Mon, 30 Jun 2014 12:42:21 +0200 Subject: [PATCH] Bail out early when trying to compile styles without programs available. --- configure.ac | 3 --- src/styles/Makefile.am | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 453f3b52..7df51284 100644 --- a/configure.ac +++ b/configure.ac @@ -81,7 +81,6 @@ AC_SUBST(NODEJS) AC_PATH_PROGS([SASS],[sass]) if test x"${SASS}" == x"" ; then AC_MSG_WARN([Please install sass before trying to build spreed-webrtc.]) - SASS=sass else SASS_VERSION=`$SASS --version | $SED 's/^Sass //' | $SED 's/ .*//'` AX_COMPARE_VERSION([$SASS_VERSION], [lt], [$SASS_VERSION_MIN], @@ -92,7 +91,6 @@ AC_SUBST(SASS) AC_PATH_PROGS([COMPASS],[compass]) if test x"${COMPASS}" == x"" ; then AC_MSG_WARN([Please install compass before trying to build styles.]) - COMPASS=compass fi AC_SUBST(COMPASS) @@ -110,7 +108,6 @@ AC_MSG_RESULT([ok]) AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer]) if test x"${AUTOPREFIXER}" == x"" ; then AC_MSG_WARN([Please install autoprefixer before trying to build styles.]) - AUTOPREFIXER=autoprefixer fi AC_SUBST(AUTOPREFIXER) diff --git a/src/styles/Makefile.am b/src/styles/Makefile.am index 4caed3d7..b3d16516 100644 --- a/src/styles/Makefile.am +++ b/src/styles/Makefile.am @@ -23,6 +23,8 @@ AUTOPREFIXER_BROWSER_SUPPORT := "> 1%, last 2 versions, Firefox ESR, Opera 12.1" STATIC = ../../static styles: + @if [ "$(SASS)" = "" ]; then echo "Command 'sass' not found, required when building styles"; exit 1; fi + @if [ "$(AUTOPREFIXER)" = "" ]; then echo "Command 'autoprefixer' not found, required when building styles"; exit 1; fi $(MKDIR_P) $(STATIC)/css $(SASS) --compass --scss $(SASSFLAGS) \ $(CURDIR)/main.scss:$(STATIC)/css/main.min.css