Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 0.8.3
Fetching contributors…

Cannot retrieve contributors at this time

file 47 lines (39 sloc) 1.311 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
# Makefile for the Lua LXSH module.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: July 17, 2011
# URL: http://peterodding.com/code/lua/lxsh/

VERSION = $(shell grep _VERSION src/init.lua | cut "-d'" -f 2)
RELEASE = $(VERSION)-1
PACKAGE = lxsh-$(RELEASE)
STYLESHEETS = examples/earendel.css \
              examples/slate.css \
              examples/wiki.css

demo: $(STYLESHEETS)
@mkdir -p examples/earendel examples/slate examples/wiki
@lua etc/demo.lua

test:
@lua test/lexers.lua
@lua test/highlighters.lua

links:
@lua etc/doclinks.lua

examples/%.css: src/colors/%.lua src/init.lua
@lua -e "print(require 'lxsh'.formatters.html.stylesheet'$(notdir $(basename $@))')" > $@

package: demo
@rm -f $(PACKAGE).zip
@mkdir -p $(PACKAGE)/etc
@cp -al etc/demo.lua etc/doclinks.lua $(PACKAGE)/etc
@cp -al examples $(PACKAGE)
@cp -al src $(PACKAGE)
@cp README.md TODO.md $(PACKAGE)
@zip $(PACKAGE).zip -x '*.sw*' -r $(PACKAGE)
@rm -R $(PACKAGE)
@echo Generated $(PACKAGE).zip

rockspec: package
@cat etc/template.rockspec \
| sed "s/{{VERSION}}/$(RELEASE)/g" \
| sed "s/{{DATE}}/`export LANG=; date '+%B %d, %Y'`/" \
| sed "s/{{HASH}}/`md5sum $(PACKAGE).zip | cut '-d ' -f1 `/" \
> $(PACKAGE).rockspec
@echo Generated $(PACKAGE).rockspec

.PHONY: demo test links package
Something went wrong with that request. Please try again.