forked from OpenCollarTeam/OpenCollar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (30 loc) · 878 Bytes
/
Makefile
File metadata and controls
36 lines (30 loc) · 878 Bytes
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
ifeq ($(OS),Windows_NT)
LSLINT_ENV := win64
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
LSLINT_ENV := linux
endif
ifeq ($(UNAME_S),Darwin)
LSLINT_ENV := osx
endif
endif
LSLINT_VERSION := v1.0.8
LSLINT_FILE := lslint_$(LSLINT_VERSION)_$(LSLINT_ENV).zip
LSLINT_URL := https://github.com/Makopo/lslint/releases/download/$(LSLINT_VERSION)/$(LSLINT_FILE)
LSLINT := bin/lslint
LSL_FILES := $(shell ls src/*/*.lsl)
LINT_FILES := $(shell echo $(LSL_FILES) | sed 's/src/build\/lint/g' | sed 's/lsl/lslint/g')
BUILD := build/
.PHONY: lint clean_lint
$(LSLINT):
mkdir -p $(shell dirname $@)
cd bin; curl -L $(LSLINT_URL) -o $(LSLINT_FILE)
cd bin; unzip $(LSLINT_FILE)
$(BUILD)lint/%.lslint: src/%.lsl
mkdir -p $(shell dirname $@)
$(LSLINT) -p src/$*.lsl 2> $@
clean_lint:
rm -rf $(BUILD)lint
lint: $(LSLINT) clean_lint $(LINT_FILES)
cat $(LINT_FILES)