Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
d326767e | 2 | # Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
f2499672 | 3 | # Copyright © 2013 Andreas Enge <andreas@enge.fr> |
af51c820 | 4 | # |
233e7676 | 5 | # This file is part of GNU Guix. |
af51c820 | 6 | # |
233e7676 | 7 | # GNU Guix is free software; you can redistribute it and/or modify it |
af51c820 LC |
8 | # under the terms of the GNU General Public License as published by |
9 | # the Free Software Foundation; either version 3 of the License, or (at | |
10 | # your option) any later version. | |
11 | # | |
233e7676 | 12 | # GNU Guix is distributed in the hope that it will be useful, but |
af51c820 LC |
13 | # WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | # GNU General Public License for more details. | |
16 | # | |
17 | # You should have received a copy of the GNU General Public License | |
233e7676 | 18 | # along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
af51c820 | 19 | |
c52a5bf0 | 20 | bin_SCRIPTS = \ |
e49951eb | 21 | scripts/guix |
14a1c319 | 22 | |
58867ae7 MW |
23 | nodist_noinst_SCRIPTS = \ |
24 | pre-inst-env \ | |
25 | test-env | |
26 | ||
d516736c LC |
27 | include gnu-system.am |
28 | ||
af51c820 | 29 | MODULES = \ |
ddc29a78 | 30 | guix/base32.scm \ |
e9c6c584 | 31 | guix/base64.scm \ |
7a18c3cc | 32 | guix/cpio.scm \ |
c0cd1b3e | 33 | guix/records.scm \ |
4862bc4a | 34 | guix/gcrypt.scm \ |
72626a71 | 35 | guix/hash.scm \ |
3476ded9 | 36 | guix/pk-crypto.scm \ |
8b420f74 | 37 | guix/pki.scm \ |
73fbb904 | 38 | guix/utils.scm \ |
d326767e | 39 | guix/sets.scm \ |
de1355f1 | 40 | guix/download.scm \ |
9b5b5c17 | 41 | guix/git-download.scm \ |
b860f382 | 42 | guix/monads.scm \ |
b9b86078 | 43 | guix/monad-repl.scm \ |
21b679f6 | 44 | guix/gexp.scm \ |
cc4ecc2d | 45 | guix/profiles.scm \ |
0f41c26f LC |
46 | guix/serialization.scm \ |
47 | guix/nar.scm \ | |
af51c820 | 48 | guix/derivations.scm \ |
22189ed1 | 49 | guix/gnu-maintenance.scm \ |
838d78e3 | 50 | guix/licenses.scm \ |
208f7cd1 | 51 | guix/build-system.scm \ |
c6bded8a | 52 | guix/build-system/cmake.scm \ |
be3425e5 | 53 | guix/build-system/glib-or-gtk.scm \ |
208f7cd1 | 54 | guix/build-system/gnu.scm \ |
ce6fc7d6 | 55 | guix/build-system/haskell.scm \ |
08fd1ebe | 56 | guix/build-system/perl.scm \ |
40506d5d | 57 | guix/build-system/python.scm \ |
a677c726 | 58 | guix/build-system/waf.scm \ |
c08f9818 | 59 | guix/build-system/ruby.scm \ |
be13fbfa | 60 | guix/build-system/trivial.scm \ |
457dd86d | 61 | guix/ftp-client.scm \ |
3b8258c5 | 62 | guix/http-client.scm \ |
0fdd3bea | 63 | guix/gnupg.scm \ |
d5d16686 | 64 | guix/elf.scm \ |
af51c820 | 65 | guix/store.scm \ |
89328d24 | 66 | guix/cvs-download.scm \ |
b3acf365 | 67 | guix/svn-download.scm \ |
073c34d7 | 68 | guix/ui.scm \ |
62cab99c | 69 | guix/build/download.scm \ |
c6bded8a | 70 | guix/build/cmake-build-system.scm \ |
9b5b5c17 | 71 | guix/build/git.scm \ |
be3425e5 | 72 | guix/build/glib-or-gtk-build-system.scm \ |
af51c820 | 73 | guix/build/gnu-build-system.scm \ |
fe12c345 | 74 | guix/build/gnu-dist.scm \ |
08fd1ebe | 75 | guix/build/perl-build-system.scm \ |
40506d5d | 76 | guix/build/python-build-system.scm \ |
c08f9818 | 77 | guix/build/ruby-build-system.scm \ |
a677c726 | 78 | guix/build/waf-build-system.scm \ |
9fd6c2ba | 79 | guix/build/haskell-build-system.scm \ |
6fd1a796 | 80 | guix/build/store-copy.scm \ |
1273d44a | 81 | guix/build/utils.scm \ |
c8c88afa | 82 | guix/build/union.scm \ |
611adb1e | 83 | guix/build/profiles.scm \ |
3dbeecd2 | 84 | guix/build/pull.scm \ |
3309e3a1 | 85 | guix/build/rpath.scm \ |
89328d24 | 86 | guix/build/cvs.scm \ |
b3acf365 | 87 | guix/build/svn.scm \ |
29fa45f4 | 88 | guix/build/syscalls.scm \ |
15aa2c38 | 89 | guix/build/gremlin.scm \ |
75f3b1a1 | 90 | guix/build/emacs-utils.scm \ |
fb59e275 | 91 | guix/build/graft.scm \ |
e89431bf | 92 | guix/search-paths.scm \ |
e3ce5d70 | 93 | guix/packages.scm \ |
1b3e9685 | 94 | guix/import/utils.scm \ |
7047133f | 95 | guix/import/gnu.scm \ |
1b3e9685 | 96 | guix/import/snix.scm \ |
a4154748 FB |
97 | guix/import/cabal.scm \ |
98 | guix/import/hackage.scm \ | |
de1355f1 LC |
99 | guix/scripts/download.scm \ |
100 | guix/scripts/build.scm \ | |
760c60d6 | 101 | guix/scripts/archive.scm \ |
de1355f1 LC |
102 | guix/scripts/import.scm \ |
103 | guix/scripts/package.scm \ | |
104 | guix/scripts/gc.scm \ | |
105 | guix/scripts/hash.scm \ | |
106 | guix/scripts/pull.scm \ | |
2c74fde0 | 107 | guix/scripts/substitute.scm \ |
526382ff | 108 | guix/scripts/authenticate.scm \ |
de1355f1 | 109 | guix/scripts/refresh.scm \ |
523e4896 | 110 | guix/scripts/system.scm \ |
b4f5e0e8 | 111 | guix/scripts/lint.scm \ |
7047133f | 112 | guix/scripts/import/gnu.scm \ |
1b3e9685 | 113 | guix/scripts/import/nix.scm \ |
a4154748 | 114 | guix/scripts/import/hackage.scm \ |
372c4bbc | 115 | guix/scripts/environment.scm \ |
aff8ce7c | 116 | guix/scripts/publish.scm \ |
39bee8a2 | 117 | guix/scripts/edit.scm \ |
fcc58db6 | 118 | guix/scripts/size.scm \ |
e3ce5d70 | 119 | guix.scm \ |
d516736c | 120 | $(GNU_SYSTEM_MODULES) |
af51c820 | 121 | |
49e6291a LC |
122 | if BUILD_DAEMON_OFFLOAD |
123 | ||
124 | MODULES += \ | |
125 | guix/scripts/offload.scm | |
126 | ||
127 | endif BUILD_DAEMON_OFFLOAD | |
128 | ||
c1bc358f | 129 | # Internal module with test suite support. |
02754a5e | 130 | dist_noinst_DATA = guix/tests.scm |
c1bc358f | 131 | |
855a8ad7 LC |
132 | # Because of the autoload hack in (guix build download), we must build it |
133 | # first to avoid errors on systems where (gnutls) is unavailable. | |
134 | guix/scripts/download.go: guix/build/download.go | |
de1355f1 | 135 | guix/download.go: guix/build/download.go |
c44899a2 | 136 | |
a94546ec LC |
137 | # Linux-Libre configurations. |
138 | KCONFIGS = \ | |
139 | gnu/packages/linux-libre-i686.conf \ | |
140 | gnu/packages/linux-libre-x86_64.conf | |
1959fb04 | 141 | |
ebc32b31 LC |
142 | # Templates, examples. |
143 | EXAMPLES = \ | |
36ffaca2 LC |
144 | gnu/system/examples/bare-bones.tmpl \ |
145 | gnu/system/examples/desktop.tmpl | |
ebc32b31 | 146 | |
c1bc358f | 147 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go |
af51c820 | 148 | |
74574fd1 RW |
149 | nobase_dist_guilemodule_DATA = \ |
150 | $(MODULES) $(KCONFIGS) $(EXAMPLES) \ | |
151 | $(MISC_DISTRO_FILES) | |
1959fb04 | 152 | nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm |
800cdeef | 153 | |
1959fb04 LC |
154 | # Do we need to provide our own non-broken (srfi srfi-37) module? |
155 | if INSTALL_SRFI_37 | |
156 | ||
157 | nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm | |
158 | GOBJECTS += srfi/srfi-37.go | |
159 | ||
160 | srfi/srfi-37.scm: srfi/srfi-37.scm.in | |
161 | $(MKDIR_P) srfi | |
162 | cp "$<" "$@" | |
163 | ||
164 | endif INSTALL_SRFI_37 | |
ac5aa288 | 165 | |
70a9c720 LC |
166 | # Handy way to remove the .go files without removing all the rest. |
167 | clean-go: | |
168 | -$(RM) -f $(GOBJECTS) | |
169 | ||
af51c820 | 170 | |
30dd8310 | 171 | SCM_TESTS = \ |
ddc29a78 | 172 | tests/base32.scm \ |
e9c6c584 | 173 | tests/base64.scm \ |
7a18c3cc | 174 | tests/cpio.scm \ |
69927e78 | 175 | tests/hash.scm \ |
3476ded9 | 176 | tests/pk-crypto.scm \ |
8b420f74 | 177 | tests/pki.scm \ |
d326767e | 178 | tests/sets.scm \ |
2c74fde0 | 179 | tests/substitute.scm \ |
af51c820 LC |
180 | tests/builders.scm \ |
181 | tests/derivations.scm \ | |
299112d3 | 182 | tests/ui.scm \ |
c0cd1b3e | 183 | tests/records.scm \ |
e3ce5d70 | 184 | tests/utils.scm \ |
b0e0d0e9 | 185 | tests/build-utils.scm \ |
c8c88afa | 186 | tests/packages.scm \ |
10226c05 | 187 | tests/snix.scm \ |
a4154748 | 188 | tests/hackage.scm \ |
3259877d | 189 | tests/store.scm \ |
b860f382 | 190 | tests/monads.scm \ |
21b679f6 | 191 | tests/gexp.scm \ |
53c63ee9 | 192 | tests/nar.scm \ |
a2078770 | 193 | tests/union.scm \ |
29fa45f4 | 194 | tests/profiles.scm \ |
b4f5e0e8 | 195 | tests/syscalls.scm \ |
15aa2c38 | 196 | tests/gremlin.scm \ |
aff8ce7c | 197 | tests/lint.scm \ |
fcc58db6 LC |
198 | tests/publish.scm \ |
199 | tests/size.scm | |
30dd8310 | 200 | |
1b3e9685 DT |
201 | if HAVE_GUILE_JSON |
202 | ||
85054932 | 203 | MODULES += \ |
1ff2619b | 204 | guix/import/json.scm \ |
85054932 | 205 | guix/import/pypi.scm \ |
d45dc6da EB |
206 | guix/scripts/import/pypi.scm \ |
207 | guix/import/cpan.scm \ | |
208 | guix/scripts/import/cpan.scm | |
85054932 | 209 | |
d45dc6da EB |
210 | SCM_TESTS += \ |
211 | tests/pypi.scm \ | |
212 | tests/cpan.scm | |
1b3e9685 DT |
213 | |
214 | endif | |
215 | ||
30dd8310 | 216 | SH_TESTS = \ |
0afdc485 | 217 | tests/guix-build.sh \ |
37d19403 | 218 | tests/guix-download.sh \ |
fe8ff028 | 219 | tests/guix-gc.sh \ |
ccbce848 | 220 | tests/guix-hash.sh \ |
0820098d | 221 | tests/guix-package.sh \ |
57b86237 | 222 | tests/guix-package-net.sh \ |
c1202fb1 | 223 | tests/guix-system.sh \ |
760c60d6 | 224 | tests/guix-archive.sh \ |
dd7c013d CR |
225 | tests/guix-authenticate.sh \ |
226 | tests/guix-lint.sh | |
af51c820 | 227 | |
a7a4e6a4 LC |
228 | if BUILD_DAEMON |
229 | ||
230 | SH_TESTS += tests/guix-register.sh | |
231 | ||
232 | endif BUILD_DAEMON | |
233 | ||
234 | ||
30dd8310 LC |
235 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
236 | ||
97298ffa LC |
237 | TEST_EXTENSIONS = .scm .sh |
238 | ||
352ec143 LC |
239 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" |
240 | ||
69cfce50 | 241 | SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE) |
97298ffa LC |
242 | AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)" |
243 | ||
69cfce50 | 244 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
97298ffa | 245 | AM_SH_LOG_FLAGS = -x -e |
af51c820 | 246 | |
3a33730a LC |
247 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
248 | # could end up removing files from the store while they are being used by | |
249 | # other instances of the daemon. | |
250 | tests/guix-gc.log: \ | |
251 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ | |
252 | $(SCM_TESTS:%.scm=%.log) | |
253 | ||
bf59c06d | 254 | # Public key used to sign substitutes from hydra.gnu.org. |
6c110833 | 255 | dist_pkgdata_DATA = hydra.gnu.org.pub |
3a33730a | 256 | |
ee3e157d LC |
257 | # Bash completion file. |
258 | dist_bashcompletion_DATA = etc/completion/bash/guix | |
259 | ||
81f61c17 LC |
260 | EXTRA_DIST = \ |
261 | HACKING \ | |
262 | ROADMAP \ | |
263 | TODO \ | |
264 | .dir-locals.el \ | |
f81ac34d | 265 | build-aux/build-self.scm \ |
81f61c17 LC |
266 | build-aux/hydra/gnu-system.scm \ |
267 | build-aux/hydra/demo-os.scm \ | |
268 | build-aux/hydra/guix.scm \ | |
269 | build-aux/check-available-binaries.scm \ | |
270 | build-aux/check-final-inputs-self-contained.scm \ | |
271 | build-aux/download.scm \ | |
8bc35f85 | 272 | build-aux/make-binary-tarball.scm \ |
81f61c17 LC |
273 | srfi/srfi-37.scm.in \ |
274 | srfi/srfi-64.scm \ | |
275 | srfi/srfi-64.upstream.scm \ | |
276 | tests/test.drv \ | |
277 | tests/signing-key.pub \ | |
278 | tests/signing-key.sec \ | |
279 | build-aux/config.rpath \ | |
280 | bootstrap \ | |
281 | release.nix \ | |
ed795c06 | 282 | $(TESTS) |
d7672884 | 283 | |
49e6291a LC |
284 | if !BUILD_DAEMON_OFFLOAD |
285 | ||
286 | EXTRA_DIST += \ | |
287 | guix/scripts/offload.scm | |
288 | ||
289 | endif !BUILD_DAEMON_OFFLOAD | |
290 | ||
291 | ||
30dd8310 LC |
292 | CLEANFILES = \ |
293 | $(GOBJECTS) \ | |
9bff16b3 | 294 | $(SCM_TESTS:tests/%.scm=%.log) |
af51c820 | 295 | |
dab5d51b LC |
296 | AM_V_GUILEC = $(AM_V_GUILEC_$(V)) |
297 | AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY)) | |
298 | AM_V_GUILEC_0 = @echo " GUILEC" $@; | |
299 | ||
28561d85 LC |
300 | # Unset 'GUILE_LOAD_COMPILED_PATH' altogether while compiling. Otherwise, if |
301 | # $GUILE_LOAD_COMPILED_PATH contains $(moduledir), we may find .go files in | |
302 | # there that are newer than the local .scm files (for instance because the | |
303 | # user ran 'make install' recently). When that happens, we end up loading | |
304 | # those previously-installed .go files, which may be stale, thereby breaking | |
305 | # the whole thing. | |
306 | # | |
a69b7ad2 LC |
307 | # XXX: Use the C locale for when Guile lacks |
308 | # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>. | |
af51c820 | 309 | .scm.go: |
dab5d51b | 310 | $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \ |
28561d85 | 311 | unset GUILE_LOAD_COMPILED_PATH ; \ |
a69b7ad2 | 312 | LC_ALL=C \ |
671d8f5e LC |
313 | $(top_builddir)/pre-inst-env \ |
314 | $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \ | |
315 | -Wformat -Wunbound-variable -Warity-mismatch \ | |
316 | --target="$(host)" \ | |
af51c820 LC |
317 | -o "$@" "$<" |
318 | ||
319 | SUFFIXES = .go | |
320 | ||
321 | # Make sure source files are installed first, so that the mtime of | |
322 | # installed compiled files is greater than that of installed source | |
323 | # files. See | |
324 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
325 | # for details. | |
326 | guix_install_go_files = install-nobase_nodist_guilemoduleDATA | |
327 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA | |
f68b0893 | 328 | |
6005bd07 LC |
329 | # The above trick doesn't work for 'config.go' because both 'config.scm' and |
330 | # 'config.go' are listed in $(nobase_nodist_guilemodule_DATA). Thus, give it | |
331 | # special treatment. | |
332 | install-data-hook: set-bootstrap-executable-permissions | |
333 | touch "$(DESTDIR)$(guilemoduledir)/guix/config.go" | |
334 | ||
335 | ||
ee764179 | 336 | SUBDIRS = po/guix po/packages |
931c132a | 337 | BUILT_SOURCES = |
a9424c08 LC |
338 | |
339 | include doc.am | |
568717fd | 340 | |
c2033df4 LC |
341 | if BUILD_DAEMON |
342 | ||
343 | include daemon.am | |
344 | ||
345 | endif BUILD_DAEMON | |
346 | ||
f68b0893 | 347 | ACLOCAL_AMFLAGS = -I m4 |
e76bdf8b | 348 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
d388c2c4 | 349 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
14af289e | 350 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
aca54b39 LC |
351 | --with-nix-prefix="$(NIX_PREFIX)" \ |
352 | --enable-daemon | |
0e993428 | 353 | |
457f60fa AK |
354 | dist_emacsui_DATA = emacs/guix-main.scm |
355 | nodist_emacsui_DATA = emacs/guix-helper.scm | |
356 | include emacs.am | |
357 | ||
9d3fb6c7 LC |
358 | # The self-contained tarball. |
359 | guix-binary.%.tar.xz: | |
360 | -GUIX_PACKAGE_PATH= \ | |
361 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
362 | "$(top_srcdir)/build-aux/make-binary-tarball.scm" "$*" "$@" | |
363 | ||
364 | ||
668d48a6 | 365 | dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names |
81f61c17 | 366 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
e793178a | 367 | |
668d48a6 | 368 | sync-descriptions: |
36c45230 LC |
369 | -GUIX_PACKAGE_PATH= \ |
370 | $(top_builddir)/pre-inst-env guix lint --checkers=gnu-description | |
e793178a LC |
371 | |
372 | gen-ChangeLog: | |
373 | if test -d .git; then \ | |
374 | $(top_srcdir)/build-aux/gitlog-to-changelog \ | |
375 | > $(distdir)/cl-t; \ | |
376 | rm -f $(distdir)/ChangeLog; \ | |
377 | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | |
378 | fi | |
379 | ||
834129e0 | 380 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
a463ffd9 LC |
381 | assert-no-store-file-names: |
382 | if grep -r --exclude=*.texi --exclude=*.info \ | |
383 | "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ | |
384 | then \ | |
385 | echo "error: store file names embedded in the distribution" >&2 ; \ | |
386 | exit 1 ; \ | |
387 | fi | |
388 | ||
56fbf262 LC |
389 | # Make sure hydra.gnu.org has the important binaries. |
390 | assert-binaries-available: | |
391 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
392 | "$(top_srcdir)/build-aux/check-available-binaries.scm" | |
393 | ||
81f61c17 LC |
394 | # Make sure the final inputs don't refer to bootstrap tools. |
395 | assert-final-inputs-self-contained: | |
396 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
397 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" | |
398 | ||
70a9c720 | 399 | .PHONY: sync-descriptions gen-ChangeLog clean-go |
56fbf262 | 400 | .PHONY: assert-no-store-file-names assert-binaries-available |
81f61c17 | 401 | .PHONY: assert-final-inputs-self-contained |