repotool/Makefile
2025-07-06 16:40:46 -05:00

24 lines
660 B
Makefile

.PHONY: all install test
SOURCES_SRC:=$(shell find src -type f )
LIBS_SRC:=$(shell find lib -type f )
REPOTOOL_PATH ?= ${HOME}/repo
all: dist/repotool
install: dist/repotool shell/repotool.zsh shell/repotool.plugin.zsh
mkdir -p ${REPOTOOL_PATH}/.bin/
mkdir -p ${REPOTOOL_PATH}/.shell/
install dist/repotool ${REPOTOOL_PATH}/.bin/
install shell/repotool.zsh shell/repotool.plugin.zsh ${REPOTOOL_PATH}/.shell/
dist/repotool: $(SOURCES_SRC) $(LIBS_SRC) main.lua
@mkdir -p dist
luabundler bundle main.lua -p "./src/?.lua" -p "./lib/?.lua" -o dist/repotool
@sed -i "1i#!/usr/bin/env luajit" "dist/repotool"
chmod +x dist/repotool
test:
@lua test.lua