+# The use of $$(x_FOR_TARGET) reduces the command line length by not
+# duplicating the lengthy definition.
+TARGET_FLAGS_TO_PASS = \
+ "prefix=$(prefix)" \
+ "exec_prefix=$(exec_prefix)" \
+ "against=$(against)" \
+ 'CC=$$(CC_FOR_TARGET)' \
+ "CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+ "CFLAGS=$(CFLAGS)" \
+ "CHILLFLAGS=$(CHILLFLAGS)" \
+ 'CHILL=$$(CHILL_FOR_TARGET)' \
+ "CHILL_FOR_TARGET=$(CHILL_FOR_TARGET)" \
+ "CHILL_LIB=$(CHILL_LIB)" \
+ 'CXX=$$(CXX_FOR_TARGET)' \
+ "CXX_FOR_TARGET=$(CXX_FOR_TARGET)" \
+ "CXXFLAGS=$(CXXFLAGS)" \
+ "INSTALL=$(INSTALL)" \
+ "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+ "INSTALL_DATA=$(INSTALL_DATA)" \
+ "MAKEINFO=$(MAKEINFO)" \
+ "RUNTESTFLAGS=$(RUNTESTFLAGS)"
+
+
+all:
+ @rootme=`pwd` ; export rootme ; \
+ for dir in . `echo ${SUBDIRS} | sed 's/testsuite//'` ; do \
+ if [ "$$dir" = "." ]; then \
+ true; \
+ elif [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS)) || exit 1; \
+ else true; fi; \
+ done
+
+clean mostlyclean:
+ @rootme=`pwd` ; export rootme ; \
+ for dir in . ${SUBDIRS}; do \
+ if [ "$$dir" = "." ]; then \
+ true; \
+ elif [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
+ else true; fi; \
+ done
+
+distclean maintainer-clean realclean:
+ @rootme=`pwd` ; export rootme ; \
+ for dir in . ${SUBDIRS}; do \
+ if [ "$$dir" = "." ]; then \
+ true; \
+ elif [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) $@) || exit 1; \
+ else true; fi; \
+ done
+ rm -f Makefile config.cache config.log config.status
+
+install:
+ @rootme=`pwd` ; export rootme ; \
+ for dir in . ${SUBDIRS}; do \
+ if [ "$$dir" = "." ]; then \
+ true; \
+ elif [ -d $$dir ]; then \
+ (cd $$dir; $(MAKE) $(FLAGS_TO_PASS) install) || exit 1; \
+ else true; fi; \
+ done
+
+installcheck:
+ @echo No installcheck target is available yet for the GNU simulators.
+
+installcheck:
+
+# The check target can not use subdir_do, because subdir_do does not
+# use TARGET_FLAGS_TO_PASS.
+check: force
+ @if [ -f testsuite/Makefile ]; then \
+ rootme=`pwd`; export rootme; \
+ rootsrc=`cd $(srcdir); pwd`; export rootsrc; \
+ cd testsuite; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check; \
+ else true; fi