forked from wellington/go-libsass
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
57 lines (40 loc) · 1.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export PKG_CONFIG_PATH=$(shell pwd)/lib/pkgconfig
install: deps
deps: fetch
fetch:
git submodule sync
git submodule update --init
libsass-src: fetch
libsass-src/Makefile.conf: fetch
include libsass-src/Makefile.conf
LIBSASS_VERSION:=$(shell cd libsass-src; ./version.sh)
libsass-build/include/sass/version.h: libsass-src/include/sass/version.h.in
echo "Stamping version $(LIBSASS_VERSION)"
sed 's/@PACKAGE_VERSION@/$(LIBSASS_VERSION)/' libsass-src/include/sass/version.h.in > libsass-build/include/sass/version.h
.PHONY: libsass-build
SOURCES=libsass-build/*.cpp libsass-build/*.c libsass-build/*.h libsass-build/*.hpp
libsass-build: libsass-src
mkdir -p libsass-build/include
rm -rf $(SOURCES)
# more stuff
cp -R libsass-src/src/*.c libsass-build
cp -R libsass-src/src/*.cpp libsass-build
cp -R libsass-src/src/*.h libsass-build
cp -R libsass-src/src/*.hpp libsass-build
cp -R libsass-src/src/b64 libsass-build
cp -R libsass-src/include libsass-build
cp -R libsass-src/src/memory libsass-build
cp -R libsass-src/src/utf8 libsass-build
# hack remove the [NA] version.h
rm libsass-build/include/sass/version.h
$(MAKE) libsass-build/include/sass/version.h
touch libs/*.go
update-libsass: libsass-build
@echo "Success"
.PHONY: test
test:
go test -race .
cleanfiles:
rm -rf lib include libsass-src libsass-tmp
clean: cleanfiles
git submodule update