diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:52:33 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:52:33 +0000 |
commit | 7ba700b7f6e5fb17d280e2b8a3ae28866777715f (patch) | |
tree | 2f538ff3d975beabb6c371d999b1ee6e8b91cfb5 /mkdep | |
parent | Releasing progress-linux version 4.99.4-4~progress7.99u1. (diff) | |
download | tcpdump-7ba700b7f6e5fb17d280e2b8a3ae28866777715f.tar.xz tcpdump-7ba700b7f6e5fb17d280e2b8a3ae28866777715f.zip |
Merging upstream version 4.99.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | mkdep | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -1,4 +1,4 @@ -#!/bin/sh - +#!/bin/sh -e # # Copyright (c) 1994, 1996 # The Regents of the University of California. All rights reserved. @@ -63,20 +63,20 @@ if [ $# = 0 ] ; then exit 1 fi -if [ ! -w $MAKE ]; then +if [ ! -w "$MAKE" ]; then echo "mkdep: no writeable file \"$MAKE\"" exit 1 fi -TMP=/tmp/mkdep$$ +TMP=${TMPDIR:-/tmp}/mkdep$$ -trap 'rm -f $TMP ; exit 1' 1 2 3 13 15 +trap 'rm -f "$TMP" ; exit 1' HUP INT QUIT PIPE TERM -cp $MAKE ${MAKE}.bak +cp "$MAKE" "${MAKE}.bak" -sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP +sed -e '/DO NOT DELETE THIS LINE/,$d' < "$MAKE" > "$TMP" -cat << _EOF_ >> $TMP +cat << _EOF_ >> "$TMP" # DO NOT DELETE THIS LINE -- mkdep uses it. # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. @@ -94,23 +94,25 @@ _EOF_ # Construct a list of source files with paths relative to the source directory. # sources="" -for srcfile in $* +for srcfile in "$@" do sources="$sources $SOURCE_DIRECTORY/$srcfile" done # XXX this doesn't work with things like "-DDECLWAITSTATUS=union\ wait" -$CC $DEPENDENCY_CFLAG $flags $sources | +# $flags and $sources are meant to expand +# shellcheck disable=SC2086 +"$CC" "$DEPENDENCY_CFLAG" $flags $sources | sed " s; \./; ;g - $SED" >> $TMP + $SED" >> "$TMP" -cat << _EOF_ >> $TMP +cat << _EOF_ >> "$TMP" # IF YOU PUT ANYTHING HERE IT WILL GO AWAY _EOF_ # copy to preserve permissions -cp $TMP $MAKE -rm -f ${MAKE}.bak $TMP +cp "$TMP" "$MAKE" +rm -f "${MAKE}.bak" "$TMP" exit 0 |