# HG changeset patch # User naryl # Date 2020-06-28 11:58:35 # Node ID ab1453cd7234eddbc1da212da1ff45e42d88cc64 # Parent 029b6e027bb6fed5c4eff4f8f3cf7a7e2d3fa5a1 Document building with Roswell diff --git a/INSTALL.md b/INSTALL.md --- a/INSTALL.md +++ b/INSTALL.md @@ -1,4 +1,3 @@ - -1. Install sbcl using your distribution's package manager, or download it from https://sbcl.org -2. Install quicklisp from https://quicklisp.org E.g. `wget https://beta.quicklisp.org/quicklisp.lisp && sbcl --load quicklisp.org` then follow instructions. -3. `make` +1. Install Roswell using either your distribution's package manager or following https://github.com/roswell/roswell/wiki/Installation +2. When installing Roswell for the first time run `ros` with no arguments to setup the environment +3. Run `make` to build the binary diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -3,8 +3,22 @@ BIN = txt2web DIST = $(BIN).tar.xz SCRIPT = $(BIN).ros +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) + all: $(BIN) +run: + bin/${SCRIPT} + dist: $(DIST) graphs: diagrams.png @@ -13,12 +27,16 @@ graphs: diagrams.png ln -f $< bin/$(BIN): *.asd src/*.lisp src/*.ps strings/*.sexp bin/$(BIN).ros + @echo + @echo "* ${GREEN}Building ${YELLOW}${BIN} ${GREEN}binary${RESET}..." ros build bin/$(SCRIPT) %.png: %.dot dot $< -T png -o $@ $(DIST): $(BIN) extras/* + @echo + @echo "* ${GREEN}Packaging${RESET}..." tar cfvJ $@ $< extras clean: @@ -29,4 +47,4 @@ clean-cache: fresh: clean clean-cache all -.PHONY: all graphs clean clean-cache fresh +.PHONY: all run graphs clean clean-cache fresh diff --git a/bin/txt2web.ros b/bin/txt2web.ros new file mode 100755 --- /dev/null +++ b/bin/txt2web.ros @@ -0,0 +1,25 @@ +#!/bin/sh +#|-*- mode:lisp -*-|# +#| +exec ros -Q -- $0 "$@" +|# + +(defpackage :ros.script.txt2web.3802182867 + (:use :cl)) +(in-package :ros.script.txt2web.3802182867) + +(defparameter *green* (format nil "~c[32m" #\Esc)) +(defparameter *yellow* (format nil "~c[33m" #\Esc)) +(defparameter *reset* (format nil "~c[0m" #\Esc)) + +(ros:ensure-asdf) +(push (uiop/pathname:pathname-parent-directory-pathname + (uiop:getcwd)) + ql:*local-project-directories*) + +(format t "** ~ALoading ~Atxt2web ~Asystem~A...~%" *green* *yellow* *green* *reset*) +(ql:quickload :txt2web :silent t) + +(defun main (&rest argv) + (uiop:symbol-call :txt2web :entry-point argv)) +;;; vim: set ft=lisp lisp: