Browse Source

Don't try to build styles if versions of node.js/sass are too low.

pull/54/head
Joachim Bauch 11 years ago
parent
commit
025f694835
  1. 9
      configure.ac
  2. 2
      src/styles/Makefile.am

9
configure.ac

@ -74,9 +74,11 @@ else @@ -74,9 +74,11 @@ else
AX_COMPARE_VERSION([$NODEJS_VERSION], [lt], [$NODEJS_VERSION_MIN],
[AC_MSG_ERROR([Please install node.js $NODEJS_VERSION_MIN or newer before trying to build spreed-webrtc (found node.js $NODEJS_VERSION).])])
AX_COMPARE_VERSION([$NODEJS_VERSION], [lt], [$NODEJS_VERSION_STYLES_MIN],
[AC_MSG_WARN([Please install node.js NODEJS_VERSION_STYLES_MIN or newer before trying to build styles (found node.js $NODEJS_VERSION).])])
[AC_MSG_WARN([Please install node.js NODEJS_VERSION_STYLES_MIN or newer before trying to build styles (found node.js $NODEJS_VERSION).])
NODEJS_SUPPORT_STYLES=no],[NODEJS_SUPPORT_STYLES=yes])
fi
AC_SUBST(NODEJS)
AC_SUBST(NODEJS_SUPPORT_STYLES)
AC_PATH_PROGS([SASS],[sass])
if test x"${SASS}" == x"" ; then
@ -84,7 +86,8 @@ if test x"${SASS}" == x"" ; then @@ -84,7 +86,8 @@ if test x"${SASS}" == x"" ; then
else
SASS_VERSION=`$SASS --version | $SED 's/^Sass //' | $SED 's/ .*//'`
AX_COMPARE_VERSION([$SASS_VERSION], [lt], [$SASS_VERSION_MIN],
[AC_MSG_WARN([Please install sass $SASS_VERSION_MIN or newer before trying to build styles (found sass $SASS_VERSION).])])
[AC_MSG_WARN([Please install sass $SASS_VERSION_MIN or newer before trying to build styles (found sass $SASS_VERSION).])
SASS_SUPPORT_STYLES=no],[SASS_SUPPORT_STYLES=yes])
fi
AC_SUBST(SASS)
@ -103,9 +106,11 @@ if test x"${SASS}" != x"" ; then @@ -103,9 +106,11 @@ if test x"${SASS}" != x"" ; then
if test x"${sass_compass}" != x"0" ; then
AC_MSG_RESULT([not available])
AC_MSG_WARN([Please install compass so it can be used using "sass --compass ...".])
SASS_SUPPORT_STYLES=no
fi
AC_MSG_RESULT([ok])
fi
AC_SUBST(SASS_SUPPORT_STYLES)
AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer])
if test x"${AUTOPREFIXER}" == x"" ; then

2
src/styles/Makefile.am

@ -25,6 +25,8 @@ STATIC = ../../static @@ -25,6 +25,8 @@ 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
@if [ "$(NODEJS_SUPPORT_STYLES)" = "no" ]; then echo "Your version of node.js does not support building styles"; exit 1; fi
@if [ "$(SASS_SUPPORT_STYLES)" = "no" ]; then echo "Your version of sass does not support building styles"; exit 1; fi
$(MKDIR_P) $(STATIC)/css
$(SASS) --compass --scss $(SASSFLAGS) \
$(CURDIR)/main.scss:$(STATIC)/css/main.min.css

Loading…
Cancel
Save