From: Nathanael Nerode <neroden@twcny.rr.com>
To: gcc-patches@gcc.gnu.org
Cc: gdb-patches@sources.redhat.com, binutils@sources.redhat.com,
dj@redhat.com
Subject: Toplevel patch: Autogenerate Makefile targets 3 (*-build-*)
Date: Wed, 13 Nov 2002 12:20:00 -0000 [thread overview]
Message-ID: <20021113202039.GA21907@doctormoo> (raw)
More of the same. Tested with a Canadian cross configuration, built
build-side libiberty OK. Again, this will sit on 3.4bib until 3.3
branches.
* Makefile.tpl: Autogenerate (*-build-*).
* Makefile.def: Add build_modules.
* Makefile.in: Regenerate.
--- Makefile.tpl.2 2002-11-13 14:19:32.000000000 -0500
+++ Makefile.tpl 2002-11-13 15:12:01.000000000 -0500
@@ -877,31 +877,28 @@
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
-# This rule is used to build the modules which are built with the
+# These rules are used to build the modules which are built with the
# build machine's native compiler.
-.PHONY: $(ALL_BUILD_MODULES)
-$(ALL_BUILD_MODULES):
- dir=`echo $@ | sed -e 's/all-build-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
+[+ FOR build_modules +]
+.PHONY: all-build-[+module+]
+all-build-[+module+]:
+ if [ -f ./[+module+]/Makefile ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
- (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
+ (cd $(BUILD_SUBDIR)/[+module+] && $(MAKE) all); \
else \
true; \
fi
-# This rule is used to configure the modules which are built with the
-# native tools.
-.PHONY: $(CONFIGURE_BUILD_MODULES)
-$(CONFIGURE_BUILD_MODULES):
- @dir=`echo $@ | sed -e 's/configure-build-//'`; \
+.PHONY: configure-build-[+module+]
+configure-build-[+module+]:
if [ ! -d $(BUILD_SUBDIR) ]; then \
true; \
- elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
+ elif [ -f $(BUILD_SUBDIR)/[+module+]/Makefile ] ; then \
true; \
- elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
- if [ -d $(srcdir)/$${dir} ]; then \
- [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
+ elif echo " $(BUILD_CONFIGDIRS) " | grep " [+module+] " >/dev/null 2>&1; then \
+ if [ -d $(srcdir)/[+module+] ]; then \
+ [ -d $(BUILD_SUBDIR)/[+module+] ] || mkdir $(BUILD_SUBDIR)/[+module+];\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
AR="$(AR_FOR_BUILD)"; export AR; \
@@ -917,8 +914,8 @@
NM="$(NM_FOR_BUILD)"; export NM; \
RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
- echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
- cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
+ echo Configuring in $(BUILD_SUBDIR)/[+module+]; \
+ cd "$(BUILD_SUBDIR)/[+module+]" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) \
topdir=$(srcdir) ;; \
@@ -930,7 +927,7 @@
esac; \
if [ "$(srcdir)" = "." ] ; then \
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/[+module+] "no-such-file" ; then \
if [ -f Makefile ]; then \
if $(MAKE) distclean; then \
true; \
@@ -949,8 +946,8 @@
srcdiroption="--srcdir=."; \
libsrcdir="."; \
else \
- srcdiroption="--srcdir=$${topdir}/$${dir}"; \
- libsrcdir="$$s/$${dir}"; \
+ srcdiroption="--srcdir=$${topdir}/[+module+]"; \
+ libsrcdir="$$s/[+module+]"; \
fi; \
if [ -f $${libsrcdir}/configure ] ; then \
rm -f no-such-file skip-this-dir; \
@@ -966,7 +963,7 @@
if [ -f skip-this-dir ] ; then \
sh skip-this-dir; \
rm -f skip-this-dir; \
- cd ..; rmdir $${dir} || true; \
+ cd ..; rmdir [+module+] || true; \
else \
true; \
fi; \
@@ -976,6 +973,7 @@
else \
true; \
fi
+[+ ENDFOR build_modules +]
# This rule is used to build the modules which use FLAGS_TO_PASS. To
# build a target all-X means to cd to X and make all.
--- Makefile.def.2 2002-11-13 14:19:36.000000000 -0500
+++ Makefile.def 2002-11-13 15:09:10.000000000 -0500
@@ -1,6 +1,8 @@
#! /usr/bin/autogen
AutoGen definitions Makefile.tpl;
+build_modules= { module= libiberty; };
+
host_modules= { module= ash; };
host_modules= { module= autoconf; };
host_modules= { module= automake; };
--- Makefile.in.2 2002-11-13 14:19:41.000000000 -0500
+++ Makefile.in 2002-11-13 15:12:07.000000000 -0500
@@ -1563,31 +1563,28 @@
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
-# This rule is used to build the modules which are built with the
+# These rules are used to build the modules which are built with the
# build machine's native compiler.
-.PHONY: $(ALL_BUILD_MODULES)
-$(ALL_BUILD_MODULES):
- dir=`echo $@ | sed -e 's/all-build-//'`; \
- if [ -f ./$${dir}/Makefile ] ; then \
+
+.PHONY: all-build-libiberty
+all-build-libiberty:
+ if [ -f ./libiberty/Makefile ] ; then \
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
- (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
+ (cd $(BUILD_SUBDIR)/libiberty && $(MAKE) all); \
else \
true; \
fi
-# This rule is used to configure the modules which are built with the
-# native tools.
-.PHONY: $(CONFIGURE_BUILD_MODULES)
-$(CONFIGURE_BUILD_MODULES):
- @dir=`echo $@ | sed -e 's/configure-build-//'`; \
+.PHONY: configure-build-libiberty
+configure-build-libiberty:
if [ ! -d $(BUILD_SUBDIR) ]; then \
true; \
- elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
+ elif [ -f $(BUILD_SUBDIR)/libiberty/Makefile ] ; then \
true; \
- elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
- if [ -d $(srcdir)/$${dir} ]; then \
- [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
+ elif echo " $(BUILD_CONFIGDIRS) " | grep " libiberty " >/dev/null 2>&1; then \
+ if [ -d $(srcdir)/libiberty ]; then \
+ [ -d $(BUILD_SUBDIR)/libiberty ] || mkdir $(BUILD_SUBDIR)/libiberty;\
r=`${PWD}`; export r; \
s=`cd $(srcdir); ${PWD}`; export s; \
AR="$(AR_FOR_BUILD)"; export AR; \
@@ -1603,8 +1600,8 @@
NM="$(NM_FOR_BUILD)"; export NM; \
RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
- echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
- cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
+ echo Configuring in $(BUILD_SUBDIR)/libiberty; \
+ cd "$(BUILD_SUBDIR)/libiberty" || exit 1; \
case $(srcdir) in \
/* | [A-Za-z]:[\\/]*) \
topdir=$(srcdir) ;; \
@@ -1616,7 +1613,7 @@
esac; \
if [ "$(srcdir)" = "." ] ; then \
if [ "$(BUILD_SUBDIR)" != "." ] ; then \
- if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/libiberty "no-such-file" ; then \
if [ -f Makefile ]; then \
if $(MAKE) distclean; then \
true; \
@@ -1635,8 +1632,8 @@
srcdiroption="--srcdir=."; \
libsrcdir="."; \
else \
- srcdiroption="--srcdir=$${topdir}/$${dir}"; \
- libsrcdir="$$s/$${dir}"; \
+ srcdiroption="--srcdir=$${topdir}/libiberty"; \
+ libsrcdir="$$s/libiberty"; \
fi; \
if [ -f $${libsrcdir}/configure ] ; then \
rm -f no-such-file skip-this-dir; \
@@ -1652,7 +1649,7 @@
if [ -f skip-this-dir ] ; then \
sh skip-this-dir; \
rm -f skip-this-dir; \
- cd ..; rmdir $${dir} || true; \
+ cd ..; rmdir libiberty || true; \
else \
true; \
fi; \
@@ -1663,6 +1660,7 @@
true; \
fi
+
# This rule is used to build the modules which use FLAGS_TO_PASS. To
# build a target all-X means to cd to X and make all.
.PHONY: $(ALL_MODULES)
next reply other threads:[~2002-11-13 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-13 12:20 Nathanael Nerode [this message]
2002-11-13 12:38 ` DJ Delorie
2002-11-13 13:57 ` DJ Delorie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021113202039.GA21907@doctormoo \
--to=neroden@twcny.rr.com \
--cc=binutils@sources.redhat.com \
--cc=dj@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox