* Pass $(prefix) and other variables through -D..., not
through config.h, to prevent silly Autoconf problems.
This commit is contained in:
parent
9c620e4afa
commit
e6363b05ae
|
@ -11,12 +11,6 @@ AC_PROG_CC
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
|
|
||||||
# Unix shell scripting should die a slow and painful death.
|
|
||||||
AC_DEFINE_UNQUOTED(NIX_STORE_DIR, "$(eval echo $prefix/store)", Nix store directory.)
|
|
||||||
AC_DEFINE_UNQUOTED(NIX_DATA_DIR, "$(eval echo $datadir)", Nix data directory.)
|
|
||||||
AC_DEFINE_UNQUOTED(NIX_STATE_DIR, "$(eval echo $localstatedir/nix)", Nix state directory.)
|
|
||||||
AC_DEFINE_UNQUOTED(NIX_LOG_DIR, "$(eval echo $localstatedir/log/nix)", Nix log file directory.)
|
|
||||||
|
|
||||||
AM_CONFIG_HEADER([config.h])
|
AM_CONFIG_HEADER([config.h])
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile scripts/Makefile corepkgs/Makefile])
|
AC_CONFIG_FILES([Makefile src/Makefile scripts/Makefile corepkgs/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -3,25 +3,33 @@ check_PROGRAMS = test
|
||||||
|
|
||||||
AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I..
|
AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I..
|
||||||
|
|
||||||
nix_SOURCES = nix.cc shared.cc
|
nix_SOURCES = nix.cc
|
||||||
nix_LDADD = libnix.a -ldb_cxx-4 -lATerm
|
nix_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm
|
||||||
|
|
||||||
nix_hash_SOURCES = nix-hash.cc shared.cc
|
nix_hash_SOURCES = nix-hash.cc
|
||||||
nix_hash_LDADD = libnix.a -ldb_cxx-4 -lATerm
|
nix_hash_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm
|
||||||
|
|
||||||
fix_SOURCES = fix.cc shared.cc
|
fix_SOURCES = fix.cc
|
||||||
fix_LDADD = libnix.a -ldb_cxx-4 -lATerm
|
fix_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm
|
||||||
|
|
||||||
TESTS = test
|
TESTS = test
|
||||||
|
|
||||||
test_SOURCES = test.cc shared.cc
|
test_SOURCES = test.cc
|
||||||
test_LDADD = libnix.a -ldb_cxx-4 -lATerm
|
test_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm
|
||||||
|
|
||||||
noinst_LIBRARIES = libnix.a
|
noinst_LIBRARIES = libnix.a libshared.a
|
||||||
|
|
||||||
libnix_a_SOURCES = util.cc hash.cc archive.cc md5.c \
|
libnix_a_SOURCES = util.cc hash.cc archive.cc md5.c \
|
||||||
fstate.cc store.cc globals.cc db.cc
|
fstate.cc store.cc globals.cc db.cc
|
||||||
|
|
||||||
|
libshared_a_SOURCES = shared.cc
|
||||||
|
|
||||||
|
libshared_a_CXXFLAGS = \
|
||||||
|
-DNIX_STORE_DIR=\"$(prefix)/store\" \
|
||||||
|
-DNIX_DATA_DIR=\"$(datadir)\" \
|
||||||
|
-DNIX_STATE_DIR=\"$(localstatedir)/nix\" \
|
||||||
|
-DNIX_LOG_DIR=\"$(localstatedir)/log/nix\"
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
$(INSTALL) -d $(localstatedir)/nix
|
$(INSTALL) -d $(localstatedir)/nix
|
||||||
$(INSTALL) -d $(localstatedir)/nix/links
|
$(INSTALL) -d $(localstatedir)/nix/links
|
||||||
|
|
Loading…
Reference in a new issue