forked from DrQz/pdq-qnm-pkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
executable file
·66 lines (49 loc) · 1.67 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
# $Id$
#
#---------------------------------------------------------------------
EXAMPLES := $(wildcard examples/ppa_1998/chap*)
ECHO := /bin/echo
ECHO_OPTION := -e
ECHO_MESSAGE := "\n\nMaking chapter $@ PDQ files ...\n"
.PHONY: all lib perl5 python R examples $(EXAMPLES)
PDQ_VERSION=$(shell tools/getversion)
DISTRIB_BUILD_TMP := /tmp/pdq-dists
DISTRIB_FULL := $(DISTRIB_BUILD_TMP)/FULL
DISTRIB_R := $(DISTRIB_BUILD_TMP)/R
DISTRIB_PYTHON := $(DISTRIB_BUILD_TMP)/python
DISTRIB_PERL5 := $(DISTRIB_BUILD_TMP)/perl5
all: lib perl5 R python examples
lib:
make --directory=$@
perl5:
make --directory=interfaces $@
python:
make --directory=interfaces $@
R:
make --directory=interfaces $@
examples: $(EXAMPLES)
$(EXAMPLES):
@$(ECHO) $(ECHO_OPTION) $(ECHO_MESSAGE)
$(MAKE) --directory=$@ -f Makefile all
#---------------------------------------------------------------------
test:
make --directory=examples test
#---------------------------------------------------------------------
clean:
-/bin/rm -f *~
make --directory=lib clean
make --directory=interfaces clean
make --directory=examples clean
#---------------------------------------------------------------------
dist:
@echo $(PDQ_VERSION)
-rm -rf $(DISTRIB_BUILD_TMP)
-mkdir -p $(DISTRIB_FULL)/pdq
-export DISTRIB_FULL=$(DISTRIB_FULL) ; tar -cf - --exclude=.git . | (cd ${DISTRIB_FULL}/pdq; tar -xf - )
# -(cd /tmp/pdq; rm headache.cfg header.txt)
-(cd $(DISTRIB_FULL); tar cvf pdq.tar pdq; gzip pdq.tar)
-rm -rf $(DISTRIB_FULL)/pdq
-mv $(DISTRIB_FULL)/pdq.tar.gz $(DISTRIB_FULL)/PDQ-$(PDQ_VERSION).tar.gz
-make --directory=interfaces dist
make clean
#---------------------------------------------------------------------