public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: newlib-cvs@sourceware.org
Subject: [newlib-cygwin] Create a recursive make target that is modeled after the existing multilib makefile config-ml.in whi
Date: Wed, 05 Jul 2017 12:42:00 -0000 [thread overview]
Message-ID: <20170705124203.100517.qmail@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ebd97f4c0061315dbabb04752edf4ed9cd38187f
commit ebd97f4c0061315dbabb04752edf4ed9cd38187f
Author: Tamar Christina <tamar.christina@arm.com>
Date: Wed Jul 5 12:54:52 2017 +0100
Create a recursive make target that is modeled after the existing multilib makefile config-ml.in which can be used to build the same files within a target multiple ways.
e.g. from the same source file produce multiple libs by varying the
options passed to the compiler.
Signed-off-by: Tamar Christina <tamar.christina@arm.com>
Diff:
---
libgloss/multi-build.in | 61 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
new file mode 100644
index 0000000..0bd12cf
--- /dev/null
+++ b/libgloss/multi-build.in
@@ -0,0 +1,61 @@
+PWD_COMMAND=$${PWDCMD-pwd}
+
+# FIXME: There should be an @-sign in front of the `if'.
+# Leave out until this is tested a bit more.
+multi-do:
+ if [ -z "$(MULTIDIRS)" ]; then \
+ true; \
+ else \
+ rootpre=`${PWD_COMMAND}`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
+ lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; export lib; \
+ compiler="$(CC)"; \
+ for dir in $(MULTIDIRS); do \
+ if [ "$${dir}" = "." ]; then \
+ true; \
+ else \
+ destpre=`echo $${rootpre}/$${dir}`/; export destpre; \
+ if ! test -d $${destpre} ; then \
+ mkdir -p $${destpre}; \
+ cp config.status $${destpre}; \
+ cd $${destpre}; \
+ $(SHELL) config.status; \
+ sed -e "s:^MULTIDIRS\s*+=.*$$:MULTIDIRS = :" \
+ -e "s:^MULTILIBNAME\s*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
+ -e "s:^MULTI_FLAGS_FOR_TARGET\s*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
+ -e "s:^objdir\s*=.*$$:objdir = ..:" \
+ Makefile > Makefile.tem; \
+ rm -f Makefile; \
+ mv Makefile.tem Makefile; \
+ else \
+ cd $${destpre}; \
+ fi; \
+ if ($(MAKE) $(FLAGS_TO_PASS) \
+ CFLAGS="$(CFLAGS)" \
+ CCASFLAGS="$(CCASFLAGS)" \
+ FCFLAGS="$(FCFLAGS)" \
+ FFLAGS="$(FFLAGS)" \
+ ADAFLAGS="$(ADAFLAGS)" \
+ prefix="$(prefix)" \
+ exec_prefix="$(exec_prefix)" \
+ GCJFLAGS="$(GCJFLAGS)" \
+ GOCFLAGS="$(GOCFLAGS)" \
+ CXXFLAGS="$(CXXFLAGS)" \
+ LIBCFLAGS="$(LIBCFLAGS)" \
+ LIBCXXFLAGS="$(LIBCXXFLAGS)" \
+ LDFLAGS="$(LDFLAGS)" \
+ MULTIFLAGS="" \
+ DESTDIR="" \
+ SOURCE="${srcdir}/" \
+ INSTALL="$(INSTALL)" \
+ INSTALL_DATA="$(INSTALL_DATA)" \
+ INSTALL_PROGRAM="$(INSTALL_PROGRAM)" \
+ INSTALL_SCRIPT="$(INSTALL_SCRIPT)" \
+ $(DO)); then \
+ cd $${rootpre}; \
+ else \
+ exit 1; \
+ fi; \
+ fi; \
+ done; \
+ fi
reply other threads:[~2017-07-05 12:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20170705124203.100517.qmail@sourceware.org \
--to=corinna@sourceware.org \
--cc=newlib-cvs@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).