Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gcc set _OUTDIRBASE depending on $0, and then set _OUT...



details:   https://anonhg.NetBSD.org/src/rev/f8e930814cf3
branches:  trunk
changeset: 1012862:f8e930814cf3
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu Aug 13 01:52:37 2020 +0000

description:
set _OUTDIRBASE depending on $0, and then set _OUTDIR based on this.
now you can copy mknative-gcc to mknative-gcc.old without edit.

diffstat:

 tools/gcc/mknative-gcc     |  13 ++++++++++---
 tools/gcc/mknative-gcc.old |  13 ++++++++++---
 2 files changed, 20 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r ae43b214c214 -r f8e930814cf3 tools/gcc/mknative-gcc
--- a/tools/gcc/mknative-gcc    Wed Aug 12 23:23:04 2020 +0000
+++ b/tools/gcc/mknative-gcc    Thu Aug 13 01:52:37 2020 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc,v 1.104 2020/08/12 08:53:20 mrg Exp $
+#      $NetBSD: mknative-gcc,v 1.105 2020/08/13 01:52:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -24,8 +24,15 @@
 
 . $_TOP/tools/gcc/mknative.common
 
-_OUTDIR="$_TOP/external/gpl3/gcc"
-_OUTDIRBASE="external/gpl3/gcc"
+case $0 in
+       *mknative-gcc.old)
+               _OUTDIRBASE="external/gpl3/gcc.old"
+               ;;
+       *)
+               _OUTDIRBASE="external/gpl3/gcc"
+               ;;
+esac
+_OUTDIR="$_TOP/$_OUTDIRBASE"
 
 sanitise_includes () {
        sed \
diff -r ae43b214c214 -r f8e930814cf3 tools/gcc/mknative-gcc.old
--- a/tools/gcc/mknative-gcc.old        Wed Aug 12 23:23:04 2020 +0000
+++ b/tools/gcc/mknative-gcc.old        Thu Aug 13 01:52:37 2020 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: mknative-gcc.old,v 1.7 2020/08/12 08:53:20 mrg Exp $
+#      $NetBSD: mknative-gcc.old,v 1.8 2020/08/13 01:52:37 mrg Exp $
 #
 # Shell script for generating all the constants needed for a native
 # platform build of gcc.
@@ -24,8 +24,15 @@
 
 . $_TOP/tools/gcc/mknative.common
 
-_OUTDIR="$_TOP/external/gpl3/gcc"
-_OUTDIRBASE="external/gpl3/gcc"
+case $0 in
+       *mknative-gcc.old)
+               _OUTDIRBASE="external/gpl3/gcc.old"
+               ;;
+       *)
+               _OUTDIRBASE="external/gpl3/gcc"
+               ;;
+esac
+_OUTDIR="$_TOP/$_OUTDIRBASE"
 
 sanitise_includes () {
        sed \



Home | Main Index | Thread Index | Old Index