mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 16:05:29 +08:00
mkconfig.sh: Avoid using a subshell redirect.
* mkconfig.sh: Avoid using a subshell redirect. ($output.T): Change to $(output)T. (ENABLE_NLS): Remove unneeded undef. From-SVN: r49734
This commit is contained in:
parent
ea5b9a1fd2
commit
2dbe67bbfa
@ -1,5 +1,9 @@
|
|||||||
2002-02-13 Douglas B Rupp <rupp@gnat.com>
|
2002-02-13 Douglas B Rupp <rupp@gnat.com>
|
||||||
|
|
||||||
|
* mkconfig.sh: Avoid using a subshell redirect.
|
||||||
|
($output.T): Change to $(output)T.
|
||||||
|
(ENABLE_NLS): Remove unneeded undef.
|
||||||
|
|
||||||
* config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define.
|
* config/alpha/vms.h (MD_EXEC_PREFIX, MD_STARTFILE_PREFIX): Define.
|
||||||
* config/alpha/x-vms (libsubdir): Define.
|
* config/alpha/x-vms (libsubdir): Define.
|
||||||
|
|
||||||
|
@ -11,16 +11,12 @@ if [ -z "$1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
output=$1
|
output=$1
|
||||||
rm -f $output.T
|
rm -f ${output}T
|
||||||
|
|
||||||
# We used to exec > $output.T but apparently this has bugs.
|
|
||||||
# Use a redirected subshell instead.
|
|
||||||
(
|
|
||||||
|
|
||||||
# Define TARGET_CPU_DEFAULT if the system wants one.
|
# Define TARGET_CPU_DEFAULT if the system wants one.
|
||||||
# This substitutes for lots of *.h files.
|
# This substitutes for lots of *.h files.
|
||||||
if [ "$TARGET_CPU_DEFAULT" != "" ]; then
|
if [ "$TARGET_CPU_DEFAULT" != "" ]; then
|
||||||
echo "#define TARGET_CPU_DEFAULT ($TARGET_CPU_DEFAULT)"
|
echo "#define TARGET_CPU_DEFAULT ($TARGET_CPU_DEFAULT)" >> ${output}T
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The first entry in HEADERS may be auto-host.h or auto-build.h;
|
# The first entry in HEADERS may be auto-host.h or auto-build.h;
|
||||||
@ -28,7 +24,7 @@ fi
|
|||||||
if [ -n "$HEADERS" ]; then
|
if [ -n "$HEADERS" ]; then
|
||||||
set $HEADERS; first=$1
|
set $HEADERS; first=$1
|
||||||
case $first in auto-* )
|
case $first in auto-* )
|
||||||
echo "#include \"$first\""
|
echo "#include \"$first\"" >> ${output}T
|
||||||
shift
|
shift
|
||||||
HEADERS=$*
|
HEADERS=$*
|
||||||
;;
|
;;
|
||||||
@ -41,33 +37,35 @@ fi
|
|||||||
# rather than system.h allows the typedefs to be used anywhere in GCC.
|
# rather than system.h allows the typedefs to be used anywhere in GCC.
|
||||||
case $output in
|
case $output in
|
||||||
*config.h | *hconfig.h | *tconfig.h)
|
*config.h | *hconfig.h | *tconfig.h)
|
||||||
echo "#ifdef IN_GCC"
|
cat >> ${output}T <<EOF
|
||||||
echo "/* Provide three core typedefs used by everything, if we are compiling"
|
#ifdef IN_GCC
|
||||||
echo " GCC. These used to be found in rtl.h and tree.h, but this is no"
|
/* Provide three core typedefs used by everything, if we are compiling
|
||||||
echo " longer practical. Providing these here rather that system.h allows"
|
GCC. These used to be found in rtl.h and tree.h, but this is no
|
||||||
echo " the typedefs to be used everywhere within GCC. */"
|
longer practical. Providing these here rather that system.h allows
|
||||||
echo "struct rtx_def;"
|
the typedefs to be used everywhere within GCC. */
|
||||||
echo "typedef struct rtx_def *rtx;"
|
struct rtx_def;
|
||||||
echo "struct rtvec_def;"
|
typedef struct rtx_def *rtx;
|
||||||
echo "typedef struct rtvec_def *rtvec;"
|
struct rtvec_def;
|
||||||
echo "union tree_node;"
|
typedef struct rtvec_def *rtvec;
|
||||||
echo "typedef union tree_node *tree;"
|
union tree_node;
|
||||||
echo "#endif"
|
typedef union tree_node *tree;
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [ -n "$HEADERS" ]; then
|
if [ -n "$HEADERS" ]; then
|
||||||
echo '#ifdef IN_GCC'
|
echo '#ifdef IN_GCC' >> ${output}T
|
||||||
for file in $HEADERS; do
|
for file in $HEADERS; do
|
||||||
echo "# include \"$file\""
|
echo "# include \"$file\"" >> ${output}T
|
||||||
done
|
done
|
||||||
echo '#endif'
|
echo '#endif' >> ${output}T
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for def in $DEFINES; do
|
for def in $DEFINES; do
|
||||||
echo "#ifndef $def" | sed 's/=.*//'
|
echo "#ifndef $def" | sed 's/=.*//' >> ${output}T
|
||||||
echo "# define $def" | sed 's/=/ /'
|
echo "# define $def" | sed 's/=/ /' >> ${output}T
|
||||||
echo "#endif"
|
echo "#endif" >> ${output}T
|
||||||
done
|
done
|
||||||
|
|
||||||
# If this is tm_p.h, include tm-preds.h unconditionally.
|
# If this is tm_p.h, include tm-preds.h unconditionally.
|
||||||
@ -76,32 +74,26 @@ done
|
|||||||
# but only if GENERATOR_FILE is not defined.
|
# but only if GENERATOR_FILE is not defined.
|
||||||
case $output in
|
case $output in
|
||||||
*tm_p.h)
|
*tm_p.h)
|
||||||
echo "#include \"tm-preds.h\""
|
echo "#include \"tm-preds.h\"" >> ${output}T
|
||||||
;;
|
;;
|
||||||
*tconfig.h | *hconfig.h)
|
*tconfig.h | *hconfig.h)
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "#ifndef GENERATOR_FILE"
|
cat >> ${output}T <<EOF
|
||||||
echo "# include \"insn-constants.h\""
|
#ifndef GENERATOR_FILE
|
||||||
echo "# include \"insn-flags.h\""
|
# include "insn-constants.h"
|
||||||
echo "#endif"
|
# include "insn-flags.h"
|
||||||
|
#endif
|
||||||
|
EOF
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Prevent obstack.c from thinking it can do i18n of its error message
|
|
||||||
# when it's being linked against a build-side program.
|
|
||||||
echo '#ifdef GENERATOR_FILE'
|
|
||||||
echo '# undef ENABLE_NLS'
|
|
||||||
echo '#endif'
|
|
||||||
|
|
||||||
) > $output.T
|
|
||||||
|
|
||||||
# Avoid changing the actual file if possible.
|
# Avoid changing the actual file if possible.
|
||||||
if [ -f $output ] && cmp $output.T $output >/dev/null 2>&1; then
|
if [ -f $output ] && cmp ${output}T $output >/dev/null 2>&1; then
|
||||||
echo $output is unchanged >&2
|
echo $output is unchanged >&2
|
||||||
rm -f $output.T
|
rm -f ${output}T
|
||||||
else
|
else
|
||||||
mv -f $output.T $output
|
mv -f ${output}T $output
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Touch a stamp file for Make's benefit.
|
# Touch a stamp file for Make's benefit.
|
||||||
|
Loading…
Reference in New Issue
Block a user