Commit | Line | Data |
---|---|---|
233e7676 | 1 | # GNU Guix --- Functional package management for GNU |
49e6291a | 2 | # Copyright © 2012, 2013, 2014 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 \ |
c0cd1b3e | 32 | guix/records.scm \ |
72626a71 | 33 | guix/hash.scm \ |
3476ded9 | 34 | guix/pk-crypto.scm \ |
8b420f74 | 35 | guix/pki.scm \ |
73fbb904 | 36 | guix/utils.scm \ |
de1355f1 | 37 | guix/download.scm \ |
9b5b5c17 | 38 | guix/git-download.scm \ |
b860f382 | 39 | guix/monads.scm \ |
b9b86078 | 40 | guix/monad-repl.scm \ |
21b679f6 | 41 | guix/gexp.scm \ |
cc4ecc2d | 42 | guix/profiles.scm \ |
0f41c26f LC |
43 | guix/serialization.scm \ |
44 | guix/nar.scm \ | |
af51c820 | 45 | guix/derivations.scm \ |
22189ed1 | 46 | guix/gnu-maintenance.scm \ |
838d78e3 | 47 | guix/licenses.scm \ |
208f7cd1 | 48 | guix/build-system.scm \ |
c6bded8a | 49 | guix/build-system/cmake.scm \ |
208f7cd1 | 50 | guix/build-system/gnu.scm \ |
08fd1ebe | 51 | guix/build-system/perl.scm \ |
40506d5d | 52 | guix/build-system/python.scm \ |
c08f9818 | 53 | guix/build-system/ruby.scm \ |
be13fbfa | 54 | guix/build-system/trivial.scm \ |
457dd86d | 55 | guix/ftp-client.scm \ |
3b8258c5 | 56 | guix/http-client.scm \ |
0fdd3bea | 57 | guix/gnupg.scm \ |
af51c820 | 58 | guix/store.scm \ |
b3acf365 | 59 | guix/svn-download.scm \ |
073c34d7 | 60 | guix/ui.scm \ |
62cab99c | 61 | guix/build/download.scm \ |
c6bded8a | 62 | guix/build/cmake-build-system.scm \ |
9b5b5c17 | 63 | guix/build/git.scm \ |
af51c820 | 64 | guix/build/gnu-build-system.scm \ |
fe12c345 | 65 | guix/build/gnu-dist.scm \ |
08fd1ebe | 66 | guix/build/perl-build-system.scm \ |
40506d5d | 67 | guix/build/python-build-system.scm \ |
c08f9818 | 68 | guix/build/ruby-build-system.scm \ |
6fd1a796 | 69 | guix/build/store-copy.scm \ |
1273d44a | 70 | guix/build/utils.scm \ |
c8c88afa | 71 | guix/build/union.scm \ |
3dbeecd2 | 72 | guix/build/pull.scm \ |
3309e3a1 | 73 | guix/build/rpath.scm \ |
b3acf365 | 74 | guix/build/svn.scm \ |
29fa45f4 | 75 | guix/build/syscalls.scm \ |
75f3b1a1 | 76 | guix/build/emacs-utils.scm \ |
fb59e275 | 77 | guix/build/graft.scm \ |
e3ce5d70 | 78 | guix/packages.scm \ |
1b3e9685 DT |
79 | guix/import/utils.scm \ |
80 | guix/import/snix.scm \ | |
de1355f1 LC |
81 | guix/scripts/download.scm \ |
82 | guix/scripts/build.scm \ | |
760c60d6 | 83 | guix/scripts/archive.scm \ |
de1355f1 LC |
84 | guix/scripts/import.scm \ |
85 | guix/scripts/package.scm \ | |
86 | guix/scripts/gc.scm \ | |
87 | guix/scripts/hash.scm \ | |
88 | guix/scripts/pull.scm \ | |
89 | guix/scripts/substitute-binary.scm \ | |
526382ff | 90 | guix/scripts/authenticate.scm \ |
de1355f1 | 91 | guix/scripts/refresh.scm \ |
523e4896 | 92 | guix/scripts/system.scm \ |
b4f5e0e8 | 93 | guix/scripts/lint.scm \ |
1b3e9685 | 94 | guix/scripts/import/nix.scm \ |
e3ce5d70 | 95 | guix.scm \ |
d516736c | 96 | $(GNU_SYSTEM_MODULES) |
af51c820 | 97 | |
49e6291a LC |
98 | if BUILD_DAEMON_OFFLOAD |
99 | ||
100 | MODULES += \ | |
101 | guix/scripts/offload.scm | |
102 | ||
103 | endif BUILD_DAEMON_OFFLOAD | |
104 | ||
c1bc358f LC |
105 | # Internal module with test suite support. |
106 | noinst_DATA = guix/tests.scm | |
107 | ||
855a8ad7 LC |
108 | # Because of the autoload hack in (guix build download), we must build it |
109 | # first to avoid errors on systems where (gnutls) is unavailable. | |
110 | guix/scripts/download.go: guix/build/download.go | |
de1355f1 | 111 | guix/download.go: guix/build/download.go |
c44899a2 | 112 | |
a94546ec LC |
113 | # Linux-Libre configurations. |
114 | KCONFIGS = \ | |
115 | gnu/packages/linux-libre-i686.conf \ | |
116 | gnu/packages/linux-libre-x86_64.conf | |
1959fb04 | 117 | |
ebc32b31 LC |
118 | # Templates, examples. |
119 | EXAMPLES = \ | |
120 | gnu/system/os-config.tmpl | |
121 | ||
c1bc358f | 122 | GOBJECTS = $(MODULES:%.scm=%.go) guix/config.go guix/tests.go |
af51c820 | 123 | |
ebc32b31 | 124 | nobase_dist_guilemodule_DATA = $(MODULES) $(KCONFIGS) $(EXAMPLES) |
1959fb04 | 125 | nobase_nodist_guilemodule_DATA = $(GOBJECTS) guix/config.scm |
800cdeef | 126 | |
1959fb04 LC |
127 | # Do we need to provide our own non-broken (srfi srfi-37) module? |
128 | if INSTALL_SRFI_37 | |
129 | ||
130 | nobase_nodist_guilemodule_DATA += srfi/srfi-37.scm | |
131 | GOBJECTS += srfi/srfi-37.go | |
132 | ||
133 | srfi/srfi-37.scm: srfi/srfi-37.scm.in | |
134 | $(MKDIR_P) srfi | |
135 | cp "$<" "$@" | |
136 | ||
137 | endif INSTALL_SRFI_37 | |
ac5aa288 | 138 | |
70a9c720 LC |
139 | # Handy way to remove the .go files without removing all the rest. |
140 | clean-go: | |
141 | -$(RM) -f $(GOBJECTS) | |
142 | ||
af51c820 | 143 | |
30dd8310 | 144 | SCM_TESTS = \ |
ddc29a78 | 145 | tests/base32.scm \ |
e9c6c584 | 146 | tests/base64.scm \ |
69927e78 | 147 | tests/hash.scm \ |
3476ded9 | 148 | tests/pk-crypto.scm \ |
8b420f74 | 149 | tests/pki.scm \ |
e9c6c584 | 150 | tests/substitute-binary.scm \ |
af51c820 LC |
151 | tests/builders.scm \ |
152 | tests/derivations.scm \ | |
299112d3 | 153 | tests/ui.scm \ |
c0cd1b3e | 154 | tests/records.scm \ |
e3ce5d70 | 155 | tests/utils.scm \ |
b0e0d0e9 | 156 | tests/build-utils.scm \ |
c8c88afa | 157 | tests/packages.scm \ |
10226c05 | 158 | tests/snix.scm \ |
3259877d | 159 | tests/store.scm \ |
b860f382 | 160 | tests/monads.scm \ |
21b679f6 | 161 | tests/gexp.scm \ |
53c63ee9 | 162 | tests/nar.scm \ |
a2078770 | 163 | tests/union.scm \ |
29fa45f4 | 164 | tests/profiles.scm \ |
b4f5e0e8 CR |
165 | tests/syscalls.scm \ |
166 | tests/lint.scm | |
30dd8310 | 167 | |
1b3e9685 DT |
168 | if HAVE_GUILE_JSON |
169 | ||
85054932 AK |
170 | MODULES += \ |
171 | guix/import/pypi.scm \ | |
172 | guix/scripts/import/pypi.scm | |
173 | ||
1b3e9685 DT |
174 | SCM_TESTS += tests/pypi.scm |
175 | ||
176 | endif | |
177 | ||
30dd8310 | 178 | SH_TESTS = \ |
0afdc485 | 179 | tests/guix-build.sh \ |
37d19403 | 180 | tests/guix-download.sh \ |
fe8ff028 | 181 | tests/guix-gc.sh \ |
ccbce848 | 182 | tests/guix-hash.sh \ |
0820098d | 183 | tests/guix-package.sh \ |
c1202fb1 | 184 | tests/guix-system.sh \ |
760c60d6 | 185 | tests/guix-archive.sh \ |
0820098d | 186 | tests/guix-authenticate.sh |
af51c820 | 187 | |
a7a4e6a4 LC |
188 | if BUILD_DAEMON |
189 | ||
190 | SH_TESTS += tests/guix-register.sh | |
191 | ||
192 | endif BUILD_DAEMON | |
193 | ||
194 | ||
30dd8310 LC |
195 | TESTS = $(SCM_TESTS) $(SH_TESTS) |
196 | ||
97298ffa LC |
197 | TEST_EXTENSIONS = .scm .sh |
198 | ||
352ec143 LC |
199 | AM_TESTS_ENVIRONMENT = abs_top_srcdir="$(abs_top_srcdir)" |
200 | ||
69cfce50 | 201 | SCM_LOG_COMPILER = $(top_builddir)/test-env $(GUILE) |
97298ffa LC |
202 | AM_SCM_LOG_FLAGS = --no-auto-compile -L "$(top_srcdir)" |
203 | ||
69cfce50 | 204 | SH_LOG_COMPILER = $(top_builddir)/test-env $(SHELL) |
97298ffa | 205 | AM_SH_LOG_FLAGS = -x -e |
af51c820 | 206 | |
3a33730a LC |
207 | # Make sure `tests/guix-gc.sh' runs last, after all the others. Otherwise it |
208 | # could end up removing files from the store while they are being used by | |
209 | # other instances of the daemon. | |
210 | tests/guix-gc.log: \ | |
211 | $(patsubst %.sh,%.log,$(filter-out tests/guix-gc.sh,$(SH_TESTS))) \ | |
212 | $(SCM_TESTS:%.scm=%.log) | |
213 | ||
bf59c06d | 214 | # Public key used to sign substitutes from hydra.gnu.org. |
6c110833 | 215 | dist_pkgdata_DATA = hydra.gnu.org.pub |
3a33730a | 216 | |
81f61c17 LC |
217 | EXTRA_DIST = \ |
218 | HACKING \ | |
219 | ROADMAP \ | |
220 | TODO \ | |
221 | .dir-locals.el \ | |
222 | build-aux/hydra/gnu-system.scm \ | |
223 | build-aux/hydra/demo-os.scm \ | |
224 | build-aux/hydra/guix.scm \ | |
225 | build-aux/check-available-binaries.scm \ | |
226 | build-aux/check-final-inputs-self-contained.scm \ | |
227 | build-aux/download.scm \ | |
228 | build-aux/list-packages.scm \ | |
229 | build-aux/sync-descriptions.scm \ | |
230 | srfi/srfi-37.scm.in \ | |
231 | srfi/srfi-64.scm \ | |
232 | srfi/srfi-64.upstream.scm \ | |
233 | tests/test.drv \ | |
234 | tests/signing-key.pub \ | |
235 | tests/signing-key.sec \ | |
236 | build-aux/config.rpath \ | |
237 | bootstrap \ | |
238 | release.nix \ | |
ed795c06 | 239 | $(TESTS) |
d7672884 | 240 | |
49e6291a LC |
241 | if !BUILD_DAEMON_OFFLOAD |
242 | ||
243 | EXTRA_DIST += \ | |
244 | guix/scripts/offload.scm | |
245 | ||
246 | endif !BUILD_DAEMON_OFFLOAD | |
247 | ||
248 | ||
30dd8310 LC |
249 | CLEANFILES = \ |
250 | $(GOBJECTS) \ | |
9bff16b3 | 251 | $(SCM_TESTS:tests/%.scm=%.log) |
af51c820 | 252 | |
dab5d51b LC |
253 | AM_V_GUILEC = $(AM_V_GUILEC_$(V)) |
254 | AM_V_GUILEC_ = $(AM_V_GUILEC_$(AM_DEFAULT_VERBOSITY)) | |
255 | AM_V_GUILEC_0 = @echo " GUILEC" $@; | |
256 | ||
a69b7ad2 LC |
257 | # XXX: Use the C locale for when Guile lacks |
258 | # <http://git.sv.gnu.org/cgit/guile.git/commit/?h=stable-2.0&id=e2c6bf3866d1186c60bacfbd4fe5037087ee5e3f>. | |
af51c820 | 259 | .scm.go: |
dab5d51b | 260 | $(AM_V_GUILEC)$(MKDIR_P) `dirname "$@"` ; \ |
a69b7ad2 | 261 | LC_ALL=C \ |
671d8f5e LC |
262 | $(top_builddir)/pre-inst-env \ |
263 | $(GUILD) compile -L "$(top_builddir)" -L "$(top_srcdir)" \ | |
264 | -Wformat -Wunbound-variable -Warity-mismatch \ | |
265 | --target="$(host)" \ | |
af51c820 LC |
266 | -o "$@" "$<" |
267 | ||
268 | SUFFIXES = .go | |
269 | ||
270 | # Make sure source files are installed first, so that the mtime of | |
271 | # installed compiled files is greater than that of installed source | |
272 | # files. See | |
273 | # <http://lists.gnu.org/archive/html/guile-devel/2010-07/msg00125.html> | |
274 | # for details. | |
275 | guix_install_go_files = install-nobase_nodist_guilemoduleDATA | |
276 | $(guix_install_go_files): install-nobase_dist_guilemoduleDATA | |
f68b0893 | 277 | |
ee764179 | 278 | SUBDIRS = po/guix po/packages |
931c132a | 279 | BUILT_SOURCES = |
a9424c08 LC |
280 | |
281 | include doc.am | |
568717fd | 282 | |
c2033df4 LC |
283 | if BUILD_DAEMON |
284 | ||
285 | include daemon.am | |
286 | ||
287 | endif BUILD_DAEMON | |
288 | ||
f68b0893 | 289 | ACLOCAL_AMFLAGS = -I m4 |
e76bdf8b | 290 | AM_DISTCHECK_CONFIGURE_FLAGS = \ |
d388c2c4 | 291 | --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ |
14af289e | 292 | --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ |
aca54b39 LC |
293 | --with-nix-prefix="$(NIX_PREFIX)" \ |
294 | --enable-daemon | |
0e993428 | 295 | |
457f60fa AK |
296 | dist_emacsui_DATA = emacs/guix-main.scm |
297 | nodist_emacsui_DATA = emacs/guix-helper.scm | |
298 | include emacs.am | |
299 | ||
668d48a6 | 300 | dist-hook: sync-descriptions gen-ChangeLog assert-no-store-file-names |
81f61c17 | 301 | distcheck-hook: assert-binaries-available assert-final-inputs-self-contained |
e793178a | 302 | |
668d48a6 | 303 | sync-descriptions: |
0e993428 | 304 | -$(top_builddir)/pre-inst-env $(GUILE) \ |
668d48a6 | 305 | $(top_srcdir)/build-aux/sync-descriptions.scm |
e793178a LC |
306 | |
307 | gen-ChangeLog: | |
308 | if test -d .git; then \ | |
309 | $(top_srcdir)/build-aux/gitlog-to-changelog \ | |
310 | > $(distdir)/cl-t; \ | |
311 | rm -f $(distdir)/ChangeLog; \ | |
312 | mv $(distdir)/cl-t $(distdir)/ChangeLog; \ | |
313 | fi | |
314 | ||
834129e0 | 315 | # Make sure we're not shipping a file that embeds a local /gnu/store file name. |
a463ffd9 LC |
316 | assert-no-store-file-names: |
317 | if grep -r --exclude=*.texi --exclude=*.info \ | |
318 | "$(storedir)/[a-z0-9]{32}-" $(distdir) ; \ | |
319 | then \ | |
320 | echo "error: store file names embedded in the distribution" >&2 ; \ | |
321 | exit 1 ; \ | |
322 | fi | |
323 | ||
56fbf262 LC |
324 | # Make sure hydra.gnu.org has the important binaries. |
325 | assert-binaries-available: | |
326 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
327 | "$(top_srcdir)/build-aux/check-available-binaries.scm" | |
328 | ||
81f61c17 LC |
329 | # Make sure the final inputs don't refer to bootstrap tools. |
330 | assert-final-inputs-self-contained: | |
331 | $(top_builddir)/pre-inst-env "$(GUILE)" \ | |
332 | "$(top_srcdir)/build-aux/check-final-inputs-self-contained.scm" | |
333 | ||
70a9c720 | 334 | .PHONY: sync-descriptions gen-ChangeLog clean-go |
56fbf262 | 335 | .PHONY: assert-no-store-file-names assert-binaries-available |
81f61c17 | 336 | .PHONY: assert-final-inputs-self-contained |