Sha256: 986cd50f05cb618562df55a7d4ebe9bf1e75df49e0afe00497acd04f665b3899

Contents?: true

Size: 1.95 KB

Versions: 1

Compression:

Stored size: 1.95 KB

Contents

#!/bin/bash

set -e

script/bootstrap

# export this path right here (was in script/spec before)
export SASS_LIBSASS_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/../ && pwd )"

# use some defaults if not running under travis ci
if [ "x$TRAVIS_BUILD_DIR" == "x" ]; then export TRAVIS_BUILD_DIR=$(pwd)/build; fi
if [ "x$SASS_SASSC_PATH" == "x" ]; then export SASS_SASSC_PATH=$(pwd)/sassc; fi
if [ "x$SASS_SPEC_PATH" == "x" ]; then export SASS_SPEC_PATH=$(pwd)/sass-spec; fi

if [ "x$COVERAGE" == "xyes" ]; then
  COVERAGE_OPT="--enable-coverage"
  export EXTRA_CFLAGS="-O0 --coverage"
  export EXTRA_CXXFLAGS="-O0 --coverage"
  export EXTRA_LDFLAGS="-O0 --coverage"
else
  COVERAGE_OPT="--disable-coverage"
fi

if [ "x$BUILD" == "xstatic" ]; then
  SHARED_OPT="--disable-shared --enable-static"
  MAKE_TARGET="static"
else
  # Makefile of sassc wants to link to static
  SHARED_OPT="--enable-shared --enable-static"
  MAKE_TARGET="shared"
fi

if [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then
  MAKE_OPTS="$MAKE_OPTS -j1 V=1"
else
  MAKE_OPTS="$MAKE_OPTS -j3 V=1"
fi

if [ "x$AUTOTOOLS" == "xyes" ]; then

  echo -en 'travis_fold:start:configure\r'
  autoreconf --force --install
  ./configure --enable-tests $COVERAGE_OPT \
    --prefix=build \
    --disable-silent-rules \
    --with-sassc-dir=$SASS_SASSC_PATH \
    --with-sass-spec-dir=$SASS_SPEC_PATH \
    --prefix=$TRAVIS_BUILD_DIR \
    ${SHARED_OPT}
  echo -en 'travis_fold:end:configure\r'

  make clean

  make $MAKE_OPTS install

  if [ -d build/lib ]; then
    mkdir -p lib
    cp -a build/lib/* lib/
  fi

else

  make clean

  # does what $BUILD says
  make $MAKE_OPTS

  # sassc has static as dep
  make $MAKE_OPTS $SASS_SASSC_PATH/bin/sassc

fi

echo successfully compiled libsass
echo AUTOTOOLS=$AUTOTOOLS COVERAGE=$COVERAGE BUILD=$BUILD

if [ "x$PREFIX" == "x" ]; then
	if [ "x$TRAVIS_BUILD_DIR" == "x" ]; then
		PREFIX=/usr/local
	else
		PREFIX=$TRAVIS_BUILD_DIR
	fi
fi

LD_LIBRARY_PATH="$PREFIX/lib/" script/spec

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sassc-0.0.10 ext/libsass/script/ci-build-libsass