summaryrefslogtreecommitdiff
path: root/vendor/makefile
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
committerMichael Vogt <mvo@debian.org>2014-01-06 07:51:45 +0100
commit1b4560fec66a6e7b2dff9aaa19095fb8423f69a0 (patch)
tree7fb2b63e31f356ef87af4699ba87b4f1443f508c /vendor/makefile
parent81d183681aea972fddd453d62109f8ccda3f447a (diff)
parent74d4bb26e09146b9d5f01889a676dc58ff5d63cd (diff)
Merge branch 'debian/sid' into feature/apt-manpage
Diffstat (limited to 'vendor/makefile')
-rw-r--r--vendor/makefile43
1 files changed, 43 insertions, 0 deletions
diff --git a/vendor/makefile b/vendor/makefile
new file mode 100644
index 000000000..c05b516ef
--- /dev/null
+++ b/vendor/makefile
@@ -0,0 +1,43 @@
+# -*- 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 $@ ) || \
+ ln -s debian $@
+
+.PHONY: clean veryclean all binary vendor
+
+clean: clean/current
+
+clean/current:
+ test ! -e current || $(MAKE) -C current clean
+ rm -f current