First round ld support for PPC PE
[deliverable/binutils-gdb.git] / cfg-ml-pos.in
index 8abfafee20dccf521e29020fe00f6cd02c7ada3a..34030986d42deef9c01ec9bbc927e5c627cf0ac9 100644 (file)
@@ -12,10 +12,14 @@ if [ -z "${with_multisubdir}" ]; then
   multisubdir=
 else
   multisubdir="/${with_multisubdir}"
-  dotdot=`echo ${multisubdir} | sed -e 's:/[^/]*:../:g'`
+  # The '[^/][^/]*' appears that way to work around a SunOS sed bug.
+  dotdot=`echo ${with_multisubdir} | sed -e 's:[^/][^/]*:..:g'`
   # TOP is used by newlib and should not be used elsewhere for this purpose.
-  sed -e "s:^TOP[      ]*=[    ]*\([./]*\)[    ]*$:TOP = ${dotdot}\1:" \
-      -e "s:^MULTITOP[         ]*=[    ]*\([./]*\)[    ]*$:MULTITOP = ${dotdot}\1:" \
+  # MULTITOP is the proper one to use.
+  # FIXME: newlib needs to be updated to use MULTITOP so we can delete TOP.
+  # Newlib may wish to continue to use TOP for its own purposes of course.
+  sed -e "s:^TOP[      ]*=[    ]*\([./]*\)[    ]*$:TOP = ${dotdot}/\1:" \
+      -e "s:^MULTITOP[         ]*=.*$:MULTITOP = ${dotdot}:" \
        ${Makefile} > Makefile.tem
   rm -f ${Makefile}
   mv Makefile.tem ${Makefile}
@@ -25,7 +29,7 @@ fi
 # and lists the subdirectories to recurse into.
 # MULTISUBDIR is non-empty in each cpu subdirectory's Makefile
 # (eg: newlib/h8300h/Makefile) and is the installed subdirectory name with
-# a trailing '/'.
+# a leading '/'.
 # MULTIDO is used for targets like all, install, and check where
 # $(FLAGS_TO_PASS) augmented with the subdir's compiler option is needed.
 # MULTICLEAN is used for the *clean targets.
@@ -45,6 +49,9 @@ sed -e "s:^MULTIDIRS[         ]*=.*$:MULTIDIRS = ${multidirs}:" \
 rm -f ${Makefile}
 mv Makefile.tem ${Makefile}
 
+# ??? May wish to add a check to avoid appending this to Makefiles that
+# don't need it.  It's not necessary, but is cleaner.
+
 cat > Multi.tem <<\EOF
 
 # FIXME: There should be an @-sign in front of the `if'.
This page took 0.023323 seconds and 4 git commands to generate.