No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Makefile.am 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. #
  2. # This file is part of Lodel 2 (https://github.com/OpenEdition)
  3. #
  4. # Copyright (C) 2015-2017 Cléo UMS-3287
  5. #
  6. # This program is free software: you can redistribute it and/or modify
  7. # it under the terms of the GNU Affero General Public License as published
  8. # by the Free Software Foundation, either version 3 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU Affero General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU Affero General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. #
  19. SUBDIRS = lodel progs lodelsites
  20. EXTRA_DIST = runtest examples tests debian
  21. CLEANFILES = runtest
  22. lodel2_localstate_DATA =
  23. lodel2_localstatedir=$(localstatedir)/lodel2
  24. lodel2datadir=$(datadir)/lodel2
  25. install_model_dir = $(lodel2datadir)/install_model
  26. #python=/usr/bin/env python3
  27. python=@PYTHON@
  28. dyncode_filename='lodel/leapi/dyncode.py'
  29. docdir=${datarootdir}/doc/lodel2
  30. # Doxygen doc generation targets
  31. doxygen:
  32. test -z "@DOCOK@" && echo -e "\n\nUnable to generate documentation. See ./configure output for details\n\n" >&2 || make generate-doc
  33. generate-doc: clean doc_graphviz
  34. doxygen
  35. doc_graphviz:
  36. cd doc/img/graphviz; make
  37. do_subst = sed -e 's,\[@\]INSTALLMODEL_DIR\[@\],$(install_model_dir),g'
  38. runtest: ./runtest.sh
  39. $(do_subst) < $(srcdir)/runtest.sh > runtest
  40. chmod +x runtest
  41. #Adding logdir creation on install
  42. install-data-hook:
  43. mkdir -p ${DESTDIR}$(lodel2_localstatedir); mkdir -p ${DESTDIR}$(docdir); cp README ${DESTDIR}$(docdir);
  44. #Making debian package
  45. deb: dist
  46. mkdir debian_package;\
  47. tar -xvf ${PACKAGE}-${VERSION}.tar.gz -C ./debian_package;\
  48. cd debian_package/${PACKAGE}-${VERSION};\
  49. dpkg-buildpackage -rfakeroot;
  50. # Test em update ( examples/em_test.pickle )
  51. em_test: em_test.py
  52. $(python) em_test.py
  53. # Test em update ( examples/em_test.pickle )
  54. em_simple: editorial_models/em_simple.py
  55. $(python) editorial_models/em_simple.py
  56. # generate leapi dynamic code
  57. dyncode: examples/em_test.pickle
  58. $(python) scripts/refreshdyn.py examples/em_test.pickle $(dyncode_filename) && echo -e "\n\nCode generated in $(dyncode_filename)"
  59. # generate leapi dynamic code
  60. dyncode_simple: examples/em_simple.pickle
  61. $(python) scripts/refreshdyn.py examples/em_simple.pickle $(dyncode_filename) && echo -e "\n\nCode generated in $(dyncode_filename)"
  62. # run tests
  63. checks: runtest
  64. ./runtest -v
  65. unittest: checks
  66. #Cleaning documentation and dyncode
  67. clean-local: cleandoc
  68. -rm -vR doc/html doc/doxygen_sqlite3.db
  69. cleandoc:
  70. -rm -v $(dyncode_filename)
  71. #other cleans
  72. distclean-local:
  73. -rm -vR debian_package ${PACKAGE}-${VERSION}.tar.gz
  74. -find . -name Makefile.in -delete
  75. gitclean: distclean cleandoc
  76. -rm -vR autom4te.cache/ aclocal.m4 install-sh missing py-compile configure; find ./ -name Makefile.in |xargs rm -v
  77. .PHONY: cleandoc tests doc