You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

36 lines
1.1 KiB

SRCDIR = src
DESTDIR ?= /usr/local/bin
LOCALDIR = ~/.local/bin
.PHONY: help
help:
@echo "Usage:"
@echo " make help - Displays this help message."
@echo " make compile - Compiles source into a single wg.lua file."
@echo " make install - Installs wg to $(DESTDIR)."
@echo " make install-local - Installs wg to $(LOCALDIR)."
@echo " make uninstall - Deletes wg from $(DESTDIR)."
@echo " make uninstall-local - Deletes wg from $(LOCALDIR)."
compile:
@echo "#!/usr/bin/env lua" > wg.lua
@echo "-- wg - Static website generator in Fennel" >> wg.lua
@echo "-- Author: Jesse Laprade" >> wg.lua
@cd $(SRCDIR) && fennel --require-as-include --compile wg.fnl >> ../wg.lua
install:
@install -Dm755 ./wg.lua -D $(DESTDIR)/wg
@echo "Successfully installed to $(DESTDIR)!"
install-local:
@install -Dm755 ./wg.lua -D $(LOCALDIR)/wg
@echo "Successfully installed to $(LOCALDIR)!"
uninstall:
@rm $(DESTDIR)/wg
@echo "Successfully uninstalled wg from $(DESTDIR)!"
uninstall-local:
@rm $(LOCALDIR)/wg
@echo "Successfully uninstalled wg from $(LOCALDIR)!"