diff --git a/.gitignore b/.gitignore index 1aef663..1ba09c4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.tup /bin +/lua diff --git a/Tuprules.tup b/Tuprules.tup index a710148..da6efa6 100644 --- a/Tuprules.tup +++ b/Tuprules.tup @@ -15,3 +15,5 @@ CFLAGS += -Werror !gccgo = |> ^ GCCGo: %f -> Binary %o^ gccgo $(GOFLAGS) -o %o %f |> !cc = |> ^ CC: %f -> Binary %o^ gcc $(CFLAGS) -o %o %f |> !obj = |> ^ CC: %f -> Binary %o^ gcc $(CFLAGS) -c -o %o %f |> +!moon = |> ^ Moonscript: %f -> Script %o^ moonc -o %o %f && chmod u+x %o |> +!luascript = |> ^ Lua script: %f -> Script %o^ echo "#!/usr/bin/lua" >> %o && cat %f >> %o && chmod u+x %o |> diff --git a/src/Tupfile b/src/Tupfile index 0cba356..d224ff6 100644 --- a/src/Tupfile +++ b/src/Tupfile @@ -1,7 +1,6 @@ .gitignore include_rules -: foreach *.moon |> moonc -o ../bin/%B.lua %f && chmod u+x ../bin/%B.lua |> ../bin/%B.lua : foreach *.nim |> !nim |> ../bin/%B : foreach *.go |> !gccgo |> ../bin/%B diff --git a/src/moonscript/Tupfile b/src/moonscript/Tupfile new file mode 100644 index 0000000..a2142f2 --- /dev/null +++ b/src/moonscript/Tupfile @@ -0,0 +1,6 @@ +.gitignore +include_rules + +: foreach *.moon |> !moon |> ../../lua/%B.lua + +: ../../lua/free.lua |> !luascript |> ../../bin/free-moon diff --git a/src/moonscript/free.moon b/src/moonscript/free.moon new file mode 100644 index 0000000..832094e --- /dev/null +++ b/src/moonscript/free.moon @@ -0,0 +1 @@ +os.execute "free -m"