makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. ln -s debian $@
  31. .PHONY: clean veryclean all binary vendor
  32. clean: clean/current
  33. clean/current:
  34. test ! -e current || $(MAKE) -C current clean
  35. rm -f current