From fcd3b07572eca2597c763e8a725d360499057757 Mon Sep 17 00:00:00 2001 From: Codinget Date: Sun, 8 Nov 2020 00:44:42 +0100 Subject: [PATCH] added install target --- Build.moon | 5 +++++ Makefile | 3 +++ 2 files changed, 8 insertions(+) diff --git a/Build.moon b/Build.moon index 16a2444..8f35782 100644 --- a/Build.moon +++ b/Build.moon @@ -16,6 +16,11 @@ with public default target 'all' \after 'bin' \after 'lib' +with public target 'install' + \depends 'out/moonbuild' + \produces '/usr/local/bin/moonbuild' + \fn => _.cmd 'sudo', 'cp', @infile, @outfile + with public target 'clean' \fn => _.cmd RM, LIB_LUA \fn => _.cmd RM, BIN_LUA diff --git a/Makefile b/Makefile index 73e540a..bd8e6ad 100644 --- a/Makefile +++ b/Makefile @@ -16,6 +16,9 @@ MODULES = $(shell echo $(foreach lib, $(LIB_LUA), $(patsubst %.lua, %, $(lib))) all: bin lib +install: all + sudo cp out/moonbuild /usr/local/bin/moonbuild + clean: $(RM) $(LIB_LUA) $(RM) $(BIN_LUA)