summaryrefslogtreecommitdiff
path: root/Makefile
blob: 8044aa3db4720227d3be5d679fb04c7c9fafe609 (plain)
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
include kolab.mk
include update.mk

BASE_PACKAGES=php-smarty              \
              openldap                \
              apache-php              \
              php                     \
              postfix                 \
              imapd                   \
              clamav                  \
              gmp                     \
              db                      \
              sqlite                  \
              perl-ldap

PERL_PACKAGES=perl-kolab

PERL_MAKEFILES=$(PERL_PACKAGES:%=%/Makefile)

KOLAB_PACKAGES=perl-kolab              \
               kolabd                  \
               kolab-webadmin          \
               kolab-webclient         \
               kolab-fbview            \

PEAR_PACKAGES= pear/PEAR-Auth_SASL      \
               pear/PEAR-Date           \
               pear/PEAR-HTTP_Request   \
               pear/PEAR-Log            \
               pear/PEAR-Mail           \
               pear/PEAR-Mail-mimeDecode\
               pear/PEAR-Net_LMTP       \
               pear/PEAR-Net_SMTP       \
               pear/PEAR-Net_Socket     \
               pear/PEAR-Net_URL        \
               pear/PEAR-Horde-Channel  \
               pear/PEAR-PHPUnit-Channel\
               pear/Horde_Argv          \
               pear/Horde_Auth          \
               pear/Horde_Browser       \
               pear/Horde_CLI           \
               pear/Horde_Cache         \
               pear/Horde_Cipher        \
               pear/Horde_DOM           \
               pear/Horde_DataTree      \
               pear/Horde_Date          \
               pear/Horde_Framework     \
               pear/Horde_Group         \
               pear/Horde_History       \
               pear/Horde_LDAP          \
               pear/Horde_MIME          \
               pear/Horde_NLS           \
               pear/Horde_Notification  \
               pear/Horde_Perms         \
               pear/Horde_Prefs         \
               pear/Horde_Secret        \
               pear/Horde_Serialize     \
               pear/Horde_SessionObjects \
               pear/Horde_Util          \
               pear/Horde_iCalendar     \
               pear/PHPUnit             \
               php-kolab/Kolab_Format   \
               php-kolab/Kolab_Server   \
               php-kolab/Kolab_Storage  \
               php-kolab/Kolab_Freebusy \
               php-kolab/Kolab_Filter   \

PHPUNIT=$(KOLABDIR)/bin/phpunit

PHPUNIT_TESTS=$(KOLABDIR)/lib/php/test/Kolab_Format/Horde/Kolab/Format/AllTests.php \
              $(KOLABDIR)/lib/php/test/Kolab_Server/Horde/Kolab/Server/AllTests.php \
              $(KOLABDIR)/lib/php/test/Kolab_Storage/Horde/Kolab/Storage/AllTests.php \
              $(KOLABDIR)/lib/php/test/Kolab_Filter/Horde/Kolab/Filter/AllTests.php \
              $(KOLABDIR)/lib/php/test/Kolab_FreeBusy/Horde/Kolab/FreeBusy/AllTests.php

.PHONY: dist
dist: stage base kolab pear

stage:
	mkdir stage

.PHONY: base
base: stage
	for PKG in $(BASE_PACKAGES);        \
	do                                  \
	  make -e -C $$PKG dist || exit $$?;\
	done

.PHONY: kolab
kolab: stage $(PERL_MAKEFILES)
	for PKG in $(KOLAB_PACKAGES);              \
	do                                         \
	  cd $$PKG && make dist || exit $$?; cd ..;\
	done

$(PERL_MAKEFILES): $(@:%=%.PL)
	cd $(@:%/Makefile=%) && perl Makefile.PL

.PHONY: pear
pear: stage
	for PKG in $(PEAR_PACKAGES);                   \
	do                                              \
	  make -C $$PKG dist || exit $$?;               \
	done

.PHONY: clean
clean: clean-base clean-kolab clean-pear clean-stage clean-update
	find . | grep "~$$" | xargs rm -rf

.PHONY: clean-stage
clean-stage:
	rm -rf stage

.PHONY: clean-base
clean-base:
	for PKG in $(BASE_PACKAGES);                    \
	do                                              \
	  make -C $$PKG clean || exit $$?;              \
	done

.PHONY: clean-kolab
clean-kolab: $(PERL_MAKEFILES)
	for PKG in $(KOLAB_PACKAGES);                   \
	do                                              \
	  make -C $$PKG clean_all || exit $$?;          \
	done

.PHONY: clean-pear
clean-pear:
	for PKG in $(PEAR_PACKAGES);                   \
	do                                              \
	  make -C $$PKG clean || exit $$?;              \
	done

.PHONY: test
test:
	for TEST in $(PHPUNIT_TESTS); \
	do                            \
		$(PHPUNIT) $$TEST;    \
	done