Makefile.am 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # This Makefile.am is in the public domain
  2. AM_CPPFLAGS = -I$(top_srcdir)/src/include
  3. # only documentation (ALL of the documentation)
  4. if DOCUMENTATION_ONLY
  5. SUBDIRS = bin doc
  6. else
  7. SUBDIRS = m4 bin src po pkgconfig
  8. endif
  9. # documentation on / off switch (affects all of the documentation)
  10. if DOCUMENTATION
  11. SUBDIRS += doc
  12. endif
  13. # only manpages, needs "doc" subdir
  14. if INCLUDE_MANPAGES
  15. SUBDIRS += doc
  16. endif
  17. if !TALER_ONLY
  18. SUBDIRS += contrib
  19. endif
  20. EXTRA_DIST = \
  21. ABOUT-NLS \
  22. config.rpath \
  23. acinclude.m4 \
  24. README.1st
  25. gnunetincludedir = $(includedir)/gnunet
  26. gnunetinclude_HEADERS = gnunet_config.h
  27. docdir = $(datadir)/doc/gnunet/
  28. doc_DATA = COPYING README
  29. ACLOCAL_AMFLAGS = -I m4
  30. if HAVE_UNCRUSTIFY_BINARY
  31. MCRUSTIFY = find $(top_srcdir) -type f -name '*.c' -or -name '*.h' -print0 | xargs -0 uncrustify -c $(top_srcdir)/uncrustify.cfg -q --replace --no-backup 2>&1 || true
  32. else
  33. MCRUSTIFY = echo "crustify: skipped"
  34. endif
  35. if HAVE_YAPF_BINARY
  36. MYAPF = find $(top_srcdir) -type f -name '*.py' -or -name '*.py.in' -print0 | xargs -0 $(YAPF_BINARY) -i 2>&1 || true
  37. else
  38. MYAPF = echo "yapf: skipped"
  39. endif
  40. pretty:
  41. $(MCRUSTIFY)
  42. $(MYAPF)
  43. lint: check-bashisms check-texinfo check-man check-python
  44. check-bashisms:
  45. if HAVE_CHECKBASHISMS
  46. printf "If checkbashisms.pl is in PATH, run checkbashism on all .sh files.\n"
  47. find '.' -type f ! -path '*/.*' ! -path '*/_*' -name '*.sh' -print0 | xargs -0 checkbashisms.pl -f 2>&1 | tee $(srcdir)/bashism.log || true
  48. else
  49. printf "No checkbashisms in PATH, skipped"
  50. endif
  51. check-man:
  52. printf "Running lint-man.sh in doc/man.\n"
  53. @cd $(top_srcdir)/doc/man ; ../../contrib/scripts/lint/lint-man.sh || true
  54. check-python:
  55. printf "Running flake8 and 2to3 if detected.\n"
  56. $(top_srcdir)/contrib/scripts/lint/lint-python.sh || true
  57. if HAVE_AWK
  58. check-texinfo:
  59. @cd $(top_srcdir); find . -type f ! -path '*/.*' -name '*.texi' -print0 | xargs -0 ./contrib/scripts/check-texinfo.awk > $(srcdir)/texinfo_lint.log || true
  60. endif