summaryrefslogtreecommitdiff
path: root/Makefile.tpl
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 14:01:13 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-03 14:01:13 +0000
commite4a78ee4147576a787f4df56c5c382277dab7112 (patch)
tree95fb8390b29b25ac8c6ff8ea0921589296be103b /Makefile.tpl
parentc949bae8f38cc068f69372c427b1d18f3a007305 (diff)
downloadgcc-e4a78ee4147576a787f4df56c5c382277dab7112.tar.gz
2005-01-03 Paolo Bonzini <bonzini@gnu.org>
Revert 2004-12-28 Makefile changes, a better fix will be applied to mainline and src after GCC 4.0 branches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92826 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'Makefile.tpl')
-rw-r--r--Makefile.tpl74
1 files changed, 38 insertions, 36 deletions
diff --git a/Makefile.tpl b/Makefile.tpl
index d85d0902f76..44c15fd53cc 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -822,30 +822,31 @@ configure-build-[+module+]:
echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir="../../$(srcdir)" ;; \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
esac; \
if [ "$(srcdir)" = "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
else \
- exit 1; \
+ true; \
fi; \
else \
- true; \
+ exit 1; \
fi; \
else \
- exit 1; \
- fi; \
- if [ -d ../include ] ; then \
true; \
- else \
- mkdir ../include; \
- cd ../include; \
- $(SHELL) $$s/symlink-tree $${topdir}/include "no-such-file"; \
- cd ../[+module+]; \
fi; \
srcdiroption="--srcdir=."; \
libsrcdir="."; \
@@ -1031,37 +1032,38 @@ ENDIF raw_cxx +]
echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
- /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \
- *) topdir="../../$(srcdir)" ;; \
- esac; \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(TARGET_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \[+ IF stage +]
if [ "$(srcdir)" = "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- if $(MAKE) distclean; then \
- true; \
+ if [ "$(TARGET_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
else \
- exit 1; \
+ true; \
fi; \
else \
- true; \
+ exit 1; \
fi; \
else \
- exit 1; \
- fi; \
- if [ -d ../include ] ; then \
true; \
- else \
- mkdir ../include; \
- cd ../include; \
- $(SHELL) $$s/symlink-tree $${topdir}/include "no-such-file"; \
- cd ../[+module+]; \
fi; \
srcdiroption="--srcdir=."; \
libsrcdir="."; \
- else \
+ else \[+ ENDIF stage +]
srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
- fi; \
+ libsrcdir="$$s/[+module+]"; \[+ IF stage +]
+ fi; \[+ ENDIF stage +]
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(TARGET_CONFIGARGS) $${srcdiroption} \