diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-13T19·26+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2003-07-13T19·26+0000 |
commit | e6363b05ae72ffd9d977ec3f0981ff9123c404a6 (patch) | |
tree | 5499b84eaad93329d50a02599cca30c81019897b | |
parent | 9c620e4afa03e63ddaff2979396144de8d9298a5 (diff) |
* Pass $(prefix) and other variables through -D..., not
through config.h, to prevent silly Autoconf problems.
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | src/Makefile.am | 26 |
2 files changed, 17 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index 110d8f0e12c0..77a5f1f1f171 100644 --- a/configure.ac +++ b/configure.ac @@ -11,12 +11,6 @@ AC_PROG_CC AC_PROG_CXX 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]) AC_CONFIG_FILES([Makefile src/Makefile scripts/Makefile corepkgs/Makefile]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am index 4b21f12b3a26..d8ec50f0b64e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,25 +3,33 @@ check_PROGRAMS = test AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I.. -nix_SOURCES = nix.cc shared.cc -nix_LDADD = libnix.a -ldb_cxx-4 -lATerm +nix_SOURCES = nix.cc +nix_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm -nix_hash_SOURCES = nix-hash.cc shared.cc -nix_hash_LDADD = libnix.a -ldb_cxx-4 -lATerm +nix_hash_SOURCES = nix-hash.cc +nix_hash_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm -fix_SOURCES = fix.cc shared.cc -fix_LDADD = libnix.a -ldb_cxx-4 -lATerm +fix_SOURCES = fix.cc +fix_LDADD = libshared.a libnix.a -ldb_cxx-4 -lATerm TESTS = test -test_SOURCES = test.cc shared.cc -test_LDADD = libnix.a -ldb_cxx-4 -lATerm +test_SOURCES = test.cc +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 \ 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) -d $(localstatedir)/nix $(INSTALL) -d $(localstatedir)/nix/links |