sassc 2.1.0.pre1 → 2.1.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,25 +0,0 @@
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.
@@ -1,72 +0,0 @@
1
- ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4 -I script
2
-
3
- AM_COPT = -Wall -O2
4
- AM_COVLDFLAGS =
5
-
6
- if ENABLE_COVERAGE
7
- AM_COPT = -Wall -O1 -fno-omit-frame-pointer --coverage
8
- AM_COVLDFLAGS += -lgcov
9
- endif
10
-
11
- AM_CPPFLAGS = -I$(top_srcdir)/include
12
- AM_CFLAGS = $(AM_COPT)
13
- AM_CXXFLAGS = $(AM_COPT)
14
- AM_LDFLAGS = $(AM_COPT) $(AM_COVLDFLAGS)
15
-
16
- # only needed to support old source tree
17
- # we have moved the files to src folder
18
- AM_CPPFLAGS += -I$(top_srcdir)
19
-
20
- RESOURCES =
21
- AM_CXXFLAGS += -std=c++11
22
- if COMPILER_IS_MINGW32
23
- RESOURCES += res/libsass.rc
24
- endif
25
-
26
- TEST_EXTENSIONS = .rb
27
-
28
- if ENABLE_TESTS
29
-
30
- SASS_SASSC_PATH ?= $(top_srcdir)/sassc
31
- SASS_SPEC_PATH ?= $(top_srcdir)/sass-spec
32
-
33
- noinst_PROGRAMS = tester
34
- tester_LDADD = src/libsass.la
35
- tester_LDFLAGS = $(AM_LDFLAGS)
36
- nodist_tester_SOURCES = $(SASS_SASSC_PATH)/sassc.c
37
- SASS_SASSC_VERSION ?= `cd "$(SASS_SASSC_PATH)" && ./version.sh`
38
- tester_CFLAGS = $(AM_CFLAGS) -DSASSC_VERSION="\"$(SASS_SASSC_VERSION)\""
39
- tester_CXXFLAGS = $(AM_CXXFLAGS) -DSASSC_VERSION="\"$(SASS_SASSC_VERSION)\""
40
-
41
- if ENABLE_COVERAGE
42
- nodist_EXTRA_tester_SOURCES = non-existent-file-to-force-CXX-linking.cxx
43
- endif
44
-
45
- TESTS = $(SASS_SPEC_PATH)/sass-spec.rb
46
- RB_LOG_COMPILER = ./script/tap-runner
47
- AM_RB_LOG_FLAGS = $(RUBY)
48
-
49
- SASS_TEST_FLAGS = --impl libsass
50
- SASS_TEST_FLAGS += -r $(SASS_SPEC_PATH)
51
- SASS_TEST_FLAGS += -c $(top_srcdir)/tester$(EXEEXT)
52
- AM_TESTS_ENVIRONMENT = TEST_FLAGS='$(SASS_TEST_FLAGS)'
53
-
54
- SASS_TESTER = $(RUBY) $(SASS_SPEC_PATH)/sass-spec.rb
55
-
56
- test:
57
- $(SASS_TESTER) $(SASS_TEST_FLAGS)
58
-
59
- test_build:
60
- $(SASS_TESTER) $(SASS_TEST_FLAGS)
61
-
62
- test_full:
63
- $(SASS_TESTER) --run-todo $(SASS_TEST_FLAGS)
64
-
65
- test_probe:
66
- $(SASS_TESTER) --probe-todo $(SASS_TEST_FLAGS)
67
-
68
- .PHONY: test test_build test_full test_probe
69
-
70
- endif
71
-
72
- SUBDIRS = src
@@ -1 +0,0 @@
1
- // Autotools requires us to have this file. Boo.
@@ -1,25 +0,0 @@
1
-
2
- Copyright (C) 2012-2016 by the Sass Open Source Foundation
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.
@@ -1,316 +0,0 @@
1
- OS ?= $(shell uname -s)
2
- CC ?= cc
3
- CXX ?= c++
4
- RM ?= rm -f
5
- CP ?= cp -a
6
- MKDIR ?= mkdir
7
- RMDIR ?= rmdir
8
- WINDRES ?= windres
9
- # Solaris/Illumos flavors
10
- # ginstall from coreutils
11
- ifeq ($(OS),SunOS)
12
- INSTALL ?= ginstall
13
- endif
14
- INSTALL ?= install
15
- CFLAGS ?= -Wall
16
- CXXFLAGS ?= -Wall
17
- LDFLAGS ?= -Wall
18
- ifndef COVERAGE
19
- CFLAGS += -O2
20
- CXXFLAGS += -O2
21
- LDFLAGS += -O2
22
- else
23
- CFLAGS += -O1 -fno-omit-frame-pointer
24
- CXXFLAGS += -O1 -fno-omit-frame-pointer
25
- LDFLAGS += -O1 -fno-omit-frame-pointer
26
- endif
27
- CAT ?= $(if $(filter $(OS),Windows_NT),type,cat)
28
-
29
- ifneq (,$(findstring /cygdrive/,$(PATH)))
30
- UNAME := Cygwin
31
- else
32
- ifneq (,$(findstring Windows_NT,$(OS)))
33
- UNAME := Windows
34
- else
35
- ifneq (,$(findstring mingw32,$(MAKE)))
36
- UNAME := Windows
37
- else
38
- ifneq (,$(findstring MINGW32,$(shell uname -s)))
39
- UNAME := Windows
40
- else
41
- UNAME := $(shell uname -s)
42
- endif
43
- endif
44
- endif
45
- endif
46
-
47
- ifndef LIBSASS_VERSION
48
- ifneq ($(wildcard ./.git/ ),)
49
- LIBSASS_VERSION ?= $(shell git describe --abbrev=4 --dirty --always --tags)
50
- endif
51
- ifneq ($(wildcard VERSION),)
52
- LIBSASS_VERSION ?= $(shell $(CAT) VERSION)
53
- endif
54
- endif
55
- ifdef LIBSASS_VERSION
56
- CFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
57
- CXXFLAGS += -DLIBSASS_VERSION="\"$(LIBSASS_VERSION)\""
58
- endif
59
-
60
- CXXFLAGS += -std=c++11
61
- LDFLAGS += -std=c++11
62
-
63
- ifeq (Windows,$(UNAME))
64
- ifneq ($(BUILD),shared)
65
- STATIC_ALL ?= 1
66
- endif
67
- STATIC_LIBGCC ?= 1
68
- STATIC_LIBSTDCPP ?= 1
69
- else
70
- STATIC_ALL ?= 0
71
- STATIC_LIBGCC ?= 0
72
- STATIC_LIBSTDCPP ?= 0
73
- endif
74
-
75
- ifndef SASS_LIBSASS_PATH
76
- SASS_LIBSASS_PATH = $(abspath $(CURDIR))
77
- endif
78
- ifdef SASS_LIBSASS_PATH
79
- CFLAGS += -I $(SASS_LIBSASS_PATH)/include
80
- CXXFLAGS += -I $(SASS_LIBSASS_PATH)/include
81
- else
82
- # this is needed for mingw
83
- CFLAGS += -I include
84
- CXXFLAGS += -I include
85
- endif
86
-
87
- CFLAGS += $(EXTRA_CFLAGS)
88
- CXXFLAGS += $(EXTRA_CXXFLAGS)
89
- LDFLAGS += $(EXTRA_LDFLAGS)
90
-
91
- LDLIBS = -lm
92
- ifneq ($(BUILD),shared)
93
- LDLIBS += -lstdc++
94
- endif
95
-
96
- # link statically into lib
97
- # makes it a lot more portable
98
- # increases size by about 50KB
99
- ifeq ($(STATIC_ALL),1)
100
- LDFLAGS += -static
101
- endif
102
- ifeq ($(STATIC_LIBGCC),1)
103
- LDFLAGS += -static-libgcc
104
- endif
105
- ifeq ($(STATIC_LIBSTDCPP),1)
106
- LDFLAGS += -static-libstdc++
107
- endif
108
-
109
- ifeq ($(UNAME),Darwin)
110
- CFLAGS += -stdlib=libc++
111
- CXXFLAGS += -stdlib=libc++
112
- LDFLAGS += -stdlib=libc++
113
- endif
114
-
115
- ifneq (Windows,$(UNAME))
116
- ifneq (FreeBSD,$(UNAME))
117
- ifneq (OpenBSD,$(UNAME))
118
- LDFLAGS += -ldl
119
- LDLIBS += -ldl
120
- endif
121
- endif
122
- endif
123
-
124
- ifneq ($(BUILD),shared)
125
- BUILD := static
126
- endif
127
- ifeq ($(DEBUG),1)
128
- BUILD := debug-$(BUILD)
129
- endif
130
-
131
- ifndef TRAVIS_BUILD_DIR
132
- ifeq ($(OS),SunOS)
133
- PREFIX ?= /opt/local
134
- else
135
- PREFIX ?= /usr/local
136
- endif
137
- else
138
- PREFIX ?= $(TRAVIS_BUILD_DIR)
139
- endif
140
-
141
- SASS_SASSC_PATH ?= sassc
142
- SASS_SPEC_PATH ?= sass-spec
143
- SASS_SPEC_SPEC_DIR ?= spec
144
- SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc
145
- RUBY_BIN = ruby
146
-
147
- RESOURCES =
148
- STATICLIB = lib/libsass.a
149
- SHAREDLIB = lib/libsass.so
150
- LIB_STATIC = $(SASS_LIBSASS_PATH)/lib/libsass.a
151
- LIB_SHARED = $(SASS_LIBSASS_PATH)/lib/libsass.so
152
-
153
- ifeq (Windows,$(UNAME))
154
- SASSC_BIN = $(SASS_SASSC_PATH)/bin/sassc.exe
155
- RESOURCES += res/resource.rc
156
- SHAREDLIB = lib/libsass.dll
157
- ifeq (shared,$(BUILD))
158
- CFLAGS += -D ADD_EXPORTS
159
- CXXFLAGS += -D ADD_EXPORTS
160
- LIB_SHARED = $(SASS_LIBSASS_PATH)/lib/libsass.dll
161
- endif
162
- else
163
- ifneq (Cygwin,$(UNAME))
164
- CFLAGS += -fPIC
165
- CXXFLAGS += -fPIC
166
- LDFLAGS += -fPIC
167
- endif
168
- endif
169
-
170
- include Makefile.conf
171
- OBJECTS = $(addprefix src/,$(SOURCES:.cpp=.o))
172
- COBJECTS = $(addprefix src/,$(CSOURCES:.c=.o))
173
- RCOBJECTS = $(RESOURCES:.rc=.o)
174
-
175
- DEBUG_LVL ?= NONE
176
-
177
- CLEANUPS ?=
178
- CLEANUPS += $(RCOBJECTS)
179
- CLEANUPS += $(COBJECTS)
180
- CLEANUPS += $(OBJECTS)
181
- CLEANUPS += $(LIBSASS_LIB)
182
-
183
- all: $(BUILD)
184
-
185
- debug: $(BUILD)
186
-
187
- debug-static: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
188
- debug-static: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
189
- debug-static: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
190
- debug-static: static
191
-
192
- debug-shared: LDFLAGS := -g $(filter-out -O2,$(LDFLAGS))
193
- debug-shared: CFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CFLAGS))
194
- debug-shared: CXXFLAGS := -g -DDEBUG -DDEBUG_LVL="$(DEBUG_LVL)" $(filter-out -O2,$(CXXFLAGS))
195
- debug-shared: shared
196
-
197
- lib:
198
- $(MKDIR) lib
199
-
200
- lib/libsass.a: $(COBJECTS) $(OBJECTS) | lib
201
- $(AR) rcvs $@ $(COBJECTS) $(OBJECTS)
202
-
203
- lib/libsass.so: $(COBJECTS) $(OBJECTS) | lib
204
- $(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(LDLIBS)
205
-
206
- lib/libsass.dll: $(COBJECTS) $(OBJECTS) $(RCOBJECTS) | lib
207
- $(CXX) -shared $(LDFLAGS) -o $@ $(COBJECTS) $(OBJECTS) $(RCOBJECTS) $(LDLIBS) -s -Wl,--subsystem,windows,--out-implib,lib/libsass.a
208
-
209
- %.o: %.c
210
- $(CC) $(CFLAGS) -c -o $@ $<
211
-
212
- %.o: %.rc
213
- $(WINDRES) -i $< -o $@
214
-
215
- %.o: %.cpp
216
- $(CXX) $(CXXFLAGS) -c -o $@ $<
217
-
218
- %: %.o static
219
- $(CXX) $(CXXFLAGS) -o $@ $+ $(LDFLAGS) $(LDLIBS)
220
-
221
- install: install-$(BUILD)
222
-
223
- static: $(STATICLIB)
224
- shared: $(SHAREDLIB)
225
-
226
- $(DESTDIR)$(PREFIX):
227
- $(MKDIR) $(DESTDIR)$(PREFIX)
228
-
229
- $(DESTDIR)$(PREFIX)/lib: | $(DESTDIR)$(PREFIX)
230
- $(MKDIR) $(DESTDIR)$(PREFIX)/lib
231
-
232
- $(DESTDIR)$(PREFIX)/include: | $(DESTDIR)$(PREFIX)
233
- $(MKDIR) $(DESTDIR)$(PREFIX)/include
234
-
235
- $(DESTDIR)$(PREFIX)/include/sass: | $(DESTDIR)$(PREFIX)/include
236
- $(MKDIR) $(DESTDIR)$(PREFIX)/include/sass
237
-
238
- $(DESTDIR)$(PREFIX)/include/%.h: include/%.h \
239
- | $(DESTDIR)$(PREFIX)/include/sass
240
- $(INSTALL) -v -m0644 "$<" "$@"
241
-
242
- install-headers: $(DESTDIR)$(PREFIX)/include/sass.h \
243
- $(DESTDIR)$(PREFIX)/include/sass2scss.h \
244
- $(DESTDIR)$(PREFIX)/include/sass/base.h \
245
- $(DESTDIR)$(PREFIX)/include/sass/version.h \
246
- $(DESTDIR)$(PREFIX)/include/sass/values.h \
247
- $(DESTDIR)$(PREFIX)/include/sass/context.h \
248
- $(DESTDIR)$(PREFIX)/include/sass/functions.h
249
-
250
- $(DESTDIR)$(PREFIX)/lib/%.a: lib/%.a \
251
- | $(DESTDIR)$(PREFIX)/lib
252
- @$(INSTALL) -v -m0755 "$<" "$@"
253
-
254
- $(DESTDIR)$(PREFIX)/lib/%.so: lib/%.so \
255
- | $(DESTDIR)$(PREFIX)/lib
256
- @$(INSTALL) -v -m0755 "$<" "$@"
257
-
258
- $(DESTDIR)$(PREFIX)/lib/%.dll: lib/%.dll \
259
- | $(DESTDIR)$(PREFIX)/lib
260
- @$(INSTALL) -v -m0755 "$<" "$@"
261
-
262
- install-static: $(DESTDIR)$(PREFIX)/lib/libsass.a
263
-
264
- install-shared: $(DESTDIR)$(PREFIX)/lib/libsass.so \
265
- install-headers
266
-
267
- $(SASSC_BIN): $(BUILD)
268
- $(MAKE) -C $(SASS_SASSC_PATH) build-$(BUILD)-dev
269
-
270
- sassc: $(SASSC_BIN)
271
- $(SASSC_BIN) -v
272
-
273
- version: $(SASSC_BIN)
274
- $(SASSC_BIN) -v
275
-
276
- test: test_build
277
-
278
- test_build: $(SASSC_BIN)
279
- $(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) --impl libsass $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
280
-
281
- test_full: $(SASSC_BIN)
282
- $(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) --impl libsass --run-todo $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
283
-
284
- test_probe: $(SASSC_BIN)
285
- $(RUBY_BIN) $(SASS_SPEC_PATH)/sass-spec.rb -c $(SASSC_BIN) --impl libsass --probe-todo $(LOG_FLAGS) $(SASS_SPEC_PATH)/$(SASS_SPEC_SPEC_DIR)
286
-
287
- clean-objects: | lib
288
- -$(RM) lib/*.a lib/*.so lib/*.dll lib/*.la
289
- -$(RMDIR) lib
290
- clean: clean-objects
291
- $(RM) $(CLEANUPS)
292
-
293
- clean-all:
294
- $(MAKE) -C $(SASS_SASSC_PATH) clean
295
-
296
- lib-file: lib-file-$(BUILD)
297
- lib-opts: lib-opts-$(BUILD)
298
-
299
- lib-file-static:
300
- @echo $(LIB_STATIC)
301
- lib-file-shared:
302
- @echo $(LIB_SHARED)
303
- lib-opts-static:
304
- @echo -L"$(SASS_LIBSASS_PATH)/lib"
305
- lib-opts-shared:
306
- @echo -L"$(SASS_LIBSASS_PATH)/lib -lsass"
307
-
308
- .PHONY: all static shared sassc \
309
- version install-headers \
310
- clean clean-all clean-objects \
311
- debug debug-static debug-shared \
312
- install install-static install-shared \
313
- lib-opts lib-opts-shared lib-opts-static \
314
- lib-file lib-file-shared lib-file-static \
315
- test test_build test_full test_probe
316
- .DELETE_ON_ERROR:
@@ -1,69 +0,0 @@
1
- # this is merely a common Makefile multiple implementers can use
2
- # bigger files (in terms of compile time) tend to go to the top,
3
- # so they don't end up as the last compile unit when compiling
4
- # in parallel. But we also want to mix them a little too avoid
5
- # heavy RAM usage peaks. Other than that the order is arbitrary.
6
-
7
-
8
- SOURCES = \
9
- ast.cpp \
10
- ast_values.cpp \
11
- ast_supports.cpp \
12
- ast_sel_cmp.cpp \
13
- ast_sel_unify.cpp \
14
- ast_selectors.cpp \
15
- node.cpp \
16
- context.cpp \
17
- constants.cpp \
18
- fn_utils.cpp \
19
- fn_miscs.cpp \
20
- fn_maps.cpp \
21
- fn_lists.cpp \
22
- fn_colors.cpp \
23
- fn_numbers.cpp \
24
- fn_strings.cpp \
25
- fn_selectors.cpp \
26
- color_maps.cpp \
27
- environment.cpp \
28
- ast_fwd_decl.cpp \
29
- bind.cpp \
30
- file.cpp \
31
- util.cpp \
32
- util_string.cpp \
33
- json.cpp \
34
- units.cpp \
35
- values.cpp \
36
- plugins.cpp \
37
- position.cpp \
38
- lexer.cpp \
39
- parser.cpp \
40
- prelexer.cpp \
41
- eval.cpp \
42
- expand.cpp \
43
- listize.cpp \
44
- cssize.cpp \
45
- extend.cpp \
46
- output.cpp \
47
- inspect.cpp \
48
- emitter.cpp \
49
- check_nesting.cpp \
50
- remove_placeholders.cpp \
51
- sass.cpp \
52
- sass_util.cpp \
53
- sass_values.cpp \
54
- sass_context.cpp \
55
- sass_functions.cpp \
56
- sass2scss.cpp \
57
- backtrace.cpp \
58
- operators.cpp \
59
- ast2c.cpp \
60
- c2ast.cpp \
61
- to_value.cpp \
62
- source_map.cpp \
63
- subset_map.cpp \
64
- error_handling.cpp \
65
- memory/SharedPtr.cpp \
66
- utf8_string.cpp \
67
- base64vlq.cpp
68
-
69
- CSOURCES = cencode.c