* Use a system name that does not include the OS manufacturer (i.e.,

"i686-linux" instead of "i686-suse-linux").
This commit is contained in:
Eelco Dolstra 2003-12-01 14:36:50 +00:00
parent dc05f29cf6
commit 5d2b424804
7 changed files with 15 additions and 7 deletions

View file

@ -14,6 +14,14 @@ AC_PREFIX_DEFAULT(/nix)
AC_CANONICAL_HOST AC_CANONICAL_HOST
# Construct a Nix system name (like "i686-linux").
AC_MSG_CHECKING([for the canonical Nix system name])
machine_name=`uname -m`
sys_name=`uname -s | tr [A-Z] [a-z]`
system="${machine_name}-${sys_name}"
AC_MSG_RESULT($system)
AC_SUBST(system)
AC_PROG_CC AC_PROG_CC
AC_PROG_CXX AC_PROG_CXX
AC_PROG_RANLIB AC_PROG_RANLIB

View file

@ -25,7 +25,7 @@ rename $out, $out2;
# Create a Nix expression. # Create a Nix expression.
my $nixexpr = my $nixexpr =
"(import @datadir@/nix/corepkgs/fetchurl) " . "(import @datadir@/nix/corepkgs/fetchurl) " .
"{url = $url; md5 = \"$hash\"; system = \"@host@\"}"; "{url = $url; md5 = \"$hash\"; system = \"@system@\"}";
print "expr: $nixexpr\n"; print "expr: $nixexpr\n";

View file

@ -61,10 +61,10 @@ sub processURL {
# Nix archive from the network. # Nix archive from the network.
my $fetch = my $fetch =
"(import @datadir@/nix/corepkgs/fetchurl) " . "(import @datadir@/nix/corepkgs/fetchurl) " .
"{url = $fullurl; md5 = \"$hash\"; system = \"@host@\"}"; "{url = $fullurl; md5 = \"$hash\"; system = \"@system@\"}";
my $nixexpr = my $nixexpr =
"((import @datadir@/nix/corepkgs/nar/unnar.nix) " . "((import @datadir@/nix/corepkgs/nar/unnar.nix) " .
"{narFile = ($fetch); outPath = \"$storepath\"; system = \"@host@\"}) "; "{narFile = ($fetch); outPath = \"$storepath\"; system = \"@system@\"}) ";
$fullexpr .= $nixexpr; # !!! O(n^2)? $fullexpr .= $nixexpr; # !!! O(n^2)?
push @srcpaths, $storepath; push @srcpaths, $storepath;

View file

@ -45,7 +45,7 @@ foreach my $id (@ARGV) {
my $nixexpr = my $nixexpr =
"((import @datadir@/nix/corepkgs/nar/nar.nix) " . "((import @datadir@/nix/corepkgs/nar/nar.nix) " .
# !!! $path should be represented as a closure # !!! $path should be represented as a closure
"{path = \"$path\"; system = \"@host@\"}) "; "{path = \"$path\"; system = \"@system@\"}) ";
print NIX $nixexpr; print NIX $nixexpr;
} }

View file

@ -6,5 +6,5 @@ libstore_a_SOURCES = \
globals.cc globals.hh db.cc db.hh \ globals.cc globals.hh db.cc db.hh \
references.cc references.hh pathlocks.cc pathlocks.hh references.cc references.hh pathlocks.cc pathlocks.hh
AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall \ AM_CXXFLAGS = -Wall \
-I.. -I../../externals/inst/include -I../libutil -I.. -I../../externals/inst/include -I../libutil

View file

@ -3,7 +3,7 @@ noinst_LIBRARIES = libutil.a
libutil_a_SOURCES = util.cc util.hh hash.cc hash.hh \ libutil_a_SOURCES = util.cc util.hh hash.cc hash.hh \
archive.cc archive.hh md5.c md5.h aterm.cc aterm.hh archive.cc archive.hh md5.c md5.h aterm.cc aterm.hh
AM_CXXFLAGS = -DSYSTEM=\"@host@\" -Wall -I.. -I../../externals/inst/include AM_CXXFLAGS = -DSYSTEM=\"@system@\" -Wall -I.. -I../../externals/inst/include
check_PROGRAMS = test-aterm check_PROGRAMS = test-aterm

View file

@ -5,7 +5,7 @@
-e "s^@sysconfdir\@^$(sysconfdir)^g" \ -e "s^@sysconfdir\@^$(sysconfdir)^g" \
-e "s^@localstatedir\@^$(localstatedir)^g" \ -e "s^@localstatedir\@^$(localstatedir)^g" \
-e "s^@datadir\@^$(datadir)^g" \ -e "s^@datadir\@^$(datadir)^g" \
-e "s^@host\@^$(host_triplet)^g" \ -e "s^@system\@^$(system)^g" \
-e "s^@wget\@^$(wget)^g" \ -e "s^@wget\@^$(wget)^g" \
< $< > $@ || rm $@ < $< > $@ || rm $@
chmod +x $@ chmod +x $@