This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Avoid multiple multi-do/multi-clean rules
- From: Andreas Schwab <schwab at suse dot de>
- To: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Fri, 14 Mar 2003 14:44:30 +0100
- Subject: Avoid multiple multi-do/multi-clean rules
If you do
CONFIG_FILES=src/Makefile ./config.status
in the libstdc++ build directory you'll get a warning from make about
multiple multi-do and multi-clean rules in Makefile. Tested on
ia64-linux.
Andreas.
2003-03-14 Andreas Schwab <schwab at suse dot de>
* configure.in: Only append to makefiles that are newly created to
avoid multiple multi-do/multi-clean rules.
* configure: Rebuilt.
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.in,v
retrieving revision 1.118
diff -u -p -a -u -p -a -r1.118 configure.in
--- configure.in 9 Mar 2003 22:31:41 -0000 1.118
+++ configure.in 14 Mar 2003 12:21:13 -0000
@@ -477,9 +477,22 @@ po/Makefile testsuite/Makefile mkcheck t
if test -n "$CONFIG_FILES"; then
if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
LD="${ORIGINAL_LD_FOR_MULTILIBS}"
- ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
- grep '^MULTISUBDIR =' Makefile >> src/Makefile
- grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+ # Ony modify Makefiles that are just being created.
+ case " $CONFIG_FILES" in
+ *" Makefile"*)
+ ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+ ;;
+ esac
+ case $CONFIG_FILES in
+ *src/Makefile*)
+ grep '^MULTISUBDIR =' Makefile >> src/Makefile
+ ;;
+ esac
+ case $CONFIG_FILES in
+ *libsupc++/Makefile*)
+ grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+ ;;
+ esac
fi
fi
chmod +x mkcheck
@@ -504,9 +517,22 @@ dnl libmath/Makefile libio/Makefile
dnl po/Makefile testsuite/Makefile mkcheck testsuite_flags)
dnl AC_CONFIG_COMMANDS([default],
dnl [if test -n "$CONFIG_FILES"; then
-dnl ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
-dnl grep '^MULTISUBDIR =' Makefile >> src/Makefile
-dnl grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+dnl # Ony modify Makefiles that are just being created.
+dnl case " $CONFIG_FILES" in
+dnl *" Makefile"*)
+dnl ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+dnl ;;
+dnl esac
+dnl case $CONFIG_FILES in
+dnl *src/Makefile*)
+dnl grep '^MULTISUBDIR =' Makefile >> src/Makefile
+dnl ;;
+dnl esac
+dnl case $CONFIG_FILES in
+dnl *libsupc++/Makefile*)
+dnl grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+dnl ;;
+dnl esac
dnl fi
dnl chmod +x mkcheck
dnl chmod +x testsuite_flags
--
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."