Makefile 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # This is a hand-written top-level Makefile
  2. # The main usage will be
  3. # make make all configured CSL and PSL versions of Reduce
  4. # make csl make just the CSL versions
  5. # make psl make just the PSL versions
  6. # make <anything> sequential
  7. # normally if there are both CSL and PSL versions configured
  8. # or if there are several variants of one of those (eg debug
  9. # and regular) this makes them all in parallel. That can make
  10. # the rebuild much faster, but it leaves the output showing
  11. # parts of all the builds interleaved, so if something goes
  12. # wrong it is unhelpful. Use "sequential" to force sequential
  13. # rather than parallel building if you need to keep a log for
  14. # debugging or diagnosis.
  15. #
  16. # make csl-sanity-check.sh
  17. # A simple test to ensure that there is at least a chance of
  18. # building the CSL version. This compiles a small test program
  19. # that should pop up a window.
  20. # [make snapshot] Work in progress to make a distributable archive relevant
  21. # to the current architecture.
  22. # [make install] Work in progress at this stage.
  23. .PHONY: dist all csl psl csl-sanity-test profile snapshot install
  24. # When debugging it may be useful to invoke scripts/make.sh in a noisy way...
  25. # as in "make VERBOSE=-v"
  26. # By default or with an explicit target "all" this will try to
  27. # (re-)build all versions of Reduce that have been configured.
  28. all:
  29. +$(SHELL) $(VERBOSE) scripts/make.sh $(MAKECMDGOALS)
  30. # The next will re-profile Reduce. It uses the first configured version
  31. # in the cslbuild directory.
  32. profile:
  33. cd `ls -d cslbuild/*/csl | head -1` && make profile
  34. profile-install:
  35. cd `ls -d cslbuild/*/csl | head -1` && make profile-install
  36. # This script tries a fairly basic sanity check to see if the
  37. # support-tools, include files and libraries needed to build the
  38. # CSL version of Reduce are available. It is NOT a perfect test but
  39. # may be useful in case of difficulty. See README.testprogram in the
  40. # csl directory for further explanation and especially for how to
  41. # run this test step by step manually. If the test succeeds it should
  42. # pop up a Window with the word "Arthur" in it.
  43. csl-sanity-test:
  44. if which cygcheck > /dev/null; then $(SHELL) $(VERBOSE) scripts/cygwin-sanity-check.sh ; fi
  45. $(SHELL) $(VERBOSE) scripts/csl-sanity-check.sh
  46. # "make snapshot" will, when I have finished implementing support for it,
  47. # create a file or several files in the directory "snapshots" representing
  48. # a distributable archive for the current system. I intend to make this
  49. # take over from the current situation where there are directories called
  50. # debianbuild, macbuild and winbuild each with separate sets of arrangements.
  51. # Well packing for different architectures will still involve platform-specific
  52. # code but I will arrange that through scripts triggerable in a uniform manner
  53. # here
  54. snapshot:
  55. # First build binaries for this machine.
  56. $(MAKE)
  57. # Then package the resulting binaries as a .deb, .rpm, .dmg or as a windows
  58. # installer file.
  59. scripts/snapshot.sh
  60. # "make install" will try to install both CSL and PSL versions (if
  61. # configured) in the same place and manner that they would have been
  62. # installed using the platform-specific installers. This should work
  63. # on Linux/Unix but the situation on Macintosh and Windows will be
  64. # harder. On *ix it will honours the "--prefix" option used with configure,
  65. # but on Windows it will probably always install in a default location.
  66. # Well the "install" option is somewhjat work in progress.
  67. install:
  68. $(SHELL) $(VERBOSE) scripts/install-reduce.sh $(MAKECMDGOALS)
  69. uninstall:
  70. $(SHELL) $(VERBOSE) scripts/uninstall.sh $(MAKECMDGOALS)
  71. .PHONY: csl psl
  72. csl psl:
  73. +$(SHELL) $(VERBOSE) scripts/make.sh $(MAKECMDGOALS)
  74. %::
  75. +$(SHELL) $(VERBOSE) scripts/make.sh $(MAKECMDGOALS)
  76. # end of Makefile