File: Makefile

package info (click to toggle)
imapsync 1.252-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,204 kB
  • ctags: 619
  • sloc: perl: 41,828; sh: 900; makefile: 84; ruby: 69
file content (120 lines) | stat: -rw-r--r-- 2,342 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120

# $Id: Makefile,v 1.17 2007/10/30 00:49:43 gilles Exp gilles $	

TARGET=imapsync

.PHONY: help usage all

help: usage

usage:
	@echo "      $(TARGET) $(VERSION), You can do :"
	@echo make install # as root
	@echo make testf   # run tests
	@echo make testv   # run tests verbosely
	@echo make all     

all: ChangeLog README VERSION

.PHONY: test testp testf

.test: $(TARGET) tests.sh
	nice -40 sh tests.sh 1>/dev/null
	touch .test

testv:
	nice -40 sh -x tests.sh

test: .test

testf: clean_test test

testp :
	perl -c $(TARGET)

ChangeLog: $(TARGET)
	rlog $(TARGET) > ChangeLog

README: $(TARGET)
	perldoc -t $(TARGET) > README

VERSION: $(TARGET) Makefile
	./$(TARGET) --version > VERSION

.PHONY: clean clean_tilde clean_test   

clean: clean_tilde clean_test clean_man

clean_test:
	rm -f .test

clean_tilde:
	rm -f *~

.PHONY: install dist man

man: $(TARGET).1

clean_man:
	rm -f $(TARGET).1

$(TARGET).1: $(TARGET)
	pod2man $(TARGET) > $(TARGET).1

install: testp $(TARGET).1
	install -D $(TARGET) $(DESTDIR)/usr/bin/$(TARGET)
	install -D $(TARGET).1 $(DESTDIR)/usr/share/man/man1/$(TARGET).1
	chmod 755 $(DESTDIR)/usr/bin/$(TARGET)


DIST_NAME=$(TARGET)-$(VERSION)
DIST_FILE=$(DIST_NAME).tgz
DEB_FILE=$(DIST_NAME).deb
VERSION=$(shell ./$(TARGET) --version)

dist: cidone test clean clean_dist all INSTALL  
	echo making tarball $(DIST_FILE)
	mkdir -p dist
	mkdir -p ../prepa_dist/$(DIST_NAME)
	rsync -aCv --delete  --exclude dist/ ./  ../prepa_dist/$(DIST_NAME)
	cd ../prepa_dist && tar czfv $(DIST_FILE) $(DIST_NAME)
	ln -f ../prepa_dist/$(DIST_FILE) dist/
	cd dist && md5sum $(DIST_FILE) > $(DIST_FILE).md5.txt
	cd dist && md5sum -c $(DIST_FILE).md5.txt


deb: 
	echo making debball $(DEB_FILE)
	mkdir -p ../prepa_deb
	cd  ../prepa_deb && tar xzvf ../prepa_dist/$(DIST_FILE) &&\
	cd ../prepa_dist/$(DIST_NAME) 

.PHONY: cidone clean_dist

cidone:
	rcsdiff RCS/*

clean_dist:
	echo Used to be 'rm -f dist/*'

# Local goals

.PHONY: lfo niouze

lfo: dist niouze_lfo lfo_upload niouze

lfo_upload: 
	rsync -avH --delete . \
	/home/gilles/public_html/www.linux-france.org/html/prj/$(TARGET)/
	rsync -avH --delete ../prepa_dist/imapsync-*tgz  \
	/home/gilles/public_html/www.linux-france.org/ftp/prj/$(TARGET)/
	sh ~/memo/lfo-rsync

niouze_lfo : VERSION
	. memo && lfo_announce

niouze: VERSION
	. memo && fm_announce


public: niouze