PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/Makefile

http://github.com/hraberg/deuce
Makefile | 140 lines | 98 code | 41 blank | 1 comment | 11 complexity | f3a3baffcb484d79852c05a02c05cf2a MD5 | raw file
Possible License(s): GPL-3.0
  1. SHELL=/bin/bash
  2. emacs_version=24.2
  3. emacs_tag=emacs-$(emacs_version)
  4. emacs_configure_flags=--with-x=no --without-xpm --without-jpeg --without-tiff --without-gif --without-png \
  5. --without-toolkit-scroll-bars --without-xim --without-sound --without-makeinfo --without-selinux \
  6. --without-dbus --without-gsettings --without-gconf --without-gnutls # 24.3: ./configure --without-all --with-x=no
  7. emacs_lisp_files=$(shell find emacs/lisp -iname "*.el")
  8. zile_version=2.4.11
  9. zile_tag=v$(zile_version)
  10. deuce_version=$(shell head -1 project.clj | awk '{ print $$3 }' | sed s/\"//g)
  11. deuce_uberjar=target/deuce-$(deuce_version)-standalone.jar
  12. deuce_stubs=src-$(emacs_version)-stubs
  13. deuce_source_files=$(shell find src -iname "*.clj")
  14. resources_to_ignore=! -iname "flycheck_*" ! -iname ".\#*" ! -path "*/node_modules/*" ! -path "*bundle.js"
  15. deuce_javascript=$(shell find resources/public -iname "*.js" $(resources_to_ignore))
  16. deuce_css=$(shell find resources/public -iname "*.css" $(resources_to_ignore))
  17. nw_version=0.12.0-alpha3
  18. node_modules=resources/public/node_modules
  19. node=node --harmony
  20. nwbuild=$(node) $(node_modules)/.bin/nwbuild -v $(nw_version)
  21. nw_tests=$(shell grep -l "require('assert')" $(deuce_javascript))
  22. smoke_test_args=-Q --batch --eval "(print (emacs-version))"
  23. all: target/deuce test
  24. emacs/Makefile:
  25. git submodule update --init emacs
  26. (cd emacs && git checkout $(emacs_tag) && ./autogen.sh && ./configure $(emacs_configure_flags))
  27. emacs/src/emacs: emacs/Makefile
  28. make -C emacs CONFIGURE_FLAGS="$(emacs_configure_flags)" bootstrap
  29. emacs/src/temacs: emacs/src/emacs
  30. make -C emacs/src temacs
  31. emacs/lisp/loaddefs.el: emacs/src/emacs
  32. make -C emacs/lisp autoloads
  33. emacs-tests: emacs/src/emacs
  34. make -C emacs/test/automated check
  35. emacs-smoke: emacs/src/temacs
  36. $< $(smoke_test_args)
  37. zile/Makefile:
  38. git submodule update --init zile
  39. (cd zile && git checkout $(zile_tag) && ./bootstrap && ./configure)
  40. zile/src/zile: zile/Makefile
  41. make -C zile
  42. zile-tests: zile/src/zile emacs/src/emacs
  43. make -C zile check EMACSPROG=../emacs/src/emacs
  44. $(deuce_uberjar): emacs/lisp/loaddefs.el $(emacs_lisp_files) $(deuce_source_files)
  45. lein do run -q --batch, uberjar
  46. define deuce_header
  47. #!/bin/sh
  48. exec java -client -noverify -jar "$$0" -q "$$@"
  49. exit
  50. endef
  51. export deuce_header
  52. target/deuce: $(deuce_uberjar)
  53. echo "$$deuce_header" > $@
  54. cat $(deuce_uberjar) >> $@
  55. chmod +x $@
  56. clean:
  57. rm -rf target
  58. dist: clean all
  59. test:
  60. lein difftest
  61. smoke: target/deuce
  62. $< $(smoke_test_args)
  63. $(node_modules): resources/public/package.json
  64. (cd $(@D) && npm prune && npm install && npm outdated --depth 0)
  65. touch $@
  66. eslint: $(deuce_javascript) $(node_modules)
  67. $(node_modules)/.bin/$@ $(deuce_javascript)
  68. csslint: $(deuce_css) $(node_modules)
  69. $(node_modules)/.bin/$@ $(deuce_css)
  70. lint: eslint csslint
  71. nw: $(node_modules)
  72. $(nwbuild) -r resources/public
  73. nwbuild: $(node_modules)
  74. $(nwbuild) -p linux64,osx64,win64 -o target/nwbuild resources/public
  75. nwtest: eslint
  76. $(foreach f, $(nw_tests),$(node) $(f) || exit;)
  77. run: target/deuce
  78. $<
  79. run-dev: emacs/lisp/loaddefs.el
  80. lein run -Q --nrepl
  81. docs/index.html: $(deuce_source_files)
  82. git submodule update --init docs
  83. rm -rf docs/codox
  84. lein do marg-el, codox
  85. docs: docs/index.html
  86. emacs/src/TAGS: emacs/Makefile
  87. make -C emacs/src tags
  88. emacs/src/TAGS-LISP: emacs/src/TAGS
  89. emacs/src/TAGS-TEMACS: emacs/src/temacs
  90. (cd emacs/src && \
  91. ../lib-src/etags -o TAGS-TEMACS --regex='/[ ]*DEFVAR_[A-Z_ (]+"\([^"]+\)"/' $$(echo *.o | sed s/\\.o/.c/g))
  92. TAGS: emacs/src/TAGS emacs/src/TAGS-LISP
  93. cat $? > TAGS
  94. find src/deuce/emacs/ -name "*.clj" -print | etags --language=lisp -a TAGS -
  95. $(deuce_stubs): emacs/src/TAGS-TEMACS
  96. @echo "NOTE: this doesn't take the interactive directivies on the DEFUN into account. It probably should."
  97. lein run -m deuce.scaffold $(deuce_stubs)/deuce/emacs
  98. stubs: $(deuce_stubs)
  99. .PHONY: test emacs-tests zile-tests emacs-smoke smoke clean stubs dist run run-dev all eslint csslint lint nw nwbuild nwtest