Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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-scmutils
  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 doc/refman.txt
  39. install-src:
  40. find . -type f -regex ".*.s\(ls\|cm\)" -exec sh -c '${INSTALL} -t ${schemedir}/$$(dirname $$1) $$1' _ {} \;
  41. ${INSTALL} -t ${schemedir} Makefile compile-all.ss
  42. check-schemedir:
  43. echo ${schemedir}