2022-02-19 12:26:51 +08:00
|
|
|
# This is like ../multilib.am and ../config-ml.in and ../config/multi.m4 mashed
|
|
|
|
# into one file. It relies on some custom hardcoded MULTI* variables in the
|
|
|
|
# respective Makefile.in instead of dynamic compiler probing that ../multilib.am
|
|
|
|
# does.
|
|
|
|
|
2017-07-05 19:54:52 +08:00
|
|
|
PWD_COMMAND=$${PWDCMD-pwd}
|
|
|
|
|
|
|
|
# FIXME: There should be an @-sign in front of the `if'.
|
|
|
|
# Leave out until this is tested a bit more.
|
2022-02-19 12:26:51 +08:00
|
|
|
libgloss-multi-do:
|
2017-07-05 19:54:52 +08:00
|
|
|
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}; \
|
|
|
|
cd $${destpre}; \
|
2017-09-26 21:47:04 +08:00
|
|
|
config_cmd=`../config.status --config | sed -re "s:--srcdir=([^/]):--srcdir=../\1:"`; \
|
|
|
|
$(SHELL) -c "$(SHELL) $${srcrootpre}/configure $${config_cmd}";\
|
2017-07-06 17:33:31 +08:00
|
|
|
sed -e "s:^MULTIDIRS[[:space:]]*+=.*$$:MULTIDIRS = :" \
|
|
|
|
-e "s:^MULTILIBNAME[[:space:]]*=.*$$:MULTILIBNAME = MULTIDIR_$${dir}_NAME:" \
|
|
|
|
-e "s:^MULTI_FLAGS_FOR_TARGET[[:space:]]*=.*$$:MULTI_FLAGS_FOR_TARGET = MULTIDIR_$${dir}_FLAGS:" \
|
|
|
|
-e "s:^objdir[[:space:]]*=.*$$:objdir = ..:" \
|
2017-07-05 19:54:52 +08:00
|
|
|
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="" \
|
2017-07-17 15:46:45 +08:00
|
|
|
DESTDIR="$(DESTDIR)" \
|
2017-07-05 19:54:52 +08:00
|
|
|
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
|