You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

GNUmakefile.in 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. #
  2. # PostgreSQL top level makefile
  3. #
  4. # GNUmakefile.in
  5. #
  6. subdir =
  7. top_builddir = .
  8. include $(top_builddir)/src/Makefile.global
  9. $(call recurse,all install,src config)
  10. all:
  11. +@echo "All of PostgreSQL successfully made. Ready to install."
  12. docs:
  13. $(MAKE) -C doc all
  14. $(call recurse,world,doc src config contrib,all)
  15. world:
  16. +@echo "PostgreSQL, contrib, and documentation successfully made. Ready to install."
  17. # build src/ before contrib/
  18. world-contrib-recurse: world-src-recurse
  19. html man:
  20. $(MAKE) -C doc $@
  21. install:
  22. +@echo "PostgreSQL installation complete."
  23. install-docs:
  24. $(MAKE) -C doc install
  25. $(call recurse,install-world,doc src config contrib,install)
  26. install-world:
  27. +@echo "PostgreSQL, contrib, and documentation installation complete."
  28. # build src/ before contrib/
  29. install-world-contrib-recurse: install-world-src-recurse
  30. $(call recurse,installdirs uninstall init-po update-po,doc src config)
  31. $(call recurse,distprep coverage,doc src config contrib)
  32. # clean, distclean, etc should apply to contrib too, even though
  33. # it's not built by default
  34. $(call recurse,clean,doc contrib src config)
  35. clean:
  36. rm -rf tmp_install/
  37. # Garbage from autoconf:
  38. @rm -rf autom4te.cache/
  39. # Important: distclean `src' last, otherwise Makefile.global
  40. # will be gone too soon.
  41. distclean maintainer-clean:
  42. $(MAKE) -C doc $@
  43. $(MAKE) -C contrib $@
  44. $(MAKE) -C config $@
  45. $(MAKE) -C src $@
  46. rm -rf tmp_install/
  47. # Garbage from autoconf:
  48. @rm -rf autom4te.cache/
  49. rm -f config.cache config.log config.status GNUmakefile
  50. check check-tests installcheck installcheck-parallel installcheck-tests: CHECKPREP_TOP=src/test/regress
  51. check check-tests installcheck installcheck-parallel installcheck-tests: submake-generated-headers
  52. $(MAKE) -C src/test/regress $@
  53. $(call recurse,check-world,src/test src/pl src/interfaces/ecpg contrib src/bin,check)
  54. $(call recurse,checkprep, src/test src/pl src/interfaces/ecpg contrib src/bin)
  55. $(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib src/bin,installcheck)
  56. GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
  57. ./config.status $@
  58. ##########################################################################
  59. distdir = postgresql-$(VERSION)
  60. dummy = =install=
  61. dist: $(distdir).tar.gz $(distdir).tar.bz2
  62. rm -rf $(distdir)
  63. $(distdir).tar: distdir
  64. $(TAR) chf $@ $(distdir)
  65. .INTERMEDIATE: $(distdir).tar
  66. distdir-location:
  67. @echo $(distdir)
  68. distdir:
  69. rm -rf $(distdir)* $(dummy)
  70. for x in `cd $(top_srcdir) && find . \( -name CVS -prune \) -o \( -name .git -prune \) -o -print`; do \
  71. file=`expr X$$x : 'X\./\(.*\)'`; \
  72. if test -d "$(top_srcdir)/$$file" ; then \
  73. mkdir "$(distdir)/$$file" && chmod 777 "$(distdir)/$$file"; \
  74. else \
  75. ln "$(top_srcdir)/$$file" "$(distdir)/$$file" >/dev/null 2>&1 \
  76. || cp "$(top_srcdir)/$$file" "$(distdir)/$$file"; \
  77. fi || exit; \
  78. done
  79. $(MAKE) -C $(distdir) distprep
  80. $(MAKE) -C $(distdir)/doc/src/sgml/ INSTALL
  81. cp $(distdir)/doc/src/sgml/INSTALL $(distdir)/
  82. $(MAKE) -C $(distdir) distclean
  83. rm -f $(distdir)/README.git
  84. distcheck: dist
  85. rm -rf $(dummy)
  86. mkdir $(dummy)
  87. $(GZIP) -d -c $(distdir).tar.gz | $(TAR) xf -
  88. install_prefix=`cd $(dummy) && pwd`; \
  89. cd $(distdir) \
  90. && ./configure --prefix="$$install_prefix"
  91. $(MAKE) -C $(distdir) -q distprep
  92. $(MAKE) -C $(distdir)
  93. $(MAKE) -C $(distdir) install
  94. $(MAKE) -C $(distdir) uninstall
  95. @echo "checking whether \`$(MAKE) uninstall' works"
  96. test `find $(dummy) ! -type d | wc -l` -eq 0
  97. $(MAKE) -C $(distdir) dist
  98. # Room for improvement: Check here whether this distribution tarball
  99. # is sufficiently similar to the original one.
  100. rm -rf $(distdir) $(dummy)
  101. @echo "Distribution integrity checks out."
  102. headerscheck: submake-generated-headers
  103. $(top_srcdir)/src/tools/pginclude/headerscheck $(top_srcdir) $(abs_top_builddir)
  104. cpluspluscheck: submake-generated-headers
  105. $(top_srcdir)/src/tools/pginclude/cpluspluscheck $(top_srcdir) $(abs_top_builddir)
  106. .PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world headerscheck cpluspluscheck