Blame docs/build-with-makefiles.md

Packit Service 7770af
### Get the sources
Packit Service 7770af
```bash
Packit Service 7770af
# using git is preferred
Packit Service 7770af
git clone https://github.com/sass/libsass.git
Packit Service 7770af
# only needed for sassc and/or testsuite
Packit Service 7770af
git clone https://github.com/sass/sassc.git libsass/sassc
Packit Service 7770af
git clone https://github.com/sass/sass-spec.git libsass/sass-spec
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
### Decide for static or shared library
Packit Service 7770af
Packit Service 7770af
`libsass` can be built and linked as a `static` or as a `shared` library. The default is `static`. To change it you can set the `BUILD` environment variable:
Packit Service 7770af
Packit Service 7770af
```bash
Packit Service 7770af
export BUILD="shared"
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
Alternatively you can also define it directly when calling make:
Packit Service 7770af
Packit Service 7770af
```bash
Packit Service 7770af
BUILD="shared" make ...
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
### Compile the library
Packit Service 7770af
```bash
Packit Service 7770af
make -C libsass -j5
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
### Results can be found in
Packit Service 7770af
```bash
Packit Service 7770af
$ ls libsass/lib
Packit Service 7770af
libsass.a libsass.so
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
### Install onto the system
Packit Service 7770af
Packit Service 7770af
We recommend to use [autotools to install](build-with-autotools.md) libsass onto the
Packit Service 7770af
system, since that brings all the benefits of using libtools as the main install method.
Packit Service 7770af
If you still want to install libsass via the makefile, you need to make sure that gnu
Packit Service 7770af
`install` utility (or compatible) is installed on your system.
Packit Service 7770af
```bash
Packit Service 7770af
yum install coreutils # RedHat Linux
Packit Service 7770af
emerge -a coreutils # Gentoo Linux
Packit Service 7770af
pkgin install coreutils # SmartOS
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
You can set the install location by setting `PREFIX`
Packit Service 7770af
```bash
Packit Service 7770af
PREFIX="/opt/local" make install
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
Packit Service 7770af
### Compling sassc
Packit Service 7770af
Packit Service 7770af
```bash
Packit Service 7770af
# Let build know library location
Packit Service 7770af
export SASS_LIBSASS_PATH="`pwd`/libsass"
Packit Service 7770af
# Invokes the sassc makefile
Packit Service 7770af
make -C libsass -j5 sassc
Packit Service 7770af
```
Packit Service 7770af
Packit Service 7770af
### Run the spec test-suite
Packit Service 7770af
Packit Service 7770af
```bash
Packit Service 7770af
# needs ruby available
Packit Service 7770af
# also gem install minitest
Packit Service 7770af
make -C libsass -j5 test_build
Packit Service 7770af
```