File: Makefile

package info (click to toggle)
asql 1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 136 kB
  • sloc: perl: 840; makefile: 61; sh: 9
file content (69 lines) | stat: -rw-r--r-- 1,537 bytes parent folder | download
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
57
58
59
60
61
62
63
64
65
66
67
68
69
#
#  Makefile for 'asql'.
#
# Steve
# --
#


#
#  Only used to build distribution tarballs.
#
DIST_PREFIX = ${TMP}
VERSION     = 1.7
BASE        = asql



stubb:
	@echo "Valid targets are"
	@echo " "
	@echo " clean   - Remove temporary files"
	@echo " commands - Make our command reference."
	@echo " diff    - See differences from the remote repository"
	@echo " install - Install the scripts into /etc"
	@echo " release - Build a tarball"
	@echo " update  - Update from the repository"
	@echo " "


clean:
	-find . -name '*~' -delete
	-find . -name 'build-stamp' -delete
	-rm bin/*.bak


commands:
	perl ./bin/make-cmds ./bin/asql > ./COMMANDS

diff:
	hg diff 2>/dev/null

install:
	mkdir -p ${PREFIX}/usr/bin/
	cp bin/asql ${PREFIX}/usr/bin/asql
	chmod 755 ${PREFIX}/usr/bin/asql


release: clean commands
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)
	rm -f $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz
	cp -R . $(DIST_PREFIX)/$(BASE)-$(VERSION)
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)/debian
	perl -pi -e "s/UNRELEASED/$(VERSION)/g" $(DIST_PREFIX)/$(BASE)-$(VERSION)/bin/asql
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)/.hg*
	cd $(DIST_PREFIX) && tar -cvf $(DIST_PREFIX)/$(BASE)-$(VERSION).tar $(BASE)-$(VERSION)/
	gzip $(DIST_PREFIX)/$(BASE)-$(VERSION).tar
	mv $(DIST_PREFIX)/$(BASE)-$(VERSION).tar.gz .
	rm -rf $(DIST_PREFIX)/$(BASE)-$(VERSION)
	gpg --armour --detach-sign $(BASE)-$(VERSION).tar.gz
	echo $(VERSION) > .version

test:
	prove --shuffle t/

test-verbose:
	prove --verbose --shuffle t/

update:
	hg pull --update 2>/dev/null