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.
 
 
 
 
 
 

146 lines
4.0 KiB

  1. # GNU Guix --- Functional package management for GNU
  2. # Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
  3. # Copyright © 2013 Andreas Enge <andreas@enge.fr>
  4. # Copyright © 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
  5. #
  6. # This file is part of GNU Guix.
  7. #
  8. # GNU Guix is free software; you can redistribute it and/or modify it
  9. # under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 3 of the License, or (at
  11. # your option) any later version.
  12. #
  13. # GNU Guix is distributed in the hope that it will be useful, but
  14. # WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  20. info_TEXINFOS = doc/guix.texi
  21. DOT_FILES = \
  22. doc/images/bootstrap-graph.dot \
  23. doc/images/bootstrap-packages.dot \
  24. doc/images/coreutils-graph.dot \
  25. doc/images/coreutils-bag-graph.dot \
  26. doc/images/service-graph.dot \
  27. doc/images/dmd-graph.dot
  28. DOT_VECTOR_GRAPHICS = \
  29. $(DOT_FILES:%.dot=%.eps) \
  30. $(DOT_FILES:%.dot=%.pdf)
  31. EXTRA_DIST += \
  32. doc/contributing.texi \
  33. doc/emacs.texi \
  34. doc/fdl-1.3.texi \
  35. $(DOT_FILES) \
  36. $(DOT_VECTOR_GRAPHICS) \
  37. doc/images/coreutils-size-map.eps \
  38. doc/environment-gdb.scm \
  39. doc/package-hello.scm
  40. OS_CONFIG_EXAMPLES_TEXI = \
  41. doc/os-config-bare-bones.texi \
  42. doc/os-config-desktop.texi
  43. # Bundle this file so that makeinfo finds it in out-of-source-tree builds.
  44. BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI)
  45. EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI)
  46. MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI)
  47. doc/os-config-%.texi: gnu/system/examples/%.tmpl
  48. $(MKDIR_P) "`dirname "$@"`"
  49. cp "$<" "$@"
  50. infoimagedir = $(infodir)/images
  51. dist_infoimage_DATA = \
  52. $(DOT_FILES:%.dot=%.png) \
  53. doc/images/coreutils-size-map.png
  54. # Try hard to obtain an image size and aspect that's reasonable for inclusion
  55. # in an Info or PDF document.
  56. DOT_OPTIONS = \
  57. -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
  58. -Nfontsize=9 -Nheight=.1 -Nwidth=.1
  59. .dot.png:
  60. $(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
  61. mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
  62. .dot.pdf:
  63. $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
  64. mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
  65. .dot.eps:
  66. $(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
  67. mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
  68. .png.eps:
  69. convert "$<" "$@-tmp.eps"
  70. mv "$@-tmp.eps" "$@"
  71. # We cannot add new dependencies to `doc/guix.pdf' & co. (info "(automake)
  72. # Extending"). Using the `-local' rules is imperfect, because they may be
  73. # triggered after the main rule. Oh, well.
  74. pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
  75. info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
  76. ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
  77. $(top_srcdir)/doc/images/coreutils-size-map.eps
  78. dvi-local: ps-local
  79. # Manual pages.
  80. doc/guix.1: $(SUBCOMMANDS:%=guix/scripts/%.scm)
  81. -LANGUAGE= $(top_builddir)/pre-inst-env \
  82. $(HELP2MAN) --output="$@" guix
  83. # Note: Do not depend on 'guix-daemon' since that would trigger a rebuild even
  84. # for people building from a tarball.
  85. doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc
  86. -LANGUAGE= $(top_builddir)/pre-inst-env \
  87. $(HELP2MAN) --output="$@" guix-daemon
  88. define subcommand-manual-target
  89. doc/guix-$(1).1: guix/scripts/$(1).scm
  90. -LANGUAGE= $(top_builddir)/pre-inst-env \
  91. $(HELP2MAN) --output="$$@" "guix $(1)"
  92. endef
  93. SUBCOMMANDS := \
  94. archive \
  95. build \
  96. challenge \
  97. download \
  98. edit \
  99. environment \
  100. gc \
  101. hash \
  102. import \
  103. lint \
  104. package \
  105. publish \
  106. pull \
  107. refresh \
  108. size \
  109. system
  110. $(eval $(foreach subcommand,$(SUBCOMMANDS), \
  111. $(call subcommand-manual-target,$(subcommand))))
  112. dist_man1_MANS = \
  113. doc/guix.1 \
  114. $(SUBCOMMANDS:%=doc/guix-%.1)
  115. if BUILD_DAEMON
  116. dist_man1_MANS += \
  117. doc/guix-daemon.1
  118. endif