sassc 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.gitmodules +3 -0
- data/.travis.yml +9 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +24 -0
- data/Rakefile +21 -0
- data/ext/libsass/.editorconfig +15 -0
- data/ext/libsass/.gitattributes +2 -0
- data/ext/libsass/.gitignore +61 -0
- data/ext/libsass/.travis.yml +38 -0
- data/ext/libsass/COPYING +25 -0
- data/ext/libsass/INSTALL +1 -0
- data/ext/libsass/LICENSE +25 -0
- data/ext/libsass/Makefile +223 -0
- data/ext/libsass/Makefile.am +145 -0
- data/ext/libsass/Readme.md +93 -0
- data/ext/libsass/appveyor.yml +76 -0
- data/ext/libsass/ast.cpp +581 -0
- data/ext/libsass/ast.hpp +1949 -0
- data/ext/libsass/ast_def_macros.hpp +16 -0
- data/ext/libsass/ast_factory.hpp +87 -0
- data/ext/libsass/ast_fwd_decl.hpp +72 -0
- data/ext/libsass/b64/cencode.h +32 -0
- data/ext/libsass/b64/encode.h +77 -0
- data/ext/libsass/backtrace.hpp +81 -0
- data/ext/libsass/base64vlq.cpp +43 -0
- data/ext/libsass/base64vlq.hpp +28 -0
- data/ext/libsass/bind.cpp +187 -0
- data/ext/libsass/bind.hpp +18 -0
- data/ext/libsass/cencode.c +102 -0
- data/ext/libsass/color_names.hpp +324 -0
- data/ext/libsass/configure.ac +130 -0
- data/ext/libsass/constants.cpp +144 -0
- data/ext/libsass/constants.hpp +145 -0
- data/ext/libsass/context.cpp +507 -0
- data/ext/libsass/context.hpp +150 -0
- data/ext/libsass/contextualize.cpp +157 -0
- data/ext/libsass/contextualize.hpp +65 -0
- data/ext/libsass/copy_c_str.cpp +13 -0
- data/ext/libsass/copy_c_str.hpp +5 -0
- data/ext/libsass/debug.hpp +39 -0
- data/ext/libsass/environment.hpp +75 -0
- data/ext/libsass/error_handling.cpp +28 -0
- data/ext/libsass/error_handling.hpp +28 -0
- data/ext/libsass/eval.cpp +1149 -0
- data/ext/libsass/eval.hpp +80 -0
- data/ext/libsass/expand.cpp +430 -0
- data/ext/libsass/expand.hpp +77 -0
- data/ext/libsass/extconf.rb +6 -0
- data/ext/libsass/extend.cpp +1962 -0
- data/ext/libsass/extend.hpp +50 -0
- data/ext/libsass/file.cpp +291 -0
- data/ext/libsass/file.hpp +18 -0
- data/ext/libsass/functions.cpp +1565 -0
- data/ext/libsass/functions.hpp +187 -0
- data/ext/libsass/inspect.cpp +727 -0
- data/ext/libsass/inspect.hpp +108 -0
- data/ext/libsass/json.cpp +1411 -0
- data/ext/libsass/json.hpp +117 -0
- data/ext/libsass/kwd_arg_macros.hpp +23 -0
- data/ext/libsass/m4/.gitkeep +0 -0
- data/ext/libsass/mapping.hpp +17 -0
- data/ext/libsass/memory_manager.hpp +54 -0
- data/ext/libsass/node.cpp +251 -0
- data/ext/libsass/node.hpp +122 -0
- data/ext/libsass/operation.hpp +153 -0
- data/ext/libsass/output_compressed.cpp +401 -0
- data/ext/libsass/output_compressed.hpp +95 -0
- data/ext/libsass/output_nested.cpp +364 -0
- data/ext/libsass/output_nested.hpp +108 -0
- data/ext/libsass/parser.cpp +2016 -0
- data/ext/libsass/parser.hpp +264 -0
- data/ext/libsass/paths.hpp +69 -0
- data/ext/libsass/position.hpp +22 -0
- data/ext/libsass/posix/getopt.c +562 -0
- data/ext/libsass/posix/getopt.h +95 -0
- data/ext/libsass/prelexer.cpp +688 -0
- data/ext/libsass/prelexer.hpp +513 -0
- data/ext/libsass/remove_placeholders.cpp +59 -0
- data/ext/libsass/remove_placeholders.hpp +43 -0
- data/ext/libsass/res/resource.rc +35 -0
- data/ext/libsass/sass.cpp +33 -0
- data/ext/libsass/sass.h +60 -0
- data/ext/libsass/sass2scss.cpp +834 -0
- data/ext/libsass/sass2scss.h +110 -0
- data/ext/libsass/sass_context.cpp +709 -0
- data/ext/libsass/sass_context.h +120 -0
- data/ext/libsass/sass_functions.cpp +137 -0
- data/ext/libsass/sass_functions.h +90 -0
- data/ext/libsass/sass_interface.cpp +277 -0
- data/ext/libsass/sass_interface.h +97 -0
- data/ext/libsass/sass_util.cpp +136 -0
- data/ext/libsass/sass_util.hpp +259 -0
- data/ext/libsass/sass_values.cpp +337 -0
- data/ext/libsass/sass_values.h +124 -0
- data/ext/libsass/script/bootstrap +10 -0
- data/ext/libsass/script/branding +10 -0
- data/ext/libsass/script/ci-build-libsass +72 -0
- data/ext/libsass/script/ci-install-compiler +4 -0
- data/ext/libsass/script/ci-install-deps +19 -0
- data/ext/libsass/script/ci-report-coverage +25 -0
- data/ext/libsass/script/coveralls-debug +32 -0
- data/ext/libsass/script/spec +5 -0
- data/ext/libsass/script/tap-driver +652 -0
- data/ext/libsass/script/tap-runner +1 -0
- data/ext/libsass/source_map.cpp +133 -0
- data/ext/libsass/source_map.hpp +46 -0
- data/ext/libsass/subset_map.hpp +145 -0
- data/ext/libsass/support/libsass.pc.in +11 -0
- data/ext/libsass/test-driver +127 -0
- data/ext/libsass/test/test_node.cpp +98 -0
- data/ext/libsass/test/test_paths.cpp +29 -0
- data/ext/libsass/test/test_selector_difference.cpp +28 -0
- data/ext/libsass/test/test_specificity.cpp +28 -0
- data/ext/libsass/test/test_subset_map.cpp +472 -0
- data/ext/libsass/test/test_superselector.cpp +71 -0
- data/ext/libsass/test/test_unification.cpp +33 -0
- data/ext/libsass/to_c.cpp +61 -0
- data/ext/libsass/to_c.hpp +44 -0
- data/ext/libsass/to_string.cpp +29 -0
- data/ext/libsass/to_string.hpp +32 -0
- data/ext/libsass/token.hpp +32 -0
- data/ext/libsass/units.cpp +54 -0
- data/ext/libsass/units.hpp +10 -0
- data/ext/libsass/utf8.h +34 -0
- data/ext/libsass/utf8/checked.h +327 -0
- data/ext/libsass/utf8/core.h +329 -0
- data/ext/libsass/utf8/unchecked.h +228 -0
- data/ext/libsass/utf8_string.cpp +102 -0
- data/ext/libsass/utf8_string.hpp +36 -0
- data/ext/libsass/util.cpp +189 -0
- data/ext/libsass/util.hpp +26 -0
- data/ext/libsass/win/libsass.filters +291 -0
- data/ext/libsass/win/libsass.sln +28 -0
- data/ext/libsass/win/libsass.vcxproj +255 -0
- data/lib/sassc.rb +6 -0
- data/lib/sassc/engine.rb +13 -0
- data/lib/sassc/native.rb +44 -0
- data/lib/sassc/native/native_context_api.rb +140 -0
- data/lib/sassc/native/native_functions_api.rb +41 -0
- data/lib/sassc/native/sass_input_style.rb +11 -0
- data/lib/sassc/native/sass_output_style.rb +10 -0
- data/lib/sassc/native/sass_value.rb +95 -0
- data/lib/sassc/native/string_list.rb +8 -0
- data/lib/sassc/version.rb +3 -0
- data/sassc.gemspec +43 -0
- data/test/smoke_test.rb +171 -0
- data/test/test_helper.rb +4 -0
- metadata +281 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: d92da7e90eda82d5dcd450f13935387b9ff38621
|
|
4
|
+
data.tar.gz: 666e1cdcc96323add6f8886f5b5c34d960f0c48b
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 52fa6623849c1ebd482b0d551f94653edcfb5c77e5a3efaca92781c37b846c0e0c44dca9cbbdbfd33558d250c87428aa8c862897a9007e2037b349439608cc14
|
|
7
|
+
data.tar.gz: 45aa0584e8625caf2db64e265753cbabc1b7b5a2003a446f3e2228f8db35ef29b7b8e0907a783b6d671ba5dd738a4854f9ba3f82d868a764e808fb57197ca367
|
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2015 Ryan Boland
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# SassC [](https://travis-ci.org/bolandrm/sassc)
|
|
2
|
+
|
|
3
|
+
TODO: Write a gem description
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
TODO: Write usage instructions here
|
|
8
|
+
|
|
9
|
+
## Contributing
|
|
10
|
+
|
|
11
|
+
### Project Setup
|
|
12
|
+
|
|
13
|
+
1. Clone repo
|
|
14
|
+
2. Install dependencies - `bundle install`
|
|
15
|
+
3. Initialize the libsass submodule - `bundle exec rake submodule`
|
|
16
|
+
4. Run the tests - `bundle exec rake test`
|
|
17
|
+
|
|
18
|
+
### Code Changes
|
|
19
|
+
|
|
20
|
+
1. Fork it ( https://github.com/[my-github-username]/sassc/fork )
|
|
21
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
22
|
+
3. Commit your changes (`git commit -am 'Add some feature'`) - try to include tests
|
|
23
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
24
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
|
2
|
+
|
|
3
|
+
task default: :prepare
|
|
4
|
+
|
|
5
|
+
task prepare: "ext/lib/libsass.so"
|
|
6
|
+
|
|
7
|
+
file "ext/lib/libsass.so" do
|
|
8
|
+
gem_dir = File.expand_path(File.dirname(__FILE__)) + "/"
|
|
9
|
+
cd "ext/libsass"
|
|
10
|
+
sh "make lib/libsass.so"
|
|
11
|
+
cd gem_dir
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
task test: :prepare do
|
|
15
|
+
$LOAD_PATH.unshift('lib', 'test')
|
|
16
|
+
Dir.glob('./test/**/*_test.rb') { |f| require f }
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
task :submodule do
|
|
20
|
+
sh "git submodule update --init"
|
|
21
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# This file is for unifying the coding style for different editors and IDEs
|
|
2
|
+
# editorconfig.org
|
|
3
|
+
|
|
4
|
+
root = true
|
|
5
|
+
|
|
6
|
+
[*]
|
|
7
|
+
charset = utf-8
|
|
8
|
+
trim_trailing_whitespace = true
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
indent_style = spaces
|
|
11
|
+
indent_size = 2
|
|
12
|
+
|
|
13
|
+
[{Makefile, Makefile.am}]
|
|
14
|
+
indent_style = tab
|
|
15
|
+
indent_size = 4
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Miscellaneous stuff
|
|
2
|
+
|
|
3
|
+
.DS_Store
|
|
4
|
+
.sass-cache
|
|
5
|
+
*.gem
|
|
6
|
+
*.gcno
|
|
7
|
+
.svn/*
|
|
8
|
+
.cproject
|
|
9
|
+
.project
|
|
10
|
+
.settings/
|
|
11
|
+
|
|
12
|
+
# Configuration stuff
|
|
13
|
+
|
|
14
|
+
Makefile.in
|
|
15
|
+
/aclocal.m4
|
|
16
|
+
/autom4te.cache/
|
|
17
|
+
/config.guess
|
|
18
|
+
/config.h
|
|
19
|
+
/config.h.in
|
|
20
|
+
/config.log
|
|
21
|
+
/config.status
|
|
22
|
+
/config.sub
|
|
23
|
+
/configure
|
|
24
|
+
/depcomp
|
|
25
|
+
/install-sh
|
|
26
|
+
/libtool
|
|
27
|
+
/ltmain.sh
|
|
28
|
+
/m4/libtool.m4
|
|
29
|
+
/m4/ltoptions.m4
|
|
30
|
+
/m4/ltsugar.m4
|
|
31
|
+
/m4/ltversion.m4
|
|
32
|
+
/m4/lt~obsolete.m4
|
|
33
|
+
/missing
|
|
34
|
+
/stamp-h1
|
|
35
|
+
src/Makefile
|
|
36
|
+
libsass/*
|
|
37
|
+
|
|
38
|
+
# Build stuff
|
|
39
|
+
|
|
40
|
+
*.o
|
|
41
|
+
*.lo
|
|
42
|
+
*.so
|
|
43
|
+
*.dll
|
|
44
|
+
*.a
|
|
45
|
+
a.out
|
|
46
|
+
libsass.js
|
|
47
|
+
|
|
48
|
+
bin/*
|
|
49
|
+
.deps/
|
|
50
|
+
.libs/
|
|
51
|
+
win/bin
|
|
52
|
+
|
|
53
|
+
# Final results
|
|
54
|
+
|
|
55
|
+
sassc++
|
|
56
|
+
libsass.la
|
|
57
|
+
support/libsass.pc
|
|
58
|
+
|
|
59
|
+
# Cloned testing dirs
|
|
60
|
+
sassc/
|
|
61
|
+
sass-spec/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
language: cpp
|
|
2
|
+
|
|
3
|
+
os:
|
|
4
|
+
- linux
|
|
5
|
+
# - osx
|
|
6
|
+
|
|
7
|
+
compiler:
|
|
8
|
+
- gcc
|
|
9
|
+
- clang
|
|
10
|
+
|
|
11
|
+
# don't create redundant code coverage reports
|
|
12
|
+
# - AUTOTOOLS=yes COVERAGE=yes BUILD=static
|
|
13
|
+
# - AUTOTOOLS=no COVERAGE=yes BUILD=shared
|
|
14
|
+
# - AUTOTOOLS=no COVERAGE=no BUILD=static
|
|
15
|
+
|
|
16
|
+
# further speed up day by day travis-ci builds
|
|
17
|
+
# re-enable this if you change the makefiles
|
|
18
|
+
# this will still catch all coding errors!
|
|
19
|
+
# - AUTOTOOLS=no COVERAGE=no BUILD=shared
|
|
20
|
+
# - AUTOTOOLS=yes COVERAGE=no BUILD=static
|
|
21
|
+
|
|
22
|
+
env:
|
|
23
|
+
- AUTOTOOLS=no COVERAGE=yes BUILD=static
|
|
24
|
+
- AUTOTOOLS=yes COVERAGE=no BUILD=shared
|
|
25
|
+
|
|
26
|
+
# currenty there are various issues when
|
|
27
|
+
# built with coverage, clang and autotools
|
|
28
|
+
# - AUTOTOOLS=yes COVERAGE=yes BUILD=shared
|
|
29
|
+
|
|
30
|
+
matrix:
|
|
31
|
+
exclude:
|
|
32
|
+
- compiler: clang
|
|
33
|
+
env: AUTOTOOLS=yes COVERAGE=yes BUILD=static
|
|
34
|
+
|
|
35
|
+
script: ./script/ci-build-libsass
|
|
36
|
+
before_install: ./script/ci-install-deps
|
|
37
|
+
install: ./script/ci-install-compiler
|
|
38
|
+
after_success: ./script/ci-report-coverage
|
data/ext/libsass/COPYING
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright (C) 2012 by Hampton Catlin
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
5
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
the Software without restriction, including without limitation the rights to
|
|
7
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
8
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
9
|
+
so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
The following files in the spec were taken from the original Ruby Sass project which
|
|
24
|
+
is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under
|
|
25
|
+
the same license.
|
data/ext/libsass/INSTALL
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
// Autotools requires us to have this file. Boo.
|
data/ext/libsass/LICENSE
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
Copyright (C) 2012 by Hampton Catlin
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
5
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
6
|
+
the Software without restriction, including without limitation the rights to
|
|
7
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
8
|
+
of the Software, and to permit persons to whom the Software is furnished to do
|
|
9
|
+
so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
The following files in the spec were taken from the original Ruby Sass project which
|
|
24
|
+
is copyright Hampton Catlin, Nathan Weizenbaum, and Chris Eppstein and under
|
|
25
|
+
the same license.
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
CC ?= gcc
|
|
2
|
+
CXX ?= g++
|
|
3
|
+
RM ?= rm -f
|
|
4
|
+
CP ?= cp -a
|
|
5
|
+
MKDIR ?= mkdir -p
|
|
6
|
+
WINDRES ?= windres
|
|
7
|
+
CFLAGS ?= -Wall -O2
|
|
8
|
+
CXXFLAGS ?= -Wall -O2
|
|
9
|
+
LDFLAGS ?= -Wall -O2
|
|
10
|
+
|
|
11
|
+
ifneq (,$(findstring /cygdrive/,$(PATH)))
|
|
12
|
+
UNAME := Cygwin
|
|
13
|
+
else
|
|
14
|
+
ifneq (,$(findstring WINDOWS,$(PATH)))
|
|
15
|
+
UNAME := Windows
|
|
16
|
+
else
|
|
17
|
+
ifneq (,$(findstring mingw32,$(MAKE)))
|
|
18
|
+
UNAME := MinGW
|
|
19
|
+
else
|
|
20
|
+
UNAME := $(shell uname -s)
|
|
21
|
+
endif
|
|
22
|
+
endif
|
|
23
|
+
endif
|
|
24
|
+
|
|
25
|
+
ifeq "$(LIBSASS_VERSION)" ""
|
|
26
|
+
ifneq "$(wildcard ./.git/ )" ""
|
|
27
|
+
LIBSASS_VERSION ?= $(shell git describe --abbrev=4 --dirty --always --tags)
|
|
28
|
+
endif
|
|
29
|
+
endif
|
|
30
|
+
|
|
31
|
+
ifneq "$(LIBSASS_VERSION)" ""
|
|
32
|
+
CFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
|
|
33
|
+
CXXFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
|
|
34
|
+
endif
|
|
35
|
+
|
|
36
|
+
# enable mandatory flag
|
|
37
|
+
ifeq (MinGW,$(UNAME))
|
|
38
|
+
CXXFLAGS += -std=gnu++0x
|
|
39
|
+
LDFLAGS += -std=gnu++0x
|
|
40
|
+
else
|
|
41
|
+
CXXFLAGS += -std=c++0x
|
|
42
|
+
LDFLAGS += -std=c++0x
|
|
43
|
+
endif
|
|
44
|
+
|
|
45
|
+
ifneq "$(SASS_LIBSASS_PATH)" ""
|
|
46
|
+
CFLAGS += -I $(SASS_LIBSASS_PATH)
|
|
47
|
+
CXXFLAGS += -I $(SASS_LIBSASS_PATH)
|
|
48
|
+
endif
|
|
49
|
+
|
|
50
|
+
ifneq "$(EXTRA_CFLAGS)" ""
|
|
51
|
+
CFLAGS += $(EXTRA_CFLAGS)
|
|
52
|
+
endif
|
|
53
|
+
ifneq "$(EXTRA_CXXFLAGS)" ""
|
|
54
|
+
CXXFLAGS += $(EXTRA_CXXFLAGS)
|
|
55
|
+
endif
|
|
56
|
+
ifneq "$(EXTRA_LDFLAGS)" ""
|
|
57
|
+
LDFLAGS += $(EXTRA_LDFLAGS)
|
|
58
|
+
endif
|
|
59
|
+
|
|
60
|
+
LDLIBS = -lstdc++ -lm
|
|
61
|
+
ifeq ($(UNAME),Darwin)
|
|
62
|
+
CFLAGS += -stdlib=libc++
|
|
63
|
+
CXXFLAGS += -stdlib=libc++
|
|
64
|
+
LDFLAGS += -stdlib=libc++
|
|
65
|
+
endif
|
|
66
|
+
|
|
67
|
+
ifneq ($(BUILD),shared)
|
|
68
|
+
BUILD = static
|
|
69
|
+
endif
|
|
70
|
+
|
|
71
|
+
ifeq (,$(PREFIX))
|
|
72
|
+
ifeq (,$(TRAVIS_BUILD_DIR))
|
|
73
|
+
PREFIX = /usr/local
|
|
74
|
+
else
|
|
75
|
+
PREFIX = $(TRAVIS_BUILD_DIR)
|
|
76
|
+
endif
|
|
77
|
+
endif
|
|
78
|
+
|
|
79
|
+
SASS_SASSC_PATH ?= sassc
|
|
80
|
+
SASS_SPEC_PATH ?= sass-spec
|
|
81
|
+
SASS_SPEC_SPEC_DIR ?= spec
|
|
82
|
+
SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc
|
|
83
|
+
RUBY_BIN = ruby
|
|
84
|
+
|
|
85
|
+
ifeq (MinGW,$(UNAME))
|
|
86
|
+
SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc.exe
|
|
87
|
+
endif
|
|
88
|
+
ifeq (Windows,$(UNAME))
|
|
89
|
+
SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc.exe
|
|
90
|
+
endif
|
|
91
|
+
|
|
92
|
+
SOURCES = \
|
|
93
|
+
ast.cpp \
|
|
94
|
+
base64vlq.cpp \
|
|
95
|
+
bind.cpp \
|
|
96
|
+
constants.cpp \
|
|
97
|
+
context.cpp \
|
|
98
|
+
contextualize.cpp \
|
|
99
|
+
copy_c_str.cpp \
|
|
100
|
+
error_handling.cpp \
|
|
101
|
+
eval.cpp \
|
|
102
|
+
expand.cpp \
|
|
103
|
+
extend.cpp \
|
|
104
|
+
file.cpp \
|
|
105
|
+
functions.cpp \
|
|
106
|
+
inspect.cpp \
|
|
107
|
+
node.cpp \
|
|
108
|
+
json.cpp \
|
|
109
|
+
output_compressed.cpp \
|
|
110
|
+
output_nested.cpp \
|
|
111
|
+
parser.cpp \
|
|
112
|
+
prelexer.cpp \
|
|
113
|
+
remove_placeholders.cpp \
|
|
114
|
+
sass.cpp \
|
|
115
|
+
sass_util.cpp \
|
|
116
|
+
sass_values.cpp \
|
|
117
|
+
sass_context.cpp \
|
|
118
|
+
sass_functions.cpp \
|
|
119
|
+
sass_interface.cpp \
|
|
120
|
+
sass2scss.cpp \
|
|
121
|
+
source_map.cpp \
|
|
122
|
+
to_c.cpp \
|
|
123
|
+
to_string.cpp \
|
|
124
|
+
units.cpp \
|
|
125
|
+
utf8_string.cpp \
|
|
126
|
+
util.cpp
|
|
127
|
+
|
|
128
|
+
CSOURCES = cencode.c
|
|
129
|
+
|
|
130
|
+
RESOURCES =
|
|
131
|
+
|
|
132
|
+
LIBRARIES = lib/libsass.so
|
|
133
|
+
|
|
134
|
+
ifeq (MinGW,$(UNAME))
|
|
135
|
+
ifeq (shared,$(BUILD))
|
|
136
|
+
CFLAGS += -D ADD_EXPORTS
|
|
137
|
+
CXXFLAGS += -D ADD_EXPORTS
|
|
138
|
+
LIBRARIES += lib/libsass.dll
|
|
139
|
+
RESOURCES += res/resource.rc
|
|
140
|
+
endif
|
|
141
|
+
else
|
|
142
|
+
CFLAGS += -fPIC
|
|
143
|
+
CXXFLAGS += -fPIC
|
|
144
|
+
LDFLAGS += -fPIC
|
|
145
|
+
endif
|
|
146
|
+
|
|
147
|
+
OBJECTS = $(SOURCES:.cpp=.o)
|
|
148
|
+
COBJECTS = $(CSOURCES:.c=.o)
|
|
149
|
+
RCOBJECTS = $(RESOURCES:.rc=.o)
|
|
150
|
+
|
|
151
|
+
DEBUG_LVL ?= NONE
|
|
152
|
+
|
|
153
|
+
all: $(BUILD)
|
|
154
|
+
|
|
155
|
+
debug: $(BUILD)
|
|
156
|
+
|
|
157
|
+
debug-static: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
|
|
158
|
+
debug-static: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
|
|
159
|
+
debug-static: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
|
|
160
|
+
debug-static: static
|
|
161
|
+
|
|
162
|
+
debug-shared: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
|
|
163
|
+
debug-shared: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
|
|
164
|
+
debug-shared: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
|
|
165
|
+
debug-shared: shared
|
|
166
|
+
|
|
167
|
+
static: lib/libsass.a
|
|
168
|
+
shared: $(LIBRARIES)
|
|
169
|
+
|
|
170
|
+
lib/libsass.a: $(COBJECTS) $(OBJECTS)
|
|
171
|
+
$(MKDIR) lib
|
|
172
|
+
$(AR) rcvs $@ $(COBJECTS) $(OBJECTS)
|
|
173
|
+
|
|
174
|
+
lib/libsass.so: $(COBJECTS) $(OBJECTS)
|
|
175
|
+
$(MKDIR) lib
|
|
176
|
+
$(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(LDLIBS)
|
|
177
|
+
|
|
178
|
+
lib/libsass.dll: $(COBJECTS) $(OBJECTS) $(RCOBJECTS)
|
|
179
|
+
$(MKDIR) lib
|
|
180
|
+
$(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(RCOBJECTS) $(LDLIBS) -s -Wl,--subsystem,windows,--out-implib,lib/libsass.a
|
|
181
|
+
|
|
182
|
+
%.o: %.c
|
|
183
|
+
$(CC) $(CFLAGS) -c -o $@ $<
|
|
184
|
+
|
|
185
|
+
%.o: %.rc
|
|
186
|
+
$(WINDRES) -i $< -o $@
|
|
187
|
+
|
|
188
|
+
%.o: %.cpp
|
|
189
|
+
$(CXX) $(CXXFLAGS) -c -o $@ $<
|
|
190
|
+
|
|
191
|
+
%: %.o static
|
|
192
|
+
$(CXX) $(CXXFLAGS) -o $@ $+ $(LDFLAGS) $(LDLIBS)
|
|
193
|
+
|
|
194
|
+
install: install-$(BUILD)
|
|
195
|
+
|
|
196
|
+
install-static: lib/libsass.a
|
|
197
|
+
$(MKDIR) $(DESTDIR)$(PREFIX)\/lib/
|
|
198
|
+
install -pm0755 $< $(DESTDIR)$(PREFIX)/$<
|
|
199
|
+
|
|
200
|
+
install-shared: lib/libsass.so
|
|
201
|
+
$(MKDIR) $(DESTDIR)$(PREFIX)\/lib/
|
|
202
|
+
install -pm0755 $< $(DESTDIR)$(PREFIX)/$<
|
|
203
|
+
|
|
204
|
+
$(SASSC_BIN): $(BUILD)
|
|
205
|
+
cd $(SASS_SASSC_PATH) && $(MAKE)
|
|
206
|
+
|
|
207
|
+
sassc: $(SASSC_BIN)
|
|
208
|
+
$(SASSC_BIN) -v
|
|
209
|
+
|
|
210
|
+
test: $(SASSC_BIN)
|
|
211
|
+
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
|
|
212
|
+
|
|
213
|
+
test_build: $(SASSC_BIN)
|
|
214
|
+
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) -s --ignore-todo $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
|
|
215
|
+
|
|
216
|
+
test_issues: $(SASSC_BIN)
|
|
217
|
+
$(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) $(LOG_FLAGS) $(SASS_SPEC_PATH)/spec/issues
|
|
218
|
+
|
|
219
|
+
clean:
|
|
220
|
+
$(RM) $(RCOBJECTS) $(COBJECTS) $(OBJECTS) $(LIBRARIES) lib/*.a lib/*.so lib/*.dll lib/*.la
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
.PHONY: all debug debug-static debug-shared static shared install install-static install-shared sassc clean
|