makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. all/subdirs binary/subdirs doc/subdirs dirs/subdirs:
  14. $(MAKE) -C current $(patsubst %/subdirs,%,$@)
  15. clean/subdirs veryclean/subdirs:
  16. test ! -e current || $(MAKE) -C current $(patsubst %/subdirs,%,$@)
  17. current:
  18. rm -f $@
  19. # search for an exact match to use the correct sources.list example
  20. find -mindepth 1 -maxdepth 1 -type d | cut -d'/' -f 2 | while read DISTRO; do \
  21. if dpkg-vendor --is $$DISTRO; then \
  22. ln -s $$DISTRO $@; \
  23. break; \
  24. fi; \
  25. done
  26. # if we haven't found a specific, look for a deriving in hardcoded order
  27. test -e $@ || \
  28. (dpkg-vendor --derives-from ubuntu && cp ln -s ubuntu $@ ) || \
  29. ln -s debian $@
  30. .PHONY: clean veryclean all binary vendor
  31. clean: clean/current
  32. clean/current:
  33. test ! -e current || $(MAKE) -C current clean
  34. rm -f current