Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright © 2016 Federico Beffa
  2. #
  3. # This program is free software; you can redistribute it and/or modify it
  4. # under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation; either version 3 of the License, or (at
  6. # your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful, but
  9. # WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. PACKAGE = chez-mit
  16. VERSION = 0.1
  17. CHEZ = chez-scheme
  18. INSTALL = install -D
  19. PREFIX = /usr/local
  20. EXEC_PREFIX = ${PREFIX}
  21. BINDIR = ${EXEC_PREFIX}/bin
  22. LIBDIR = ${EXEC_PREFIX}/lib
  23. INCLUDEDIR = ${PREFIX}/include
  24. DATAROOTDIR = ${PREFIX}/share
  25. DATADIR = ${DATAROOTDIR}
  26. MANDIR = ${DATAROOTDIR}/man
  27. INFODIR = ${DATAROOTDIR}/info
  28. DOCDIR = ${DATAROOTDIR}/doc/${PACKAGE}-${VERSION}
  29. chezversion ::= $(shell echo '(call-with-values scheme-version-number (lambda (a b c) (format \#t "~d.~d" a b)))' | ${CHEZ} -q)
  30. schemedir = ${LIBDIR}/csv${chezversion}-site
  31. build:
  32. $(CHEZ) --program compile-all.ss
  33. clean:
  34. find . -name "*.so" -exec rm {} \;
  35. find . -name "*~" -exec rm {} \;
  36. install:
  37. find . -type f -regex ".*.so" -exec sh -c '${INSTALL} -t ${schemedir}/$$(dirname $$1) $$1' _ {} \;
  38. ${INSTALL} -t ${DOCDIR} README
  39. install-src:
  40. find . -type f -regex ".*.sls" -exec sh -c '${INSTALL} -t ${schemedir}/$$(dirname $$1) $$1' _ {} \;
  41. test:
  42. $(CHEZ) --script ./mit/tests/test-arity.ss
  43. $(CHEZ) --script ./mit/tests/test-apply-hook.ss
  44. check-schemedir:
  45. echo ${schemedir}