| 1 |
# $Id: Makefile,v 1.1.1.1 2007/11/26 17:12:24 mascarenhas Exp $ |
| 2 |
|
| 3 |
config_file:=config |
| 4 |
|
| 5 |
ifneq '$(wildcard $(config_file))' '' |
| 6 |
include $(config_file) |
| 7 |
endif |
| 8 |
|
| 9 |
$(config_file): |
| 10 |
chmod +x configure |
| 11 |
|
| 12 |
all: |
| 13 |
|
| 14 |
install: $(config_file) |
| 15 |
mkdir -p $(LUA_DIR) |
| 16 |
mkdir -p $(LUA_DIR)/cosmo |
| 17 |
cp src/cosmo.lua $(LUA_DIR)/ |
| 18 |
cp src/cosmo/grammar.lua $(LUA_DIR)/cosmo |
| 19 |
cp src/cosmo/fill.lua $(LUA_DIR)/cosmo |
| 20 |
|
| 21 |
install-rocks: install |
| 22 |
mkdir -p $(PREFIX)/samples |
| 23 |
cp -r samples/* $(PREFIX)/samples |
| 24 |
mkdir -p $(PREFIX)/doc |
| 25 |
cp -r doc/* $(PREFIX)/doc |
| 26 |
mkdir -p $(PREFIX)/tests |
| 27 |
cp -r tests/* $(PREFIX)/tests |
| 28 |
echo "Go to $(PREFIX) for samples and docs!" |
| 29 |
|
| 30 |
test: |
| 31 |
cd tests && lua -l luarocks.require test_cosmo.lua |
| 32 |
|
| 33 |
upload-cvs: |
| 34 |
git archive --format=tar --prefix=cosmo-current/ master | gzip > cosmo-current.tar.gz |
| 35 |
ncftpput -u mascarenhas ftp.luaforge.net cosmo/htdocs cosmo-current.tar.gz |
| 36 |
|
| 37 |
upload-dist: |
| 38 |
git archive --format=tar --prefix=cosmo-$(VERSION)/ v$(VERSION) | gzip > cosmo-$(VERSION).tar.gz |
| 39 |
ncftpput -u mascarenhas ftp.luaforge.net cosmo/htdocs cosmo-$(VERSION).tar.gz |
| 40 |
ncftpput -u mascarenhas ftp.luaforge.net cosmo/htdocs doc/index.html |
| 41 |
|
| 42 |
clean: |