-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
56 lines (45 loc) · 1.18 KB
/
Makefile
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
48
49
50
51
52
53
54
55
56
#
# Makefile for Leg
# $Id: Makefile,v 1.8 2007/12/07 14:23:56 hanjos Exp $
#
# ===== LUA PATHS =================
# Lua's library directory
LUA_LIB = /usr/local/share/lua/5.1
# ===== PROJECT INFO ==============
# project info
NAME = leg
VERSION = 0.2
# project directories
DOC_DIR = doc
SRC_DIR = src
TEST_DIR = tests
# the document generator used to build the documentation in doc/.
# It uses an unreleased generator, so this is for my personal use.
DOCCER = lua /usr/local/share/lua/5.1/ldt/ldt.lua
# ===== RULES =====================
leg:
mkdir -p $(NAME)
rm -f $(NAME)/*.lua
cp src/*.lua $(NAME)
install:
# copying the source files to LUA_LIB
mkdir -p $(LUA_LIB)/$(NAME)
rm -f $(LUA_LIB)/$(NAME)/*.lua
cp -r src/* $(LUA_LIB)/$(NAME)
clean:
# removing the source files and package
rm -r $(LUA_LIB)/$(NAME)
documents:
# generate documentation
mkdir -p $(DOC_DIR)
$(DOCCER) src/*.lua
mv ldt/* $(DOC_DIR)
rm -rf ldt
bundle:
# tar-ing it (this works only with version 1.19 and beyond, due
# the --exclude-vcs flag)
tar --create --verbose --exclude-vcs --file=../$(NAME)-$(VERSION).tar ../$(NAME)
# zipping it
gzip ../$(NAME)-$(VERSION).tar
test:
cd tests; lua test.lua