Makefile
61 lines
| 1.1 KiB
| text/x-makefile
|
MakefileLexer
r6 | ||||
r59 | PKG = txt2web | |||
SCRIPT = $(PKG).ros | ||||
ifeq ($(OS),Windows_NT) | ||||
BIN = $(PKG).exe | ||||
DIST = $(PKG).zip | ||||
ARCMD = "zip" | ||||
ARARGS = "-r" | ||||
else | ||||
BIN = $(PKG) | ||||
DIST = $(PKG).tar.xz | ||||
ARCMD = "tar" | ||||
ARARGS = "cfvJ" | ||||
endif | ||||
r1 | ||||
r57 | BLACK := $(shell tput setaf 0) | |||
RED := $(shell tput setaf 1) | ||||
GREEN := $(shell tput setaf 2) | ||||
YELLOW := $(shell tput setaf 3) | ||||
LIGHTPURPLE := $(shell tput setaf 4) | ||||
PURPLE := $(shell tput setaf 5) | ||||
BLUE := $(shell tput setaf 6) | ||||
WHITE := $(shell tput setaf 7) | ||||
RESET := $(shell tput sgr0) | ||||
r44 | all: $(BIN) | |||
r57 | run: | |||
bin/${SCRIPT} | ||||
r46 | dist: $(DIST) | |||
r44 | graphs: diagrams.png | |||
r1 | ||||
r55 | $(BIN): bin/$(BIN) | |||
ln -f $< | ||||
r59 | bin/$(BIN): *.asd src/*.lisp src/*.ps strings/*.sexp bin/$(PKG).ros | |||
r57 | @echo | |||
@echo "* ${GREEN}Building ${YELLOW}${BIN} ${GREEN}binary${RESET}..." | ||||
r55 | ros build bin/$(SCRIPT) | |||
r1 | ||||
r44 | %.png: %.dot | |||
r1 | dot $< -T png -o $@ | |||
r46 | $(DIST): $(BIN) extras/* | |||
r57 | @echo | |||
@echo "* ${GREEN}Packaging${RESET}..." | ||||
r59 | $(ARCMD) $(ARARGS) $@ $< extras | |||
r46 | ||||
r1 | clean: | |||
r55 | rm -f $(BIN) bin/$(BIN) $(DIST) | |||
r44 | ||||
r52 | clean-cache: | |||
-rm -rf ~/.cache/common-lisp | ||||
r44 | ||||
r52 | fresh: clean clean-cache all | |||
r57 | .PHONY: all run graphs clean clean-cache fresh | |||