Commit d207ebef by Jason Merrill

merge with /cvs/src

From-SVN: r35188
parent 6beb1915
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
*-co *-co
*-dirs *-dirs
*-done *-done
*-info
*-install-info *-install-info
*-src *-src
*-stamp-* *-stamp-*
...@@ -28,3 +27,6 @@ configure.vr ...@@ -28,3 +27,6 @@ configure.vr
configure.vrs configure.vrs
dir.info dir.info
Makefile Makefile
lost+found
update.out
...@@ -72,14 +72,16 @@ ...@@ -72,14 +72,16 @@
# We have to handle being invoked by both Cygnus configure and Autoconf. # We have to handle being invoked by both Cygnus configure and Autoconf.
# #
# Cygnus configure incoming variables: # Cygnus configure incoming variables:
# srcdir, subdir, target, arguments # srcdir, subdir, host, arguments
# #
# Autoconf incoming variables: # Autoconf incoming variables:
# srcdir, target, ac_configure_args # srcdir, host, ac_configure_args
# #
# We *could* figure srcdir and target out, but we'd have to do work that # We *could* figure srcdir and host out, but we'd have to do work that
# our caller has already done to figure them out and requiring these two # our caller has already done to figure them out and requiring these two
# seems reasonable. # seems reasonable.
# Note that `host' in this case is GCC's `target'. Target libraries are
# configured for a particular host.
if [ -n "${ac_configure_args}" ]; then if [ -n "${ac_configure_args}" ]; then
Makefile=${ac_file-Makefile} Makefile=${ac_file-Makefile}
...@@ -204,7 +206,10 @@ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do ...@@ -204,7 +206,10 @@ for i in `${CC-gcc} --print-multi-lib 2>/dev/null`; do
fi fi
done done
case "${target}" in # Target libraries are configured for the host they run on, so we check
# $host here, not $target.
case "${host}" in
arc-*-elf*) arc-*-elf*)
if [ x$enable_biendian != xyes ] if [ x$enable_biendian != xyes ]
then then
...@@ -524,6 +529,8 @@ multi-do: ...@@ -524,6 +529,8 @@ multi-do:
flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
CFLAGS="$(CFLAGS) $${flags}" \ CFLAGS="$(CFLAGS) $${flags}" \
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \ CXXFLAGS="$(CXXFLAGS) $${flags}" \
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \ LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \ LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
...@@ -667,7 +674,24 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then ...@@ -667,7 +674,24 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
echo "pwd: `pwd`" echo "pwd: `pwd`"
fi fi
if [ -d ${ml_dir} ]; then true; else mkdir ${ml_dir}; fi if [ -d ${ml_dir} ]; then true; else
# ``mkdir -p ${ml_dir}'' See also mkinstalldirs.
pathcomp=""
for d in `echo ":${ml_dir}" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`; do
pathcomp="$pathcomp$d"
case "$pathcomp" in
-* ) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp" 1>&2
mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
fi
if test ! -d "$pathcomp"; then
exit $lasterr
fi
pathcomp="$pathcomp/"
done
fi
if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi if [ -d ${ml_dir}/${ml_libdir} ]; then true; else mkdir ${ml_dir}/${ml_libdir}; fi
# Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../ # Eg: if ${ml_dir} = m68000/m68881, dotdot = ../../
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
version='2000-05-31' version='2000-07-06'
# This file is (in principle) common to ALL GNU software. # This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software # The presence of a machine in this file suggests that SOME GNU software
...@@ -29,7 +29,6 @@ version='2000-05-31' ...@@ -29,7 +29,6 @@ version='2000-05-31'
# configuration script generated by Autoconf, you may include it under # configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program. # the same distribution terms that you use for the rest of that program.
# Written by Per Bothner <bothner@cygnus.com>.
# Please send patches to <config-patches@gnu.org>. # Please send patches to <config-patches@gnu.org>.
# #
# Configuration subroutine to validate and canonicalize a configuration type. # Configuration subroutine to validate and canonicalize a configuration type.
...@@ -132,7 +131,7 @@ case $os in ...@@ -132,7 +131,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple) -apple | -axis)
os= os=
basic_machine=$1 basic_machine=$1
;; ;;
...@@ -212,22 +211,28 @@ case $basic_machine in ...@@ -212,22 +211,28 @@ case $basic_machine in
| hppa64 \ | hppa64 \
| alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
| alphaev6[78] \ | alphaev6[78] \
| we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \ | we32k | ns16k | clipper | i370 | sh | sh[34] \
| powerpc | powerpcle \
| 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
| mips64orion | mips64orionel | mipstx39 | mipstx39el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \
| mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
| mips64vr5000 | miprs64vr5000el | mcore \ | mips64vr5000 | miprs64vr5000el | mcore \
| sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \ | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
| thumb | d10v | fr30 | avr) | thumb | d10v | d30v | fr30 | avr)
basic_machine=$basic_machine-unknown basic_machine=$basic_machine-unknown
;; ;;
m6811 | m68hc11 | m6812 | m68hc12)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl) m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
;; ;;
# We use `pc' rather than `unknown' # We use `pc' rather than `unknown'
# because (1) that's what they normally are, and # because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users. # (2) the word "unknown" tends to confuse beginning users.
i[34567]86) i[234567]86)
basic_machine=$basic_machine-pc basic_machine=$basic_machine-pc
;; ;;
# Object if more than one company name word. # Object if more than one company name word.
...@@ -237,7 +242,7 @@ case $basic_machine in ...@@ -237,7 +242,7 @@ case $basic_machine in
;; ;;
# Recognize the basic CPU types with company name. # Recognize the basic CPU types with company name.
# FIXME: clean up the formatting here. # FIXME: clean up the formatting here.
vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
| m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
| mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
| power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
...@@ -257,7 +262,7 @@ case $basic_machine in ...@@ -257,7 +262,7 @@ case $basic_machine in
| f301-* | armv*-* | s390-* | sv1-* | t3e-* \ | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
| m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
| thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \ | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
| bs2000-*) | bs2000-* | tic54x-* | c54x-*)
;; ;;
# Recognize the various machine names and aliases which stand # Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS. # for a CPU type and a company and sometimes even an OS.
...@@ -355,6 +360,9 @@ case $basic_machine in ...@@ -355,6 +360,9 @@ case $basic_machine in
crds | unos) crds | unos)
basic_machine=m68k-crds basic_machine=m68k-crds
;; ;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
da30 | da30-*) da30 | da30-*)
basic_machine=m68k-da30 basic_machine=m68k-da30
;; ;;
...@@ -790,6 +798,10 @@ case $basic_machine in ...@@ -790,6 +798,10 @@ case $basic_machine in
basic_machine=t3e-cray basic_machine=t3e-cray
os=-unicos os=-unicos
;; ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
tx39) tx39)
basic_machine=mipstx39-unknown basic_machine=mipstx39-unknown
;; ;;
...@@ -891,6 +903,9 @@ case $basic_machine in ...@@ -891,6 +903,9 @@ case $basic_machine in
we32k) we32k)
basic_machine=we32k-att basic_machine=we32k-att
;; ;;
sh3 | sh4)
base_machine=sh-unknown
;;
sparc | sparcv9) sparc | sparcv9)
basic_machine=sparc-sun basic_machine=sparc-sun
;; ;;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
### WARNING: this file contains embedded tabs. Do not run untabify on this file. ### WARNING: this file contains embedded tabs. Do not run untabify on this file.
# Configuration script # Configuration script
# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 1997 # Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
# Free Software Foundation, Inc. # Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
...@@ -654,8 +654,8 @@ case "${TMPDIR}" in ...@@ -654,8 +654,8 @@ case "${TMPDIR}" in
*) ;; *) ;;
esac esac
# keep this filename short for &%*%$*# 14 char file names # keep this filename short for &%*%$*# 14 char file names and 8+3 file names
tmpfile=${TMPDIR}/cONf$$ tmpfile=${TMPDIR}/cNf$$
# Note that under many versions of sh a trap handler for 0 will *override* any # Note that under many versions of sh a trap handler for 0 will *override* any
# exit status you explicitly specify! At this point, the only non-error exit # exit status you explicitly specify! At this point, the only non-error exit
# is at the end of the script; these actions are duplicated there, minus # is at the end of the script; these actions are duplicated there, minus
...@@ -911,6 +911,7 @@ if [ "${build}" != "${host}" ]; then ...@@ -911,6 +911,7 @@ if [ "${build}" != "${host}" ]; then
tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM" tools="${tools} HOST_PREFIX_1 LD LD_FOR_TARGET LEX MAKEINFO NM"
tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET" tools="${tools} NM_FOR_TARGET RANLIB RANLIB_FOR_TARGET"
tools="${tools} WINDRES WINDRES_FOR_TARGET YACC" tools="${tools} WINDRES WINDRES_FOR_TARGET YACC"
tools="${tools} OBJCOPY OBJDUMP"
for var in ${tools}; do for var in ${tools}; do
if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then if eval [ -z \"\$${var}\" ] && [ -r Makefile ]; then
...@@ -954,6 +955,8 @@ t loop ...@@ -954,6 +955,8 @@ t loop
RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib} RANLIB_FOR_TARGET=${RANLIB_FOR_TARGET-${target_alias}-ranlib}
WINDRES=${WINDRES-${host_alias}-windres} WINDRES=${WINDRES-${host_alias}-windres}
WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres} WINDRES_FOR_TARGET=${WINDRES_FOR_TARGET-${target_alias}-windres}
OBJCOPY=${OBJCOPY-${host_alias}-objcopy}
OBJDUMP=${OBJDUMP-${host_alias}-objdump}
if [ -z "${YACC}" ]; then if [ -z "${YACC}" ]; then
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:" IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
...@@ -1004,6 +1007,8 @@ t loop ...@@ -1004,6 +1007,8 @@ t loop
export NM export NM
export RANLIB export RANLIB
export WINDRES export WINDRES
export OBJCOPY
export OBJDUMP
else else
# If CC is still not set, try to get gcc. # If CC is still not set, try to get gcc.
if [ -z "${CC}" ]; then if [ -z "${CC}" ]; then
...@@ -1062,14 +1067,12 @@ case "$host" in ...@@ -1062,14 +1067,12 @@ case "$host" in
enable_gdbtk=no ;; enable_gdbtk=no ;;
*msdosdjgpp*) *msdosdjgpp*)
enable_gdbtk=no ;; enable_gdbtk=no ;;
*cygwin32*)
enable_gdbtk=no ;;
esac esac
# FIXME: This should be in configure.in, not configure # FIXME: This should be in configure.in, not configure
# Determine whether gdb needs tk/tcl or not. # Determine whether gdb needs tk/tcl or not.
if [ "$enable_gdbtk" != "no" ]; then if [ "$enable_gdbtk" != "no" ]; then
GDB_TK="all-tcl all-tk all-itcl all-tix" GDB_TK="all-tcl all-tk all-itcl all-tix all-libgui"
else else
GDB_TK="" GDB_TK=""
fi fi
...@@ -1403,7 +1406,6 @@ EOF ...@@ -1403,7 +1406,6 @@ EOF
s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}% s%^CXXFLAGS[ ]*=.*$%CXXFLAGS = ${CXXFLAGS}%
}" \ }" \
-e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \ -e "s|^SHELL[ ]*=.*$|SHELL = ${config_shell}|" \
-e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" \
-e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \ -e "s|^srcdir[ ]*=.*$|srcdir = ${makesrcdir}|" \
-e "s/ //" \ -e "s/ //" \
-e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \ -e "s:^program_prefix[ ]*=.*$:program_prefix = ${program_prefix}:" \
...@@ -1415,6 +1417,9 @@ EOF ...@@ -1415,6 +1417,9 @@ EOF
-e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \ -e "s:^DEFAULT_LEX[ ]*=.*$:DEFAULT_LEX = ${DEFAULT_LEX}:" \
-e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \ -e "s:^DEFAULT_M4[ ]*=.*$:DEFAULT_M4 = ${DEFAULT_M4}:" \
${subdir}/Makefile.tem >> ${Makefile} ${subdir}/Makefile.tem >> ${Makefile}
sed -e "s:^GDB_TK[ ]*=.*$:GDB_TK = ${GDB_TK}:" ${Makefile} >${Makefile}.tem
mv -f ${Makefile}.tem ${Makefile}
# If this is a Canadian Cross, preset the values of many more # If this is a Canadian Cross, preset the values of many more
# tools. # tools.
......
@echo off
Rem
Rem WARNING WARNING WARNING: This file needs to have DOS CRLF end-of-line
Rem format, or else stock DOS/Windows shells will refuse to run it.
Rem
Rem This batch file unpacks the GDB distribution while simultaneously
Rem renaming some of the files whose names are invalid on DOS or conflict
Rem with other file names after truncation to DOS 8+3 namespace.
Rem
Rem Invoke like this:
Rem
Rem djunpack gdb-XYZ.tar
Rem
Rem where XYZ is the version number. If the argument includes leading
Rem directories, it MUST use backslashes, not forward slashes.
Rem
Rem The following 2 lines need to be changed with each new GDB release, to
Rem be identical to the name of the top-level directory where the GDB
Rem distribution unpacks itself.
set GDBVER=gdb-5.0
if "%GDBVER%"=="gdb-5.0" GoTo EnvOk
Rem If their environment space is too small, re-exec with a larger one
command.com /e:4096 /c %0 %1
GoTo End
:EnvOk
if not exist %1 GoTo NoArchive
djtar -x -p -o %GDBVER%/gdb/config/djgpp/fnchange.lst %1 > fnchange.tmp
Rem The following uses a feature of COPY whereby it does not copy
Rem empty files. We need that because the previous line will create
Rem an empty fnchange.tmp even if the command failed for some reason.
copy fnchange.tmp junk.tmp > nul
if not exist junk.tmp GoTo NoDjTar
del junk.tmp
sed -e 's,@V@,%GDBVER%,g' < fnchange.tmp > fnchange.lst
Rem See the comment above about the reason for using COPY.
copy fnchange.lst junk.tmp > nul
if not exist junk.tmp GoTo NoSed
del junk.tmp
djtar -x -n fnchange.lst %1
GoTo End
:NoSed
echo FAIL: Sed is not available.
GoTo End
:NoDjTar
echo FAIL: DJTAR is not available or no fnchange.lst file in %1.
GoTo End
:NoArchive
echo FAIL: the file %1 does not seem to exist.
echo Remember that %1 cannot use forward slashes, only backslashes.
GoTo End
:End
set GDBVER=
...@@ -82,15 +82,17 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -82,15 +82,17 @@ WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`configure.in'. You might want you modified \`acconfig.h' or \`configure.in'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site." from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in` files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' configure.in`
if test -z "$files"; then test -z "$files" && files="config.h"
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in` touch_files=
test -z "$files" || files="$files.in" for f in $files; do
else case "$f" in
files=`echo "$files" | sed -e 's/:/ /g'` *:*) touch_files="$touch_files "`echo "$f" |
fi sed -e 's/^[^:]*://' -e 's/:.*//'`;;
test -z "$files" && files="config.h.in" *) touch_files="$touch_files $f.in";;
touch $files esac
done
touch $touch_files
;; ;;
automake) automake)
...@@ -99,9 +101,9 @@ WARNING: \`$1' is missing on your system. You should only need it if ...@@ -99,9 +101,9 @@ WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'. you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
You might want to install the \`Automake' and \`Perl' packages. You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site." Grab them from any GNU archive site."
find . -type f -name Makefile.am -print \ find . -type f -name Makefile.am -print |
| sed 's/^\(.*\).am$/touch \1.in/' \ sed 's/\.am$/.in/' |
| sh while read f; do touch "$f"; done
;; ;;
bison|yacc) bison|yacc)
......
#!/bin/sh -
#
# Copyright (c) 1987 Regents of the University of California.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that the above copyright notice and this paragraph are
# duplicated in all such forms and that any documentation,
# advertising materials, and other materials related to such
# distribution and use acknowledge that the software was developed
# by the University of California, Berkeley. The name of the
# University may not be used to endorse or promote products derived
# from this software without specific prior written permission.
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
# @(#)mkdep.sh 5.12 (Berkeley) 6/30/88
#
MAKE=Makefile # default makefile name is "Makefile"
while :
do case "$1" in
# -f allows you to select a makefile name
-f)
MAKE=$2
shift; shift ;;
# the -p flag produces "program: program.c" style dependencies
# so .o's don't get produced
-p)
SED='s;\.o;;'
shift ;;
*)
break ;;
esac
done
if [ $# = 0 ] ; then
echo 'usage: mkdep [-p] [-f makefile] [flags] file ...'
exit 1
fi
if [ ! -w $MAKE ]; then
echo "mkdep: no writeable file \"$MAKE\""
exit 1
fi
TMP=/tmp/mkdep$$
trap 'rm -f $TMP ; exit 1' 1 2 3 13 15
cp $MAKE ${MAKE}.bak
sed -e '/DO NOT DELETE THIS LINE/,$d' < $MAKE > $TMP
cat << _EOF_ >> $TMP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
_EOF_
# If your compiler doesn't have -M, add it. If you can't, the next two
# lines will try and replace the "cc -M". The real problem is that this
# hack can't deal with anything that requires a search path, and doesn't
# even try for anything using bracket (<>) syntax.
#
# egrep '^#include[ ]*".*"' /dev/null $* |
# sed -e 's/:[^"]*"\([^"]*\)".*/: \1/' -e 's/\.c/.o/' |
gcc -MM $* |
sed "
s; \./; ;g
$SED" >> $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
exit 0
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment