Browse Source

Bail out early when trying to compile styles without programs available.

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

3
configure.ac

@ -81,7 +81,6 @@ AC_SUBST(NODEJS)
AC_PATH_PROGS([SASS],[sass]) AC_PATH_PROGS([SASS],[sass])
if test x"${SASS}" == x"" ; then if test x"${SASS}" == x"" ; then
AC_MSG_WARN([Please install sass before trying to build spreed-webrtc.]) AC_MSG_WARN([Please install sass before trying to build spreed-webrtc.])
SASS=sass
else else
SASS_VERSION=`$SASS --version | $SED 's/^Sass //' | $SED 's/ .*//'` SASS_VERSION=`$SASS --version | $SED 's/^Sass //' | $SED 's/ .*//'`
AX_COMPARE_VERSION([$SASS_VERSION], [lt], [$SASS_VERSION_MIN], AX_COMPARE_VERSION([$SASS_VERSION], [lt], [$SASS_VERSION_MIN],
@ -92,7 +91,6 @@ AC_SUBST(SASS)
AC_PATH_PROGS([COMPASS],[compass]) AC_PATH_PROGS([COMPASS],[compass])
if test x"${COMPASS}" == x"" ; then if test x"${COMPASS}" == x"" ; then
AC_MSG_WARN([Please install compass before trying to build styles.]) AC_MSG_WARN([Please install compass before trying to build styles.])
COMPASS=compass
fi fi
AC_SUBST(COMPASS) AC_SUBST(COMPASS)
@ -110,7 +108,6 @@ AC_MSG_RESULT([ok])
AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer]) AC_PATH_PROGS([AUTOPREFIXER],[autoprefixer])
if test x"${AUTOPREFIXER}" == x"" ; then if test x"${AUTOPREFIXER}" == x"" ; then
AC_MSG_WARN([Please install autoprefixer before trying to build styles.]) AC_MSG_WARN([Please install autoprefixer before trying to build styles.])
AUTOPREFIXER=autoprefixer
fi fi
AC_SUBST(AUTOPREFIXER) AC_SUBST(AUTOPREFIXER)

2
src/styles/Makefile.am

@ -23,6 +23,8 @@ AUTOPREFIXER_BROWSER_SUPPORT := "> 1%, last 2 versions, Firefox ESR, Opera 12.1"
STATIC = ../../static STATIC = ../../static
styles: 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 $(MKDIR_P) $(STATIC)/css
$(SASS) --compass --scss $(SASSFLAGS) \ $(SASS) --compass --scss $(SASSFLAGS) \
$(CURDIR)/main.scss:$(STATIC)/css/main.min.css $(CURDIR)/main.scss:$(STATIC)/css/main.min.css

Loading…
Cancel
Save