makefile.in 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # -*- make -*-
  2. # This is the build directory make file, it sets the build directory
  3. # and runs the src makefile.
  4. ifndef NOISY
  5. .SILENT:
  6. endif
  7. include environment.mak
  8. SRCDIR=@top_srcdir@
  9. DIRS:=./docs ./bin ./obj ./include ./scripts
  10. SUBDIRS:= $(DIRS) ./docs/examples ./bin/methods ./include/apt-pkg \
  11. ./include/deity ./obj/apt-pkg ./obj/deity ./obj/gui ./obj/cmdline \
  12. ./obj/test ./obj/methods ./obj/methods/ftp ./scripts/dselect
  13. BUILD:=$(shell pwd)
  14. export BUILD
  15. # Chain to the parent make to do the actual building
  16. .PHONY: headers library clean veryclean all binary program doc \
  17. veryclean/local
  18. all headers library clean veryclean binary program doc:
  19. $(MAKE) -C $(SRCDIR) -f Makefile $@
  20. # Purge everything.
  21. .PHONY: maintainer-clean dist-clean pristine sanity distclean
  22. maintainer-clean dist-clean pristine sanity distclean:
  23. -rm -rf $(DIRS)
  24. -rm -f config.cache config.log config.status environment.mak makefile
  25. # This makes any missing directories
  26. .PHONY: dirs
  27. MISSING_DIRS:= $(filter-out $(wildcard $(SUBDIRS)),$(SUBDIRS))
  28. dirs:
  29. @rm -f include/sys
  30. ifneq ($(words $(MISSING_DIRS)),0)
  31. @mkdir $(MISSING_DIRS)
  32. endif
  33. ifeq ($(HAVE_C9X),yes)
  34. @rm -f include/inttypes.h > /dev/null 2>&1
  35. else
  36. @cp -p $(SRCDIR)/buildlib/inttypes.h.in include/inttypes.h
  37. endif
  38. ifeq ($(HAVE_STATVFS),yes)
  39. @rm -f include/statvfs.h > /dev/null 2>&1
  40. else
  41. @cp -p $(SRCDIR)/buildlib/statvfs.h.in include/statvfs.h
  42. ln -sf . include/sys
  43. endif
  44. ifeq ($(NEED_SOCKLEN_T_DEFINE),yes)
  45. @cp -p $(SRCDIR)/buildlib/netdb.h.in include/netdb.h
  46. else
  47. @rm -f include/netdb.h > /dev/null 2>&1
  48. endif