Eelco Dolstra wrote:
This is less sensitive to changes in the Makefile between releases.
I am not sure what will happen first - 'make' allowing assignment to VAR
not matching ^VAR= or 'make' that proceeds overrides in a different
fashion.

The command-line variables override definitions in the Makefile, and they're
even passed on in recursive invocations of Make.

It is so for now. I hope that recursive behaviour will not be interesting for iproute Makefile. If Makefile wants to pass the variable recursively it will do it with my replacement too, if it doesn't but a new variable with the same name appears in child directory - well, it deserves manual inspection anyway. Probably you are right, in disasterous case of iproute having recursive Makefile system with own SBINDIR declared in every Makefile your solution will work better.

OK, I attach default.nix for your way and with one bug fixed - it now fixes all hash-bang-bash extries, not only those needed for building 'ip' itself.

Raskin
pkgs:
pkgs.stdenv.mkDerivation {
  name = "iproute";

  src = pkgs.fetchurl {
    url = 
http://ftp.debian.org/debian/pool/main/i/iproute/iproute_20070313.orig.tar.gz;
    sha256 = "1j7cmlr7p9xcg9ys8fhjnynwrp475rbkr2j2c5jqm1xzczw60f9v";
  };

  preConfigure = "for script in $(find . -type f); do sed -e '[EMAIL PROTECTED] 
/bin/[EMAIL PROTECTED] /bin/sh@' -i $script; done;";

  makeFlags = " SBINDIR=\\$(out)/sbin CONFDIR=\\$(out)/etc DOCDIR=\\$(out)/doc 
MANDIR=\\$(out)/man ";
 
  buildInputs = [pkgs.bison pkgs.flex pkgs.db4];
}
_______________________________________________
nix-dev mailing list
[email protected]
https://mail.cs.uu.nl/mailman/listinfo/nix-dev

Reply via email to