diff --git a/Makefile b/Makefile index 85f5eb307b..9e8c76eff2 100644 --- a/Makefile +++ b/Makefile @@ -131,7 +131,10 @@ ifneq (Windows,$(UNAME)) endif ifneq ($(BUILD),shared) - BUILD = static + BUILD := static +endif +ifeq ($(DEBUG),1) + BUILD := debug-$(BUILD) endif ifeq (,$(TRAVIS_BUILD_DIR)) diff --git a/Readme.md b/Readme.md index a8f7019feb..3eaa63a598 100644 --- a/Readme.md +++ b/Readme.md @@ -48,6 +48,12 @@ Since LibSass is a pure library, tests are run through the [SassSpec](https://gi To run tests against LibSass while developing, you can run `./script/spec`. This will clone SassC and Sass-Spec under the project folder and then run the Sass-Spec test suite. You may want to update the clones to ensure you have the latest version. +### DEBUG builds + +Set the environment variable `DEBUG` to `1` to enable debug builds that can be debugged +with `gdb`, `lldb` and others. E.g.: use `$ DEBUG=1 ./script/spec` to run the tests with +a debug build. + Library Usage -------------