summaryrefslogtreecommitdiffstats
path: root/libgloss
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss')
-rw-r--r--libgloss/multi-build.in61
1 files changed, 61 insertions, 0 deletions
diff --git a/libgloss/multi-build.in b/libgloss/multi-build.in
new file mode 100644
index 000000000..0bd12cfd9
--- /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