File: Makefile

package info (click to toggle)
lua-leg 0.1.2-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 224 kB
  • ctags: 144
  • sloc: makefile: 40; sh: 17
file content (56 lines) | stat: -rw-r--r-- 1,209 bytes parent folder | download | duplicates (7)
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.7 2007/11/26 18:41:51 hanjos Exp $
# 

# ===== LUA PATHS =================
# Lua's library directory
LUA_LIB = /usr/local/share/lua/5.1

# ===== PROJECT INFO ==============
# project info
NAME = leg
VERSION = 0.1.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 src/*.lua $(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