diff options
author | Michael Meissner <gnu@the-meissners.org> | 1996-07-11 14:17:12 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1996-07-11 14:17:12 +0000 |
commit | 062aded9d1d7adebb5df9f7cbfb9dcbbca94da99 (patch) | |
tree | 329c542e5b6e67e4265d825b3fdf0ed87fc06422 /Makefile.in | |
parent | 5410991408fb224962a53189e5f94aeec854e649 (diff) | |
download | gdb-062aded9d1d7adebb5df9f7cbfb9dcbbca94da99.zip gdb-062aded9d1d7adebb5df9f7cbfb9dcbbca94da99.tar.gz gdb-062aded9d1d7adebb5df9f7cbfb9dcbbca94da99.tar.bz2 |
Automagically reconfigure target directories whenever the multilib options change
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in index 6d71995..89b3781 100644 --- a/Makefile.in +++ b/Makefile.in @@ -857,6 +857,7 @@ $(CLEAN_MODULES) $(CLEAN_X11_MODULES) clean-gcc: .PHONY: $(CLEAN_TARGET_MODULES) $(CLEAN_TARGET_MODULES): @dir=`echo $@ | sed -e 's/clean-target-//'`; \ + rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ r=`pwd`; export r; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \ @@ -1012,6 +1013,18 @@ $(INSTALL_MODULES): install-dirs .PHONY: $(CONFIGURE_TARGET_MODULES) $(CONFIGURE_TARGET_MODULES): @dir=`echo $@ | sed -e 's/configure-target-//'`; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ + if [ -f $(TARGET_SUBDIR)/$${dir}/multilib.out ]; then \ + if cmp $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/tmpmulti.out > /dev/null; then \ + rm -f $(TARGET_SUBDIR)/$${dir}/tmpmulti.out; \ + else \ + echo "Multilibs changed for $${dir}, reconfiguring"; \ + rm -f $(TARGET_SUBDIR)/$${dir}/multilib.out $(TARGET_SUBDIR)/$${dir}/Makefile; \ + mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ + fi; \ + else \ + mv $(TARGET_SUBDIR)/$${dir}/tmpmulti.out $(TARGET_SUBDIR)/$${dir}/multilib.out; \ + fi; \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \ true; \ elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ |