]> git.saurik.com Git - apt.git/blame - vendor/makefile
vendor/makefile: fix build error for parallel builds
[apt.git] / vendor / makefile
CommitLineData
eef71f11
DK
1# -*- make -*-
2BASE=..
3SUBDIR=vendor
4
5# Bring in the default rules
6include ../buildlib/defaults.mak
7
8all headers library binary program doc manpages debiandoc test update-po startup dirs: current
9all: all/subdirs
10binary: binary/subdirs
11doc: doc/subdirs
12clean: clean/subdirs
13veryclean: veryclean/subdirs
14dirs: dirs/subdirs
15
16all/subdirs binary/subdirs doc/subdirs dirs/subdirs:
17 $(MAKE) -C current $(patsubst %/subdirs,%,$@)
18
19clean/subdirs veryclean/subdirs:
20 test ! -e current || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
21
22current:
23 rm -f $@
24 # search for an exact match to use the correct sources.list example
25 find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
26 if dpkg-vendor --is $$DISTRO; then \
27 ln -s $$DISTRO $@; \
28 break; \
29 fi; \
30 done
31 # if we haven't found a specific, look for a deriving in hardcoded order
32 test -e $@ || \
33 (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
34 ln -s debian $@
35
36.PHONY: clean veryclean all binary vendor
37
38clean: clean/current
39
40clean/current:
41 test ! -e current || $(MAKE) -C current clean
42 rm -f current