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.

Makefile 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # The PostgreSQL make files exploit features of GNU make that other
  2. # makes do not have. Because it is a common mistake for users to try
  3. # to build Postgres with a different make, we have this make file
  4. # that, as a service, will look for a GNU make and invoke it, or show
  5. # an error message if none could be found.
  6. # If the user were using GNU make now, this file would not get used
  7. # because GNU make uses a make file named "GNUmakefile" in preference
  8. # to "Makefile" if it exists. PostgreSQL is shipped with a
  9. # "GNUmakefile". If the user hasn't run the configure script yet, the
  10. # GNUmakefile won't exist yet, so we catch that case as well.
  11. # AIX make defaults to building *every* target of the first rule. Start with
  12. # a single-target, empty rule to make the other targets non-default.
  13. all:
  14. all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
  15. @if [ ! -f GNUmakefile ] ; then \
  16. echo "You need to run the 'configure' program first. See the file"; \
  17. echo "'INSTALL' for installation instructions." ; \
  18. false ; \
  19. fi
  20. @IFS=':' ; \
  21. for dir in $$PATH; do \
  22. for prog in gmake gnumake make; do \
  23. if [ -f $$dir/$$prog ] && ( $$dir/$$prog -f /dev/null --version 2>/dev/null | grep GNU >/dev/null 2>&1 ) ; then \
  24. GMAKE=$$dir/$$prog; \
  25. break 2; \
  26. fi; \
  27. done; \
  28. done; \
  29. \
  30. if [ x"$${GMAKE+set}" = xset ]; then \
  31. echo "Using GNU make found at $${GMAKE}"; \
  32. unset MAKELEVEL; \
  33. $${GMAKE} $@ ; \
  34. else \
  35. echo "You must use GNU make to build PostgreSQL." ; \
  36. false; \
  37. fi