mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-27 05:24:09 +08:00
check_makefile_deps.sh: New file.
contrib/ * check_makefile_deps.sh: New file. gcc/ * Makefile.in (TARGET_DEF_H): Add targhooks.h. (FIXED_VALUE_H): New variable. (RTL_BASE_H): Use $(INPUT_H) and $(FIXED_VALUE_H) instead of input.h, fixed-value.h. (TREE_H): Use $(INPUT_H), add $(SYMTAB_H). (BASIC_BLOCK_H): Use $(BITMAP_H). (FUNCTION_H): Add varray.h. (IPA_REFERENCE_H): Use $(BITMAP_H). (CGRAPH_H): Add $(BASIC_BLOCK_H). (DF_H): Use $(BITMAP_H). (GGC_H): Add statistics.h. (INSN_ADDR_H): New. (INSN_ATTR_H): Use it. (SYSTEM_H): Add safe-ctype.h, filenames.h. (INPUT_H): New. (SYMTAB_H): Add $(OBSTACK_H). (CPP_INTERNAL_H): New. (TREE_DUMP_H): Add tree-pass.h. (TREE_FLOW_H): Use $(BITMAP_H) (PRETTY_PRINT_H): Use $(INPUT_H). (EBITMAP_H): Rename from typo-ed EBIMAP_H. (GSTAB_H): New. (BITMAP_H): New. (many object files): Fix lots of header dependencies throughout. gcc/fortran/ * Make-lang.in (gfortranspec.o): Fix dependencies. gcc/java/ * Make-lang.in (jvspec.o): Fix dependencies. From-SVN: r137792
This commit is contained in:
parent
a4e4a2d60e
commit
e63ea00c65
@ -1,3 +1,7 @@
|
||||
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* check_makefile_deps.sh: New file.
|
||||
|
||||
2008-05-08 Sebastian Pop <sebastian.pop@amd.com>
|
||||
|
||||
* patch_tester.sh (report): Do not print "Checker: ".
|
||||
|
94
contrib/check_makefile_deps.sh
Normal file
94
contrib/check_makefile_deps.sh
Normal file
@ -0,0 +1,94 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# Check for accurate dependencies in gcc/Makefile.in.
|
||||
#
|
||||
# Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
# Written by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
|
||||
#
|
||||
# This script is Free Software, and it can be copied, distributed and
|
||||
# modified as defined in the GNU General Public License. A copy of
|
||||
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
|
||||
#
|
||||
# Start this script in an up to date build-tree/gcc directory.
|
||||
# Using it in stage1 only works if the host compiler is GCC.
|
||||
|
||||
# To continue an interrupted check, make sure there are no *.o.backup
|
||||
# files lying around (i.e., move them back to their original name),
|
||||
# and set $start_after to the name of the last object that should be skipped.
|
||||
start_after=
|
||||
|
||||
# Skip some objects unconditionally; make sure each name in this list is
|
||||
# surrounded by spaces.
|
||||
skip=" crtbegin.o crtbeginS.o crtbeginT.o crtend.o crtendS.o crtfastmath.o crtprec64.o crtprec80.o crtprec32.o "
|
||||
|
||||
# Files which show up as dependencies other than through unconditional #include.
|
||||
# This is an egrep pattern.
|
||||
hidden_dep_files='(BASE-VER|DATESTAMP|DEV-PHASE|Makefile|xcoffout\.h|basic-block\.h|bconfig\.h)$'
|
||||
|
||||
: ${MAKE=make}
|
||||
: ${EGREP="grep -E"}
|
||||
|
||||
# -------------------------------------------------------------------------
|
||||
# There should be no need for changes beyond this point.
|
||||
|
||||
set -e
|
||||
st=0
|
||||
|
||||
if test -f c-common.o; then :; else
|
||||
echo "$0: rerun in an up to date build-tree/gcc directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for obj in *.o
|
||||
do
|
||||
if test -n "$start_after"; then
|
||||
if test $obj = $start_after; then
|
||||
start_after=
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
case $skip in *\ $obj\ *) continue ;; esac
|
||||
|
||||
mv -f $obj $obj.backup
|
||||
${MAKE} $obj CFLAGS='-MM -MF depfile'
|
||||
mv -f $obj.backup $obj
|
||||
${MAKE} -t
|
||||
LC_ALL=C ${MAKE} -d $obj >make-d-log
|
||||
hdrs=`cat depfile`
|
||||
for hdr in $hdrs; do
|
||||
case $hdr in
|
||||
*: | *.o | \\ | /* ) ;;
|
||||
*)
|
||||
echo $hdr ;;
|
||||
esac
|
||||
done < depfile |
|
||||
LC_ALL=C sort -u > hdrs
|
||||
|
||||
|
||||
sed -n '/.*Prerequisite..\([^ ]*\). is newer than target .'"$obj"'.*/s//\1/p' \
|
||||
< make-d-log |
|
||||
LC_ALL=C sort -u > not-up-to-date
|
||||
if test -s not-up-to-date; then
|
||||
st=1
|
||||
echo "$0: error: prerequisites for $obj are not up to date:" >&2
|
||||
cat not-up-to-date >&2
|
||||
fi
|
||||
sed -n '/.*Prerequisite..\([^ ]*\). is older than target .'"$obj"'.*/s//\1/p' \
|
||||
< make-d-log |
|
||||
LC_ALL=C sort -u > deps
|
||||
missing_deps=`LC_ALL=C join -v 1 hdrs deps`
|
||||
unneeded_deps=`LC_ALL=C join -v 2 hdrs deps | $EGREP -v "$hidden_dep_files" || :`
|
||||
if test -n "$missing_deps"; then
|
||||
st=1
|
||||
echo "missing deps for $obj:"
|
||||
echo "$missing_deps" | sed 's/^/ /'
|
||||
fi
|
||||
if test -n "$unneeded_deps"; then
|
||||
# unneeded dependencies are not a big problem, so they cause no failure.
|
||||
echo "unneeded deps for $obj:"
|
||||
echo "$unneeded_deps" | sed 's/^/ /'
|
||||
fi
|
||||
done
|
||||
exit $st
|
||||
|
||||
# vi:sw=2:
|
@ -1,3 +1,30 @@
|
||||
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* Makefile.in (TARGET_DEF_H): Add targhooks.h.
|
||||
(FIXED_VALUE_H): New variable.
|
||||
(RTL_BASE_H): Use $(INPUT_H) and $(FIXED_VALUE_H) instead of
|
||||
input.h, fixed-value.h.
|
||||
(TREE_H): Use $(INPUT_H), add $(SYMTAB_H).
|
||||
(BASIC_BLOCK_H): Use $(BITMAP_H).
|
||||
(FUNCTION_H): Add varray.h.
|
||||
(IPA_REFERENCE_H): Use $(BITMAP_H).
|
||||
(CGRAPH_H): Add $(BASIC_BLOCK_H).
|
||||
(DF_H): Use $(BITMAP_H).
|
||||
(GGC_H): Add statistics.h.
|
||||
(INSN_ADDR_H): New.
|
||||
(INSN_ATTR_H): Use it.
|
||||
(SYSTEM_H): Add safe-ctype.h, filenames.h.
|
||||
(INPUT_H): New.
|
||||
(SYMTAB_H): Add $(OBSTACK_H).
|
||||
(CPP_INTERNAL_H): New.
|
||||
(TREE_DUMP_H): Add tree-pass.h.
|
||||
(TREE_FLOW_H): Use $(BITMAP_H)
|
||||
(PRETTY_PRINT_H): Use $(INPUT_H).
|
||||
(EBITMAP_H): Rename from typo-ed EBIMAP_H.
|
||||
(GSTAB_H): New.
|
||||
(BITMAP_H): New.
|
||||
(many object files): Fix lots of header dependencies throughout.
|
||||
|
||||
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* Makefile.in (write_entries_to_file, write_entries_to_file_split):
|
||||
|
429
gcc/Makefile.in
429
gcc/Makefile.in
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,7 @@
|
||||
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* Make-lang.in (gfortranspec.o): Fix dependencies.
|
||||
|
||||
2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/36725
|
||||
|
@ -77,7 +77,8 @@ fortran: f951$(exeext)
|
||||
# Tell GNU make to ignore files by these names if they exist.
|
||||
.PHONY: fortran
|
||||
|
||||
gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) $(CONFIG_H)
|
||||
gfortranspec.o: $(srcdir)/fortran/gfortranspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \
|
||||
$(CONFIG_H) coretypes.h intl.h
|
||||
(SHLIB_LINK='$(SHLIB_LINK)'; \
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
|
||||
$(INCLUDES) $(srcdir)/fortran/gfortranspec.c)
|
||||
|
@ -1,3 +1,7 @@
|
||||
2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
|
||||
|
||||
* Make-lang.in (jvspec.o): Fix dependencies.
|
||||
|
||||
2008-07-06 Tom Tromey <tromey@redhat.com>
|
||||
|
||||
* Make-lang.in (java/parse.o-warn): Remove.
|
||||
|
@ -57,7 +57,7 @@ JAVA_TARGET_INDEPENDENT_BIN_TOOLS = jcf-dump
|
||||
.PHONY: java
|
||||
|
||||
jvspec.o: $(srcdir)/java/jvspec.c $(SYSTEM_H) coretypes.h $(TM_H) \
|
||||
$(GCC_H) $(CONFIG_H)
|
||||
$(GCC_H) $(CONFIG_H) java/jcf.h java/javaop.h
|
||||
(SHLIB_LINK='$(SHLIB_LINK)'; \
|
||||
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \
|
||||
$(INCLUDES) $(srcdir)/java/jvspec.c $(OUTPUT_OPTION))
|
||||
|
Loading…
Reference in New Issue
Block a user