Makefile.am 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Makefile.am
  2. # $Id$
  3. srcdir = @srcdir@
  4. VPATH = @srcdir@
  5. ACLOCAL_AMFLAGS = -I m4
  6. if wx
  7. .PHONY: all wx
  8. else
  9. if fox
  10. .PHONY: all fox
  11. else
  12. .PHONY: all
  13. endif
  14. endif
  15. # I want to be able to see what gets built and why, so here is a GNU
  16. # make trace facility.
  17. TRACE = $(warning TRACE: $@ :: $?)
  18. # As at present set up this Makefile.am imagines that in a CSL build
  19. # directory there are two sub-directories, csl and fox or wxWidgets, and it is
  20. # necessary to delegate make to each of them. Well if a GUI is not needed
  21. # or if a system version of wxWidgets is to be used then the fox/wxWidgets
  22. # sub-directory is not used.
  23. #
  24. # For PSL it supposes that there will be a build directory called
  25. # psl to delegate to.
  26. AM_MAKEFLAGS=$(MFLAGS) $(MYFLAGS)
  27. if csl
  28. LISPDIR=csl
  29. if fox
  30. FOXDEP=include/fox-1.6/fxver.h
  31. else
  32. FOXDEP=
  33. endif
  34. if wx
  35. WXDEP=bin/wx-config
  36. else
  37. WXDEP=
  38. endif
  39. else
  40. if psl
  41. LISPDIR=psl
  42. FOXDEP=
  43. WXDEP=
  44. else
  45. LISPDIR=unknown
  46. FOXDEP=
  47. WXDEP=
  48. endif
  49. endif
  50. # I have "all" as a special case here because the first target should be
  51. # the default one.
  52. all: $(FOXDEP) $(WXDEP)
  53. echo Build all: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) all
  54. cd $(LISPDIR) && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) all MYFLAGS="$(MFLAGS) $(MYFLAGS)"
  55. if csl
  56. if fox
  57. fox $(FOXDEP):
  58. echo Build FOX: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) install
  59. cd fox && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) install MYFLAGS="$(MFLAGS) $(MYFLAGS)"
  60. endif
  61. if wx
  62. wx $(WXDEP):
  63. echo Build wxWidgets: $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) install
  64. cd wxWidgets && $(LOCALCYG) $(MAKE) $(MFLAGS) $(MYFLAGS) install MYFLAGS="$(MFLAGS) $(MYFLAGS)"
  65. endif
  66. # If one of the major foundations of this Makefile have a date later than that
  67. # on fxver.h then make does a futile recursion to try to fix it and in the
  68. # process it can do a LOT of work that I do not want done. I can at least
  69. # arrange that that happens at most once by putting the following rules:
  70. $(srcdir)/configure.ac:
  71. touch "$(srcdir)/configure.ac"
  72. $(srcdir)/Makefile.am:
  73. touch "$(srcdir)/Makefile.am"
  74. endif
  75. %:: $(FOXDEP) $(WXDEP)
  76. echo $(MAKE) mflags=$(MFLAGS) myflags=$(MYFLAGS) makecmdgoals=$(MAKECMDGOALS)
  77. cd $(LISPDIR) && $(MAKE) $(MFLAGS) $(MYFLAGS) $(MAKECMDGOALS) MYFLAGS="$(MFLAGS) $(MYFLAGS)"
  78. # end of Makefile.am