clean up tools to make things more clear
This commit is contained in:
parent
14094762ab
commit
704aa3f7df
44
Makefile
44
Makefile
@ -17,7 +17,7 @@ FENNELFLAGS+=--skip-include fennel.compiler
|
||||
EXTRA_FENNELFLAGS ?=
|
||||
FENNELFLAGS+= $(EXTRA_FENNELFLAGS)
|
||||
|
||||
.PHONY: all clean test install ci selfcheck
|
||||
.PHONY: all clean test repl install docs install-deps ci selfcheck
|
||||
|
||||
all: $(EXE)
|
||||
|
||||
@ -26,32 +26,36 @@ $(EXE): $(SRC)
|
||||
$(FENNEL) $(FENNELFLAGS) --require-as-include --compile src/fennel-ls.fnl >> $@
|
||||
chmod 755 $@
|
||||
|
||||
clean:
|
||||
rm -f $(EXE)
|
||||
repl:
|
||||
$(FENNEL) $(FENNELFLAGS)
|
||||
|
||||
docs:
|
||||
$(FENNEL) $(FENNELFLAGS) tools/get-docs.fnl
|
||||
|
||||
rm-docs:
|
||||
rm -rf src/fennel-ls/docs/
|
||||
|
||||
deps:
|
||||
$(FENNEL) $(FENNELFLAGS) tools/get-deps.fnl
|
||||
|
||||
rm-deps:
|
||||
rm -rf fennel deps/
|
||||
|
||||
selfcheck:
|
||||
$(FENNEL) $(FENNELFLAGS) src/fennel-ls.fnl --check $(SRC)
|
||||
|
||||
install: $(EXE)
|
||||
mkdir -p $(DESTDIR)$(BINDIR) && cp $< $(DESTDIR)$(BINDIR)/
|
||||
|
||||
test:
|
||||
TESTING=1 $(FENNEL) $(FENNELFLAGS) test/init.fnl
|
||||
|
||||
repl:
|
||||
$(FENNEL) $(FENNELFLAGS)
|
||||
|
||||
testall:
|
||||
ci:
|
||||
$(MAKE) test LUA=lua5.1
|
||||
$(MAKE) test LUA=lua5.2
|
||||
$(MAKE) test LUA=lua5.3
|
||||
$(MAKE) test LUA=lua5.4
|
||||
$(MAKE) test LUA=luajit
|
||||
|
||||
docs:
|
||||
$(FENNEL) $(FENNELFLAGS) tools/gen-docs.fnl
|
||||
|
||||
install-deps:
|
||||
$(FENNEL) $(FENNELFLAGS) tools/vendor.fnl
|
||||
|
||||
install: $(EXE)
|
||||
mkdir -p $(DESTDIR)$(BINDIR) && cp $< $(DESTDIR)$(BINDIR)/
|
||||
|
||||
ci: testall $(EXE)
|
||||
|
||||
selfcheck:
|
||||
$(FENNEL) $(FENNELFLAGS) src/fennel-ls.fnl --check $(SRC)
|
||||
clean:
|
||||
rm -f $(EXE)
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
(local dkjson-md5sum "94320e64e95f9bb5b06d9955e5391a78 build/dkjson.lua")
|
||||
(local dkjson-sha1sum "6926b65aa74ae8278b6c5923c0c5568af4f1fef1 build/dkjson.lua")
|
||||
|
||||
(sh :mkdir :-p "deps/")
|
||||
|
||||
;; get fennel
|
||||
(sh :mkdir :-p "build/")
|
||||
@ -36,7 +35,8 @@
|
||||
(assert (= 0 (sh :echo dkjson-md5sum [:|] :md5sum "--check --status")))
|
||||
(assert (= 0 (sh :echo dkjson-sha1sum [:|] :sha1sum "--check --status"))))
|
||||
|
||||
|
||||
;; copy to the "deps" folder
|
||||
(sh :mkdir :-p "deps/")
|
||||
(sh :cp "build/fennel/fennel" ".")
|
||||
(sh :cp "build/fennel/fennel.lua" "deps/")
|
||||
(sh :cp "build/faith/faith.fnl" "deps/")
|
||||
@ -21,8 +21,9 @@
|
||||
|
||||
(fn main []
|
||||
(sh :mkdir :-p "build/")
|
||||
(let [{:convert lua-manual} (require :tools.gen-docs.lua-manual)
|
||||
{:convert tic-manual} (require :tools.gen-docs.tic80)]
|
||||
(sh :mkdir :-p "src/fennel-ls/docs/")
|
||||
(let [{:convert lua-manual} (require :tools.get-docs.lua-manual)
|
||||
{:convert tic-manual} (require :tools.get-docs.tic80)]
|
||||
(derive-docs-from-url "https://www.lua.org/manual/5.1/manual.html" "lua51.fnl" lua-manual)
|
||||
(derive-docs-from-url "https://www.lua.org/manual/5.2/manual.html" "lua52.fnl" lua-manual)
|
||||
(derive-docs-from-url "https://www.lua.org/manual/5.3/manual.html" "lua53.fnl" lua-manual)
|
||||
@ -1,7 +0,0 @@
|
||||
(local {: sh} (require :tools.util.sh))
|
||||
|
||||
(sh :rm :-rf
|
||||
;; delete vendored "fennel" (build dependency)
|
||||
"fennel"
|
||||
;; delete deps folder
|
||||
"deps/")
|
||||
@ -14,7 +14,7 @@
|
||||
(string.gsub arg "'" "\\'")
|
||||
"'")))
|
||||
" ")]
|
||||
(print (.. "tools/gen-docs: " command))
|
||||
(print (.. "running command: " command))
|
||||
(os.execute command)))
|
||||
|
||||
{: sh}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user