blob: 619c603fbd5d4f658f3370c4a9ffd3b252684893 (
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
|
# -*- make -*-
BASE=..
SUBDIR=vendor
# Bring in the default rules
include ../buildlib/defaults.mak
all headers library binary program doc manpages debiandoc test update-po startup dirs: current
all: all/subdirs
binary: binary/subdirs
doc: doc/subdirs
clean: clean/subdirs
veryclean: veryclean/subdirs
dirs: dirs/subdirs
manpages: manpages/subdirs
all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs:
$(MAKE) -C current $(patsubst %/subdirs,%,$@)
clean/subdirs veryclean/subdirs:
test ! -e current || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
current:
rm -f $@
# search for an exact match to use the correct sources.list example
find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
if dpkg-vendor --is $$DISTRO; then \
ln -s $$DISTRO $@; \
break; \
fi; \
done
# if we haven't found a specific, look for a deriving in hardcoded order
test -e $@ || \
(dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
(dpkg-vendor --derives-from tanglu && cp ln -s tanglu $@ ) || \
ln -s debian $@
.PHONY: clean veryclean all binary vendor
.NOPARALLEL:
clean: clean/current
clean/current:
test ! -e current || $(MAKE) -C current clean
rm -f current
|