Skip to content

Commit

Permalink
Makefile: removed some pointless code, such as SYS_BIN, TIMESTAMP and…
Browse files Browse the repository at this point in the history
… the

          buffer directory in the bundle rule; changed PROJ_NAME to NAME

doc/*: slight modifications in the document generator, no big conceptual change
  • Loading branch information
hanjos committed Nov 23, 2007
1 parent d67785c commit b5dd71c
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 174 deletions.
54 changes: 20 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,70 +1,56 @@
#
# Makefile for Leg
# $Id: Makefile,v 1.5 2007/11/22 21:15:24 hanjos Exp $
# $Id: Makefile,v 1.6 2007/11/23 18:15:42 hanjos Exp $
#

# ===== SYSTEM PATHS ==============
# The system's executables directory
SYS_BIN = /usr/local/bin

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

# ===== PROJECT INFO ==============
# version
VERSION = 0.1.1
# project info
NAME = leg
VERSION = 0.1.2

# project directories
DOC_DIR = doc
SRC_DIR = src
TEST_DIR = tests

# document generator
# 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

# project info
PROJ_NAME = leg

# ===== MISC ======================
#TIMESTAMP = `date +'%Y-%m-%d'`

# ===== RULES =====================
leg:
mkdir -p $(PROJ_NAME)
rm -f $(PROJ_NAME)/*.lua
cp src/*.lua $(PROJ_NAME)
mkdir -p $(NAME)
rm -f $(NAME)/*.lua
cp src/*.lua $(NAME)

install:
# copying the source files to LUA_LIB
mkdir -p $(LUA_LIB)/$(PROJ_NAME)
rm -f $(LUA_LIB)/$(PROJ_NAME)/*.lua
cp src/*.lua $(LUA_LIB)/$(PROJ_NAME)
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)/$(PROJ_NAME)
rm -r $(LUA_LIB)/$(NAME)

document:
# generate documentation
mkdir -p doc
mkdir -p $(DOC_DIR)
$(DOCCER) src/*.lua
mv ldt/* doc
mv ldt/* $(DOC_DIR)
rm -rf ldt

bundle:
# ugly trick, but it works
mkdir -p ../$(PROJ_NAME)-$(VERSION)
rm -rf ../$(PROJ_NAME)-$(VERSION)/*
cp -r * ../$(PROJ_NAME)-$(VERSION)

# tar-ing it (this works only with version 1.19 and beyond)
tar --create --verbose --exclude-vcs --file=../$(PROJ_NAME)-$(VERSION).tar ../$(PROJ_NAME)-$(VERSION)
# 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 ../$(PROJ_NAME)-$(VERSION).tar

# removing the buffer directory
rm -r ../$(PROJ_NAME)-$(VERSION)
gzip ../$(NAME)-$(VERSION).tar

test:
@echo
Expand Down
2 changes: 1 addition & 1 deletion doc/grammar.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<br/>

<div id="product_description"> <small><em> <b>Version:</b> 0.1 </em></small></div>
<div id="product_description"> <small><em><b>Generated:</b> November 22, 2007 </em></small> </div>
<div id="product_description"> <small><em><b>Generated:</b> November 23, 2007 </em></small> </div>

</div> <!-- id="product" -->

Expand Down
137 changes: 0 additions & 137 deletions doc/init.html

This file was deleted.

2 changes: 1 addition & 1 deletion doc/parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<br/>

<div id="product_description"> <small><em> <b>Version:</b> 0.1 </em></small></div>
<div id="product_description"> <small><em><b>Generated:</b> November 22, 2007 </em></small> </div>
<div id="product_description"> <small><em><b>Generated:</b> November 23, 2007 </em></small> </div>

</div> <!-- id="product" -->

Expand Down
2 changes: 1 addition & 1 deletion doc/scanner.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<br/>

<div id="product_description"> <small><em> <b>Version:</b> 0.1 </em></small></div>
<div id="product_description"> <small><em><b>Generated:</b> November 22, 2007 </em></small> </div>
<div id="product_description"> <small><em><b>Generated:</b> November 23, 2007 </em></small> </div>

</div> <!-- id="product" -->

Expand Down

0 comments on commit b5dd71c

Please sign in to comment.