| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 | MANUAL_LANGUAGES = de es fr it pt_BR ru zh_CN
|
| 29 | COOKBOOK_LANGUAGES = de es fr it ko pt_BR ru sk sv zh_CN
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 | lang_to_texinfo = $(foreach lang,$(1),$(srcdir)/%D%/$(2).$(lang).texi)
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 | info_TEXINFOS = %D%/guix.texi \
|
| 38 | %D%/guix.de.texi \
|
| 39 | %D%/guix.es.texi \
|
| 40 | %D%/guix.fr.texi \
|
| 41 | %D%/guix.it.texi \
|
| 42 | %D%/guix.pt_BR.texi \
|
| 43 | %D%/guix.ru.texi \
|
| 44 | %D%/guix.zh_CN.texi \
|
| 45 | %D%/guix-cookbook.texi \
|
| 46 | %D%/guix-cookbook.de.texi \
|
| 47 | %D%/guix-cookbook.es.texi \
|
| 48 | %D%/guix-cookbook.fr.texi \
|
| 49 | %D%/guix-cookbook.it.texi \
|
| 50 | %D%/guix-cookbook.ko.texi \
|
| 51 | %D%/guix-cookbook.pt_BR.texi \
|
| 52 | %D%/guix-cookbook.ru.texi \
|
| 53 | %D%/guix-cookbook.sk.texi \
|
| 54 | %D%/guix-cookbook.sv.texi \
|
| 55 | %D%/guix-cookbook.zh_CN.texi
|
| 56 |
|
| 57 | %C%_guix_TEXINFOS = \
|
| 58 | $(OS_CONFIG_EXAMPLES_TEXI) \
|
| 59 | %D%/contributing.texi \
|
| 60 | %D%/fdl-1.3.texi
|
| 61 |
|
| 62 | DOT_FILES = \
|
| 63 | %D%/images/bootstrap-graph.dot \
|
| 64 | %D%/images/bootstrap-packages.dot \
|
| 65 | %D%/images/coreutils-graph.dot \
|
| 66 | %D%/images/coreutils-bag-graph.dot \
|
| 67 | %D%/images/gcc-core-mesboot0-graph.dot \
|
| 68 | %D%/images/service-graph.dot \
|
| 69 | %D%/images/shepherd-graph.dot
|
| 70 |
|
| 71 | DOT_VECTOR_GRAPHICS = \
|
| 72 | $(DOT_FILES:%.dot=%.eps) \
|
| 73 | $(DOT_FILES:%.dot=%.pdf)
|
| 74 |
|
| 75 | EXTRA_DIST += \
|
| 76 | %D%/htmlxref.cnf \
|
| 77 | $(DOT_FILES) \
|
| 78 | $(DOT_VECTOR_GRAPHICS) \
|
| 79 | %D%/images/coreutils-size-map.eps \
|
| 80 | %D%/environment-gdb.scm \
|
| 81 | %D%/package-hello.scm \
|
| 82 | %D%/package-hello.json
|
| 83 |
|
| 84 | OS_CONFIG_EXAMPLES_TEXI = \
|
| 85 | %D%/os-config-bare-bones.texi \
|
| 86 | %D%/os-config-desktop.texi \
|
| 87 | %D%/os-config-lightweight-desktop.texi \
|
| 88 | %D%/he-config-bare-bones.scm
|
| 89 |
|
| 90 | TRANSLATED_INFO = \
|
| 91 | $(call lang_to_texinfo,$(MANUAL_LANGUAGES),guix) \
|
| 92 | $(call lang_to_texinfo,$(MANUAL_LANGUAGES),contributing) \
|
| 93 | $(call lang_to_texinfo,$(COOKBOOK_LANGUAGES),guix-cookbook)
|
| 94 |
|
| 95 |
|
| 96 | BUILT_SOURCES += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
| 97 | EXTRA_DIST += $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
| 98 | MAINTAINERCLEANFILES = $(OS_CONFIG_EXAMPLES_TEXI) $(TRANSLATED_INFO)
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 | define xref_command
|
| 106 | $(top_builddir)/pre-inst-env $(GUILE) --no-auto-compile \
|
| 107 | "$(top_srcdir)/build-aux/convert-xref.scm" \
|
| 108 | [email protected] $<
|
| 109 | endef
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 | dummy_pot = $(shell mktemp --suffix=.pot)
|
| 114 |
|
| 115 | $(srcdir)/%D%/guix.%.texi: po/doc/guix-manual.%.po $(srcdir)/%D%/contributing.%.texi guix/build/po.go
|
| 116 | -$(AM_V_PO4A)$(PO4A) --no-update \
|
| 117 | --variable localized="$@.tmp" \
|
| 118 | --variable master="$(srcdir)/%D%/guix.texi" \
|
| 119 | --variable po="$<" \
|
| 120 | --variable pot=$(dummy_pot) \
|
| 121 | $(srcdir)/po/doc/po4a.cfg
|
| 122 | -sed -i "s|guix\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
|
| 123 | -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
| 124 | -mv "$@.tmp" "$@"
|
| 125 |
|
| 126 | $(srcdir)/%D%/guix-cookbook.%.texi: po/doc/guix-cookbook.%.po guix/build/po.go
|
| 127 | -$(AM_V_PO4A)$(PO4A) --no-update \
|
| 128 | --variable localized="$@.tmp" \
|
| 129 | --variable master="$(srcdir)/%D%/guix-cookbook.texi" \
|
| 130 | --variable po="$<" \
|
| 131 | --variable pot=$(dummy_pot) \
|
| 132 | $(srcdir)/po/doc/po4a.cfg
|
| 133 | -sed -i "s|guix-cookbook\.info|$$(basename "$@" | sed 's|texi$$|info|')|" "$@.tmp"
|
| 134 | -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
| 135 | -mv "$@.tmp" "$@"
|
| 136 |
|
| 137 | $(srcdir)/%D%/contributing.%.texi: po/doc/guix-manual.%.po guix/build/po.go
|
| 138 | -$(AM_V_PO4A)$(PO4A) --no-update \
|
| 139 | --variable localized="$@.tmp" \
|
| 140 | --variable master="$(srcdir)/%D%/contributing.texi" \
|
| 141 | --variable po="$<" \
|
| 142 | --variable pot=$(dummy_pot) \
|
| 143 | $(srcdir)/po/doc/po4a.cfg
|
| 144 | -$(AM_V_POXREF)LC_ALL=en_US.UTF-8 $(xref_command)
|
| 145 | -mv "$@.tmp" "$@"
|
| 146 |
|
| 147 | %D%/os-config-%.texi: gnu/system/examples/%.tmpl
|
| 148 | $(AM_V_GEN)$(MKDIR_P) "`dirname $@`"; \
|
| 149 | sed -e s,@,@@,g "$<" > "$@"
|
| 150 |
|
| 151 | infoimagedir = $(infodir)/images
|
| 152 | dist_infoimage_DATA = \
|
| 153 | $(DOT_FILES:%.dot=%.png) \
|
| 154 | %D%/images/coreutils-size-map.png \
|
| 155 | %D%/images/installer-network.png \
|
| 156 | %D%/images/installer-partitions.png \
|
| 157 | %D%/images/installer-resume.png
|
| 158 |
|
| 159 |
|
| 160 |
|
| 161 | AM_MAKEINFOHTMLFLAGS = --set-customization-variable CHECK_HTMLXREF=true
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 | DOT_OPTIONS = \
|
| 166 | -Gratio=.9 -Gnodesep=.005 -Granksep=.00005 \
|
| 167 | -Nfontsize=9 -Nheight=.1 -Nwidth=.1
|
| 168 |
|
| 169 | .dot.png:
|
| 170 | $(AM_V_DOT)$(DOT) -Tpng $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
|
| 171 | $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
|
| 172 |
|
| 173 | .dot.pdf:
|
| 174 | $(AM_V_DOT)set -e; export TZ=UTC0; \
|
| 175 | $(DOT) -Tpdf $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
|
| 176 | $(AM_V_at)sed -ri \
|
| 177 | -e 's,(/CreationDate \(D:).*\),\119700101000000),' \
|
| 178 | "$(srcdir)/$@.tmp"
|
| 179 | $(AM_V_at)mv "$(srcdir)/$@.tmp" "$(srcdir)/$@"
|
| 180 |
|
| 181 | .dot.eps:
|
| 182 | $(AM_V_DOT)$(DOT) -Teps $(DOT_OPTIONS) < "$<" > "$(srcdir)/$@.tmp"
|
| 183 | $(AM_v_at)! grep -q %%CreationDate "$(srcdir)/$@.tmp"
|
| 184 | $(AM_V_at)mv "$(srcdir)/$@.tmp" "$@"
|
| 185 |
|
| 186 | .png.eps:
|
| 187 | $(AM_V_GEN)convert "$<" "$@-tmp.eps"
|
| 188 | $(AM_V_at)mv "$@-tmp.eps" "$@"
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
|
| 193 | pdf-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.pdf)
|
| 194 | info-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.png)
|
| 195 | ps-local: $(DOT_FILES=%.dot=$(top_srcdir)/%.eps) \
|
| 196 | $(top_srcdir)/%D%/images/coreutils-size-map.eps
|
| 197 | dvi-local: ps-local
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 | sub_commands_mans = \
|
| 210 | $(srcdir)/%D%/guix-archive.1 \
|
| 211 | $(srcdir)/%D%/guix-build.1 \
|
| 212 | $(srcdir)/%D%/guix-challenge.1 \
|
| 213 | $(srcdir)/%D%/guix-container.1 \
|
| 214 | $(srcdir)/%D%/guix-deploy.1 \
|
| 215 | $(srcdir)/%D%/guix-describe.1 \
|
| 216 | $(srcdir)/%D%/guix-download.1 \
|
| 217 | $(srcdir)/%D%/guix-edit.1 \
|
| 218 | $(srcdir)/%D%/guix-environment.1 \
|
| 219 | $(srcdir)/%D%/guix-gc.1 \
|
| 220 | $(srcdir)/%D%/guix-git.1 \
|
| 221 | $(srcdir)/%D%/guix-graph.1 \
|
| 222 | $(srcdir)/%D%/guix-hash.1 \
|
| 223 | $(srcdir)/%D%/guix-home.1 \
|
| 224 | $(srcdir)/%D%/guix-import.1 \
|
| 225 | $(srcdir)/%D%/guix-lint.1 \
|
| 226 | $(srcdir)/%D%/guix-offload.1 \
|
| 227 | $(srcdir)/%D%/guix-pack.1 \
|
| 228 | $(srcdir)/%D%/guix-package.1 \
|
| 229 | $(srcdir)/%D%/guix-processes.1 \
|
| 230 | $(srcdir)/%D%/guix-publish.1 \
|
| 231 | $(srcdir)/%D%/guix-pull.1 \
|
| 232 | $(srcdir)/%D%/guix-refresh.1 \
|
| 233 | $(srcdir)/%D%/guix-repl.1 \
|
| 234 | $(srcdir)/%D%/guix-shell.1 \
|
| 235 | $(srcdir)/%D%/guix-size.1 \
|
| 236 | $(srcdir)/%D%/guix-style.1 \
|
| 237 | $(srcdir)/%D%/guix-system.1 \
|
| 238 | $(srcdir)/%D%/guix-time-machine.1 \
|
| 239 | $(srcdir)/%D%/guix-weather.1
|
| 240 |
|
| 241 | if HAVE_GUILE_SSH
|
| 242 | sub_commands_mans += $(srcdir)/%D%/guix-copy.1
|
| 243 | endif HAVE_GUILE_SSH
|
| 244 |
|
| 245 |
|
| 246 | if !CROSS_COMPILING
|
| 247 |
|
| 248 | dist_man1_MANS = \
|
| 249 | $(srcdir)/%D%/guix.1 \
|
| 250 | $(sub_commands_mans)
|
| 251 |
|
| 252 | endif
|
| 253 |
|
| 254 | gen_man = \
|
| 255 | LANGUAGE= $(top_builddir)/pre-inst-env $(HELP2MAN) \
|
| 256 | $(HELP2MANFLAGS)
|
| 257 |
|
| 258 | HELP2MANFLAGS = --source=GNU --info-page=$(PACKAGE_TARNAME)
|
| 259 |
|
| 260 | SOURCE_DATE_EPOCH = $(shell git show HEAD --format=%ct --no-patch 2>/dev/null || echo 1)
|
| 261 | export SOURCE_DATE_EPOCH
|
| 262 |
|
| 263 | $(srcdir)/%D%/guix.1: scripts/guix.in $(sub_commands_mans)
|
| 264 | -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 | $(srcdir)/%D%/guix-%.1: guix/scripts/%.scm $(GOBJECTS) scripts/guix
|
| 271 | -@case '$?' in \
|
| 272 | *$<*) $(AM_V_HELP2MAN:@%=%)$(gen_man) --output="$@" "guix $*";; \
|
| 273 | *) : ;; \
|
| 274 | esac
|
| 275 |
|
| 276 | if BUILD_DAEMON
|
| 277 | if !CROSS_COMPILING
|
| 278 |
|
| 279 | dist_man1_MANS += $(srcdir)/%D%/guix-daemon.1
|
| 280 |
|
| 281 | $(srcdir)/%D%/guix-daemon.1: guix-daemon$(EXEEXT)
|
| 282 | -$(AM_V_HELP2MAN)$(gen_man) --output="$@" `basename "$@" .1`
|
| 283 |
|
| 284 | endif
|
| 285 | endif
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 | DIST_CONFIGURE_FLAGS = \
|
| 290 | --localstatedir=/var \
|
| 291 | --sysconfdir=/etc
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 | auto-clean: maintainer-clean-vti doc-clean
|
| 296 | rm -f ABOUT-NLS INSTALL
|
| 297 | rm -f aclocal.m4 configure libtool Makefile.in
|
| 298 | if test -e .git; then \
|
| 299 | git clean -fdx -- '.am*' build-aux m4 po; \
|
| 300 | else \
|
| 301 | rm -rf .am*; \
|
| 302 | $(MAKE) -C po/guix maintainer-clean; \
|
| 303 | $(MAKE) -C po/packages maintainer-clean; \
|
| 304 | fi
|
| 305 | rm -f guile
|
| 306 | rm -f guix-daemon nix/nix-daemon/guix_daemon-guix-daemon.o
|
| 307 |
|
| 308 |
|
| 309 | ./bootstrap
|
| 310 |
|
| 311 |
|
| 312 | rm -f $(filter-out %D%/guix.texi %D%/guix-cookbook.texi, $(info_TEXINFOS))
|
| 313 | ./configure $(DIST_CONFIGURE_FLAGS)
|
| 314 |
|
| 315 |
|
| 316 |
|
| 317 | doc-clean:
|
| 318 | rm -f $(srcdir)/doc/*.1
|
| 319 | rm -f $(srcdir)/doc/stamp*
|
| 320 | rm -f $(DOT_FILES:%.dot=%.png)
|
| 321 | rm -f $(DOT_VECTOR_GRAPHICS)
|
| 322 | rm -f doc/images/coreutils-size-map.eps
|