-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
97 lines (63 loc) · 1.65 KB
/
Makefile
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
# $Id: Makefile,v 1.3 2015/04/17 17:51:52 gilles Exp gilles $
TARGET=pop2imap
.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: test ChangeLog README VERSION
.PHONY: test testp testf
.test: $(TARGET) tests.sh
sh tests.sh 1>/dev/null
touch .test
testv:
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_test:
rm -f .test
clean_tilde:
rm -f *~
.PHONY: install dist
install: testp
cp $(TARGET) /usr/bin/$(TARGET)
chmod 755 /usr/bin/$(TARGET)
DIST_NAME=$(TARGET)-$(VERSION)
DIST_FILE=$(DIST_NAME).tgz
VERSION=$(shell ./$(TARGET) --version)
dist: cidone clean clean_dist all INSTALL
echo making tarball $(DIST_FILE)
mkdir -p dist
mkdir -p ../prepa_dist/$(DIST_NAME)
rsync -aCv --delete ./ ../prepa_dist/$(DIST_NAME)
cd ../prepa_dist && tar czfv $(DIST_FILE) $(DIST_NAME)
cp -f ../prepa_dist/$(DIST_FILE) dist/
cd dist && md5sum $(DIST_FILE) > $(DIST_FILE).md5
cd dist && md5sum -c $(DIST_FILE).md5
.PHONY: cidone clean_dist
cidone:
rcsdiff RCS/*
clean_dist:
rm -f dist/*
# Local goals
.PHONY: lfo
lfo: cidone dist
rsync -av --delete . \
/home/gilles/public_html/www.linux-france.org/html/prj/$(TARGET)/
sh ~/memo/lfo-rsync
ks: cidone
rsync -av --delete . \
[email protected]:public_html/$(TARGET)/