-AUTOMAKE_OPTIONS = 1.3 cygnus
-MAINT_CHARSET = latin1
-
-# This helps subvert libstdcxx_interface, as calculated by devo/config.if
-# Needed so that g++ can find the correct include subdir automatically.
-INTERFACE = v3
-gxx_include_dir=$(includedir)/g++
-
-SUBDIRS = math libio src
-
-check: $(top_builddir)/mkcheck
- $(top_builddir)/mkcheck 0 $(top_builddir) $(top_srcdir)
-
-check-install: $(top_builddir)/mkcheck
- $(top_builddir)/mkcheck 1 $(top_builddir) $(top_srcdir) $(prefix)
-
-#all-local: stamp-rebuild
-
-# This has already been sanity-checked by configure to a certain extent
-#stamp-rebuild: $(top_builddir)/config.status
-# if test "$(GCC_OBJDIR)" != "no"; then \
-# (cd "$(GCC_OBJDIR)/gcc" && \
-# if test -f libgcc2.ready ; then \
-# rm -f libgcc2.ready libgcc.a libgcc2.a ; \
-# $(MAKE) libgcc2.a TARGET_LIBGCC2_CFLAGS='@NAMESPACES@' ; \
-# $(MAKE) libgcc.a ; \
-# else \
-# echo '** There does not appear to be a previously-built' ; \
-# echo '** library here. Please see' ; \
-# echo '** <http://sourceware.cygnus.com/libstdc++/install.html>' ; \
-# echo '** In particular, the "Building and Installing' ; \
-# echo '** the library (without GCC sources)" section.' ; \
-# exit 1 ; \
-# fi \
-# ) \
-# fi
-# touch stamp-rebuild
+include $(top_srcdir)/fragment.am
+
+if GLIBCXX_HOSTED
+ hosted_source = libmath src po testsuite
+endif
+## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE.
+SUBDIRS = include libsupc++ $(hosted_source)
+
+ACLOCAL_AMFLAGS = -I . -I .. -I ../config
+
+# These rules are messy, but are hella worth it.
+doxygen:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`${PWD_COMMAND}`; \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
+ --host_alias=${host_alias} \
+ --mode=user $${srcdir} $${builddir})
+
+doxygen-maint:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`${PWD_COMMAND}`; \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
+ --host_alias=${host_alias} \
+ --mode=maint $${srcdir} $${builddir})
+
+doxygen-man:
+ -(srcdir=`cd ${top_srcdir}; ${PWD_COMMAND}`; \
+ builddir=`${PWD_COMMAND}`; \
+ ${SHELL} ${srcdir}/docs/doxygen/run_doxygen \
+ --host_alias=${host_alias} \
+ --mode=man $${srcdir} $${builddir})
+
+.PHONY: doxygen doxygen-maint doxygen-man
+
+# Handy forwarding targets.
+check-%:
+ cd testsuite && $(MAKE) $@