This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Toplevel Makefile.tpl cleanup 2/n part three
- From: Nathanael Nerode <neroden at twcny dot rr dot com>
- To: gcc-patches at gcc dot gnu dot org, binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com, aoliva at redhat dot com
- Date: Tue, 4 Mar 2003 12:25:58 -0500
- Subject: Toplevel Makefile.tpl cleanup 2/n part three
This collapses the 'if' into the preceding 'case'.
* Makefile.tpl: Simplify logic.
* Makefile.in: Regenerate.
--- Makefile.tpl.old 2003-03-04 12:17:00.000000000 -0500
+++ Makefile.tpl 2003-03-04 12:24:25.000000000 -0500
@@ -838,30 +838,30 @@
echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
+ \.) \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ $(MAKE) distclean || exit 1; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ srcdiroption="--srcdir=." ; \
+ libsrcdir="." ;; \
/* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
+ topdir=$(srcdir) ; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]" ; \
+ libsrcdir="$$s/[+module+]" ;; \
*) \
case "$(BUILD_SUBDIR)" in \
.) topdir="../$(srcdir)" ;; \
*) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ esac ; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]" ; \
+ libsrcdir="$$s/[+module+]" ;; \
esac; \
- if [ "$(srcdir)" = "." ] ; then \
- if [ "$(BUILD_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- $(MAKE) distclean || exit 1; \
- fi; \
- else \
- exit 1; \
- fi; \
- fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
- else \
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
- fi; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
$(BUILD_CONFIGARGS) $${srcdiroption} \
@@ -1020,29 +1020,32 @@
echo Configuring in $(TARGET_SUBDIR)/[+module+]; \
cd "$(TARGET_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
+ \.) \
+ if [ "$(TARGET_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ $(MAKE) distclean || exit 1; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ srcdiroption="--srcdir=." ; \
+ libsrcdir="." ;; \
/* | [A-Za-z]:[\\/]*) \
- topdir=$(srcdir) ;; \
+ topdir=$(srcdir) ; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]" ; \
+ libsrcdir="$$s/[+module+]" ;; \
*) \
case "$(TARGET_SUBDIR)" in \
.) topdir="../$(srcdir)" ;; \
*) topdir="../../$(srcdir)" ;; \
- esac ;; \
+ esac ; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]" ; \
+ libsrcdir="$$s/[+module+]" ;; \
esac; \
if [ "$(srcdir)" = "." ] ; then \
- if [ "$(TARGET_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
- if [ -f Makefile ]; then \
- $(MAKE) distclean || exit 1; \
- fi; \
- else \
- exit 1; \
- fi; \
- fi; \
- srcdiroption="--srcdir=."; \
- libsrcdir="."; \
else \
- srcdiroption="--srcdir=$${topdir}/[+module+]"; \
- libsrcdir="$$s/[+module+]"; \
fi; \
rm -f no-such-file || : ; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \