Skip to content
Snippets Groups Projects
Commit a2708937 authored by Hallvard Furuseth's avatar Hallvard Furuseth
Browse files

Do not pipe to awk, use temporary file instead

parent 0960e34b
No related branches found
No related tags found
No related merge requests found
...@@ -87,7 +87,7 @@ fi ...@@ -87,7 +87,7 @@ fi
TMP=/tmp/mkdep$$ TMP=/tmp/mkdep$$
trap 'rm -f $TMP ; exit 1' 1 2 3 13 15 trap 'rm -f $TMP.sed $TMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak cp $MAKE ${MAKE}.bak
...@@ -134,7 +134,9 @@ _EOF_ ...@@ -134,7 +134,9 @@ _EOF_
$CC $CC_MKDEP_FLAGS $files | \ $CC $CC_MKDEP_FLAGS $files | \
sed -e 's; \./; ;g' | \ sed -e 's; \./; ;g' | \
$SED | \ $SED > $TMP.sed
# dont pipe to awk. SGI awk wants a filename as argument.
# (or '-', but I do not know if all other awks support that.)
awk ' awk '
$1 ~ /:/ { $1 ~ /:/ {
filenm=$1; filenm=$1;
...@@ -153,7 +155,7 @@ $1 !~ /:/ { ...@@ -153,7 +155,7 @@ $1 !~ /:/ {
print rec; print rec;
} }
} }
' noslash="$NOSLASH" >> $TMP ' noslash="$NOSLASH" $TMP.sed >> $TMP
cat << _EOF_ >> $TMP cat << _EOF_ >> $TMP
...@@ -163,5 +165,5 @@ _EOF_ ...@@ -163,5 +165,5 @@ _EOF_
# copy to preserve permissions # copy to preserve permissions
cp $TMP $MAKE cp $TMP $MAKE
rm -f ${MAKE}.bak $TMP rm -f ${MAKE}.bak $TMP.sed $TMP
exit 0 exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment