diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2003-11-14 09:59:13 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2003-11-14 09:59:13 +0000 |
commit | 48c3faca5194fab0d6f19ad33a9756763dddefdd (patch) | |
tree | 24e08e006efef44f671d275a5c896e22d83abb28 /pkgs/stdenv/generic/builder.sh | |
parent | 6b2bb2247432e5749710576a167a1632c2ec0a61 (diff) |
* Renamed pkgs-ng to pkgs.
svn path=/nixpkgs/trunk/; revision=502
Diffstat (limited to 'pkgs/stdenv/generic/builder.sh')
-rwxr-xr-x | pkgs/stdenv/generic/builder.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/stdenv/generic/builder.sh b/pkgs/stdenv/generic/builder.sh new file mode 100755 index 000000000000..ad788118492c --- /dev/null +++ b/pkgs/stdenv/generic/builder.sh @@ -0,0 +1,41 @@ +#! /bin/sh + +# Set up the initial path. +for i in $initialPath; do + PATH=$PATH:$i/bin +done + +# Make output directories. +mkdir $out || exit 1 +mkdir $out/bin || exit 1 + +# Create the setup script. +sed \ + -e "s^@OUT@^$out^g" \ + -e "s^@PREHOOK@^$prehook^g" \ + -e "s^@POSTHOOK@^$posthook^g" \ + -e "s^@INITIALPATH@^$initialPath^g" \ + -e "s^@PARAM1@^$param1^g" \ + -e "s^@PARAM2@^$param2^g" \ + -e "s^@PARAM3@^$param3^g" \ + -e "s^@PARAM4@^$param4^g" \ + -e "s^@PARAM5@^$param5^g" \ + < $setup > $out/setup || exit 1 + +# Create the gcc wrapper. +sed \ + -e 's^@GCC\@^$NIX_CC^g' \ + < $gccwrapper > $out/bin/gcc || exit 1 +chmod +x $out/bin/gcc || exit 1 +ln -s gcc $out/bin/cc || exit 1 + +# Create the g++ wrapper. +sed \ + -e 's^@GCC\@^$NIX_CXX^g' \ + < $gccwrapper > $out/bin/g++ || exit 1 +chmod +x $out/bin/g++ || exit 1 +ln -s g++ $out/bin/c++ || exit 1 + +# Create the ld wrapper. +cp $ldwrapper $out/bin/ld || exit 1 +chmod +x $out/bin/ld || exit 1 |