gnu: glibc: Really disable 'ldconfig' and /etc/ld.so.cache.
[guix.git] / daemon.am
blob77bfe7198705591c7802a9cb4ea50f8ceeb9e3eb
1 # GNU Guix --- Functional package management for GNU
2 # Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
4 # This file is part of GNU Guix.
6 # GNU Guix is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or (at
9 # your option) any later version.
11 # GNU Guix is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
20 # Integration of the `guix-daemon' code taken from upstream Nix.
23 BUILT_SOURCES = nix/libstore/schema.sql.hh
24 CLEANFILES += $(BUILT_SOURCES)
26 noinst_LIBRARIES = libformat.a libutil.a libstore.a
28 AM_CXXFLAGS = -Wall
30 libformat_a_SOURCES =                           \
31   nix/boost/format/free_funcs.cc                \
32   nix/boost/format/parsing.cc                   \
33   nix/boost/format/format_implementation.cc
35 libformat_headers =                             \
36   nix/boost/weak_ptr.hpp                        \
37   nix/boost/throw_exception.hpp                 \
38   nix/boost/checked_delete.hpp                  \
39   nix/boost/shared_ptr.hpp                      \
40   nix/boost/format.hpp                          \
41   nix/boost/assert.hpp                          \
42   nix/boost/format/macros_default.hpp           \
43   nix/boost/format/format_fwd.hpp               \
44   nix/boost/format/format_class.hpp             \
45   nix/boost/format/exceptions.hpp               \
46   nix/boost/format/group.hpp                    \
47   nix/boost/format/feed_args.hpp                \
48   nix/boost/format/internals_fwd.hpp            \
49   nix/boost/format/internals.hpp                \
50   nix/boost/detail/workaround.hpp               \
51   nix/boost/detail/shared_count.hpp             \
52   nix/boost/enable_shared_from_this.hpp
54 libformat_a_CPPFLAGS =                          \
55   -I$(top_srcdir)/nix
57 libutil_a_SOURCES =                             \
58   nix/libutil/archive.cc                        \
59   nix/libutil/serialise.cc                      \
60   nix/libutil/util.cc                           \
61   nix/libutil/xml-writer.cc                     \
62   nix/libutil/hash.cc                           \
63   nix/libutil/gcrypt-hash.cc
65 libutil_headers =                               \
66   nix/libutil/hash.hh                           \
67   nix/libutil/serialise.hh                      \
68   nix/libutil/xml-writer.hh                     \
69   nix/libutil/util.hh                           \
70   nix/libutil/archive.hh                        \
71   nix/libutil/types.hh                          \
72   nix/libutil/gcrypt-hash.hh                    \
73   nix/libutil/md5.h                             \
74   nix/libutil/sha1.h                            \
75   nix/libutil/sha256.h
77 libutil_a_CPPFLAGS =                            \
78   -I$(top_builddir)/nix                         \
79   -I$(top_srcdir)/nix/libutil                   \
80   $(libformat_a_CPPFLAGS)
82 libstore_a_SOURCES =                            \
83   nix/libstore/gc.cc                            \
84   nix/libstore/globals.cc                       \
85   nix/libstore/misc.cc                          \
86   nix/libstore/references.cc                    \
87   nix/libstore/store-api.cc                     \
88   nix/libstore/optimise-store.cc                \
89   nix/libstore/local-store.cc                   \
90   nix/libstore/remote-store.cc                  \
91   nix/libstore/build.cc                         \
92   nix/libstore/pathlocks.cc                     \
93   nix/libstore/derivations.cc
95 libstore_headers =                              \
96   nix/libstore/references.hh                    \
97   nix/libstore/pathlocks.hh                     \
98   nix/libstore/globals.hh                       \
99   nix/libstore/schema.sql.hh                    \
100   nix/libstore/worker-protocol.hh               \
101   nix/libstore/remote-store.hh                  \
102   nix/libstore/derivations.hh                   \
103   nix/libstore/misc.hh                          \
104   nix/libstore/local-store.hh                   \
105   nix/libstore/store-api.hh
107 libstore_a_CPPFLAGS =                           \
108   $(libutil_a_CPPFLAGS)                         \
109   -I$(top_srcdir)/nix/libstore                  \
110   -I$(top_builddir)/nix/libstore                \
111   -DNIX_STORE_DIR=\"$(storedir)\"               \
112   -DNIX_DATA_DIR=\"$(datadir)\"                 \
113   -DNIX_STATE_DIR=\"$(localstatedir)/nix\"      \
114   -DNIX_LOG_DIR=\"$(localstatedir)/log/nix\"    \
115   -DNIX_CONF_DIR=\"$(sysconfdir)/nix\"          \
116   -DNIX_LIBEXEC_DIR=\"$(libexecdir)\"           \
117   -DNIX_BIN_DIR=\"$(bindir)\"                   \
118   -DOPENSSL_PATH="\"openssl\""
120 libstore_a_CXXFLAGS =                           \
121   $(SQLITE3_CFLAGS) $(LIBGCRYPT_CFLAGS)
123 bin_PROGRAMS = guix-daemon
124 sbin_PROGRAMS = guix-register
126 guix_daemon_SOURCES =                           \
127   nix/nix-daemon/nix-daemon.cc                  \
128   nix/nix-daemon/guix-daemon.cc
130 guix_daemon_CPPFLAGS =                          \
131   $(libutil_a_CPPFLAGS)                         \
132   -I$(top_srcdir)/nix/libstore
134 guix_daemon_LDADD =                             \
135   libstore.a libutil.a libformat.a -lbz2        \
136   $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
138 guix_daemon_headers =                           \
139   nix/nix-daemon/shared.hh
142 guix_register_SOURCES =                         \
143   nix/guix-register/guix-register.cc
145 guix_register_CPPFLAGS =                        \
146   $(libutil_a_CPPFLAGS)                         \
147   $(libstore_a_CPPFLAGS)                        \
148   -I$(top_srcdir)/nix/libstore
150 # XXX: Should we start using shared libs?
151 guix_register_LDADD =                           \
152   libstore.a libutil.a libformat.a -lbz2        \
153   $(SQLITE3_LIBS) $(LIBGCRYPT_LIBS)
156 libexec_PROGRAMS = nix-setuid-helper
157 nix_setuid_helper_SOURCES =                     \
158   nix/nix-setuid-helper/nix-setuid-helper.cc
160 nix_setuid_helper_CPPFLAGS =                    \
161   $(libutil_a_CPPFLAGS)
163 nix_setuid_helper_LDADD =                       \
164   libutil.a libformat.a
166 noinst_HEADERS =                                                \
167   $(libformat_headers) $(libutil_headers) $(libstore_headers)   \
168   $(guix_daemon_headers)
170 nix/libstore/schema.sql.hh: nix/libstore/schema.sql
171         $(GUILE) --no-auto-compile -c                           \
172           "(use-modules (rnrs io ports))                        \
173            (call-with-output-file \"$@\"                        \
174              (lambda (out)                                      \
175                (call-with-input-file \"$^\"                     \
176                  (lambda (in)                                   \
177                    (write (get-string-all in) out)))))"
179 nodist_pkglibexec_SCRIPTS =                     \
180   nix/scripts/list-runtime-roots                \
181   nix/scripts/substitute-binary
183 EXTRA_DIST +=                                   \
184   nix/sync-with-upstream                        \
185   nix/libstore/schema.sql                       \
186   nix/AUTHORS                                   \
187   nix/COPYING
189 AM_TESTS_ENVIRONMENT +=                         \
190   top_builddir="$(abs_top_builddir)"
192 TESTS +=                                        \
193   tests/guix-daemon.sh
195 clean-local:
196         -if test -d "$(GUIX_TEST_ROOT)"; then           \
197           find "$(GUIX_TEST_ROOT)" | xargs chmod +w;    \
198          fi
199         -rm -rf "$(GUIX_TEST_ROOT)"