forked from beanstalkd/beanstalkd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
64 lines (55 loc) · 1.09 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
include mk/inc
VERS=$(shell mk/vers.sh)
TARG=beanstalkd
MOFILE=main.o
OFILES=\
conn.o\
file.o\
heap.o\
job.o\
ms.o\
net.o\
port-$(OS).o\
primes.o\
prot.o\
sd-daemon.o\
sock-$(OS).o\
srv.o\
time.o\
tube.o\
util.o\
vers.o\
walg.o\
TOFILES=\
heap-test.o\
integ-test.o\
job-test.o\
util-test.o\
HFILES=\
dat.h\
sd-daemon.h\
CLEANFILES=\
vers.c\
$(TARG)-*.tar.gz\
include mk/cmd
include mk/tst
vers.c:
mk/verc.sh >vers.c
ifneq ($(shell mk/verc.sh),$(shell cat vers.c 2>/dev/null))
.PHONY: vers.c
endif
dist: $(TARG)-$(VERS).tar.gz
.PHONY: dist
$(TARG)-$(VERS).tar:
git archive -o $@ --prefix=$(TARG)-$(VERS)/ v$(VERS)
mkdir -p $(TARG)-$(VERS)/mk
echo 'printf "$(VERS)"' >$(TARG)-$(VERS)/mk/vers.sh
chmod +x $(TARG)-$(VERS)/mk/vers.sh
$(TAR) --append -f $@ $(TARG)-$(VERS)/mk/vers.sh
sed 's/@VERSION@/$(VERS)/' <pkg/beanstalkd.spec.in >$(TARG)-$(VERS)/beanstalkd.spec
$(TAR) --append -f $@ $(TARG)-$(VERS)/beanstalkd.spec
cp NEWS.md $(TARG)-$(VERS)/NEWS.md
$(TAR) --append -f $@ $(TARG)-$(VERS)/NEWS.md
rm -r $(TARG)-$(VERS)
$(TARG)-$(VERS).tar.gz: $(TARG)-$(VERS).tar
gzip -f $<