makefile 1.2 KB

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