autogen.mk 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. # Created: 2005/03/12
  2. # Author: David Elliott
  3. # Usage Example:
  4. # make -f build/autogen.mk ACLOCAL=aclocal-1.9
  5. # This is a simple Makefile to update the UNIX build system in such a
  6. # way that doing a cvs diff on its output files should reveal only the
  7. # true changes, not meaningless differences due to slightly different
  8. # autoconf or aclocal m4 files.
  9. # For aclocal: All necessary m4 files are located in the build/aclocal
  10. # directory. Running aclocal -I build/aclocal when using aclocal 1.9
  11. # will result in an aclocal.m4 which uses m4_include for these files.
  12. ACLOCAL=aclocal
  13. AUTOCONF=autoconf
  14. BAKEFILE_GEN=bakefile_gen
  15. AUTOHACKS_PREPEND_INCLUDE_DIR=build/autoconf_prepend-include
  16. # configure depends on everything else so this will build everything.
  17. .PHONY: all
  18. all: configure
  19. .PHONY: autoconf_m4f
  20. # Invoke make on wxAutohacks dir, but don't fail if it's not present
  21. autoconf_m4f:
  22. -make -C $(AUTOHACKS_PREPEND_INCLUDE_DIR)
  23. BAKEFILES=\
  24. build/bakefiles/wx.bkl \
  25. build/bakefiles/common.bkl \
  26. build/bakefiles/files.bkl \
  27. build/bakefiles/monolithic.bkl \
  28. build/bakefiles/multilib.bkl \
  29. build/bakefiles/opengl.bkl \
  30. build/bakefiles/plugins.bkl \
  31. build/bakefiles/build_cfg.bkl
  32. # Run bakefile-gen (which generates everything) whenever a bakefile is newer
  33. # than Makefile.in or autoconf_inc.m4.
  34. # This dep is obviously wrong but probably close enough
  35. autoconf_inc.m4 Makefile.in: $(BAKEFILES)
  36. cd build/bakefiles && \
  37. $(BAKEFILE_GEN) -f autoconf
  38. # Run configure whenever configure.in, aclocal.m4 or autoconf_inc.m4 is updated
  39. # Depend on our custom autoconf.m4f
  40. configure: configure.in aclocal.m4 autoconf_inc.m4 autoconf_m4f
  41. $(AUTOCONF) -B $(AUTOHACKS_PREPEND_INCLUDE_DIR)
  42. ACLOCAL_SOURCES = \
  43. build/aclocal/ac_raf_func_which_getservbyname_r.m4 \
  44. build/aclocal/atomic_builtins.m4 \
  45. build/aclocal/ax_func_which_gethostbyname_r.m4 \
  46. build/aclocal/bakefile-dllar.m4 \
  47. build/aclocal/bakefile-lang.m4 \
  48. build/aclocal/bakefile.m4 \
  49. build/aclocal/cppunit.m4 \
  50. build/aclocal/gst-element-check.m4 \
  51. build/aclocal/gtk-2.0.m4 \
  52. build/aclocal/gtk.m4 \
  53. build/aclocal/pkg.m4 \
  54. build/aclocal/sdl.m4 \
  55. build/aclocal/visibility.m4
  56. # Run aclocal whenever acinclude or one of our local m4s is updated.
  57. aclocal.m4: configure.in acinclude.m4 $(ACLOCAL_SOURCES)
  58. $(ACLOCAL) -I build/aclocal