Don't complain undefined weak dynamic reference
[deliverable/binutils-gdb.git] / ld / genscripts.sh
index 7ee03d2b1ce96c090b5a3838745383c5d77778e0..cb2b081e9e975fb5e797f822958c8940760d8b6e 100755 (executable)
@@ -129,11 +129,15 @@ TOOL_LIB=$2
 
 source_sh()
 {
-  echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc
+  if test -n "${DEPDIR}"; then
+    echo $1 >> ${DEPDIR}/e${EMULATION_NAME}.Tc
+  fi
   . $1
 }
 
-rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+if test -n "${DEPDIR}"; then
+  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+fi
 
 # Include the emulation-specific parameters:
 CUSTOMIZER_SCRIPT="${srcdir}/emulparams/${EMULATION_NAME}.sh"
@@ -639,12 +643,14 @@ fi
 > e${EMULATION_NAME}.c
 source_em ${srcdir}/emultempl/${TEMPLATE_NAME-generic}.em
 
-ecdeps=
-for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
-  case " $ecdeps " in
-    *" $dep "*): ;;
-    *) ecdeps="$ecdeps $dep" ;;
-  esac
-done
-rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
-echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc
+if test -n "${DEPDIR}"; then
+  ecdeps=
+  for dep in `cat ${DEPDIR}/e${EMULATION_NAME}.Tc`; do
+    case " $ecdeps " in
+      *" $dep "*): ;;
+      *) ecdeps="$ecdeps $dep" ;;
+    esac
+  done
+  rm -f ${DEPDIR}/e${EMULATION_NAME}.Tc
+  echo "e${EMULATION_NAME}.c:${ecdeps}" > ${DEPDIR}/e${EMULATION_NAME}.Pc
+fi
This page took 0.023951 seconds and 4 git commands to generate.