aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: 993cc16a1ad0ef60fb3d594d119dacea7cc6fc80 (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
.PHONY: main testing non-free unstable

rootdir := $(shell pwd)

all: main testing non-free unstable

main-modules :=  $(sort							\
		   $(notdir						\
		     $(patsubst %/,%,					\
		       $(dir						\
		         $(shell find main -maxdepth 2 -name APKBUILD -print)))))

testing-modules :=  $(sort						\
		      $(notdir						\
		        $(patsubst %/,%,				\
		          $(dir						\
		            $(shell find testing -maxdepth 2 -name APKBUILD -print)))))

non-free-modules :=  $(sort						\
		       $(notdir						\
		         $(patsubst %/,%,				\
		           $(dir					\
		             $(shell find non-free -maxdepth 2 -name APKBUILD -print)))))

unstable-modules :=  $(sort						\
		       $(notdir						\
		         $(patsubst %/,%,				\
		           $(dir					\
		             $(shell find unstable -maxdepth 2 -name APKBUILD -print)))))

main: 
	for p in $(main-modules) ; \
	do \
		cd $(rootdir)/$@/$$p; \
		abuild -r; \
	done

testing: 
	for p in $(testing-modules) ; \
	do \
		cd $(rootdir)/$@/$$p; \
		abuild -r; \
	done

non-free: 
	for p in $(non-free-modules) ; \
	do \
		cd $(rootdir)/$@/$$p; \
		abuild -r; \
	done

unstable: 
	for p in $(unstable-modules) ; \
	do \
		cd $(rootdir)/$@/$$p; \
		abuild -r; \
	done

clean:
	for p in $(main-modules) ; \
	do \
		cd $(rootdir)/main/$$p; \
		abuild clean; \
		abuild cleanoldpkg; \
		abuild cleanpkg; \
		abuild cleancache; \
	done
	for p in $(testing-modules) ; \
	do \
		cd $(rootdir)/testing/$$p; \
		abuild clean; \
		abuild cleanoldpkg; \
		abuild cleanpkg; \
		abuild cleancache; \
	done
	for p in $(non-free-modules) ; \
	do \
		cd $(rootdir)/non-free/$$p; \
		abuild clean; \
		abuild cleanoldpkg; \
		abuild cleanpkg; \
		abuild cleancache; \
	done
	for p in $(unstable-modules) ; \
	do \
		cd $(rootdir)/unstable/$$p; \
		abuild clean; \
		abuild cleanoldpkg; \
		abuild cleanpkg; \
		abuild cleancache; \
	done