Turkish program translation update
[ntk/apt.git] / vendor / makefile
CommitLineData
eef71f11
DK
1# -*- make -*-
2BASE=..
3SUBDIR=vendor
4
5# Bring in the default rules
6include ../buildlib/defaults.mak
7
a034d852 8all headers library binary program doc manpages docbook test update-po startup dirs: current
eef71f11
DK
9all: all/subdirs
10binary: binary/subdirs
11doc: doc/subdirs
12clean: clean/subdirs
13veryclean: veryclean/subdirs
14dirs: dirs/subdirs
5cc8cbf3 15manpages: manpages/subdirs
eef71f11 16
fa19cc95
DK
17all/subdirs binary/subdirs doc/subdirs dirs/subdirs manpages/subdirs clean/subdirs veryclean/subdirs:
18 test ! -e current/makefile || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
19 test ! -e current/makefile.auto || $(MAKE) -C current -f makefile.auto $(patsubst %/subdirs,%,$@)
eef71f11
DK
20
21current:
22 rm -f $@
23 # search for an exact match to use the correct sources.list example
24 find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
25 if dpkg-vendor --is $$DISTRO; then \
26 ln -s $$DISTRO $@; \
27 break; \
28 fi; \
29 done
fa19cc95
DK
30 # if we haven't found a specific, look for a deriving
31 # we do ubuntu and debian last as those are the biggest families
32 # and would therefore potentially 'shadow' smaller families
33 # (especially debian as it sorts quiet early)
34 if ! test -e $@; then \
35 find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
36 if [ "$$DISTRO" = 'debian' -o "$$DISTRO" = 'ubuntu' ]; then continue; fi; \
37 if dpkg-vendor --derives-from $$DISTRO; then \
38 ln -s $$DISTRO $@; \
39 break; \
40 fi; \
41 done; \
42 test -e $@ || \
43 (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
44 ln -s debian $@; \
45 fi
46 if test ! -e current/makefile; then \
47 sed "s#@@VENDOR@@#$(notdir $(shell readlink -f current))#" vendor.makefile > current/makefile.auto; \
48 fi
eef71f11
DK
49
50.PHONY: clean veryclean all binary vendor
51
52clean: clean/current
53
fa19cc95
DK
54clean/current: clean/subdirs
55 rm -f current/makefile.auto current