Introduced build variables VG_ARCH_ALL, VG_OS_ALL, and VG_PLATFORM_ALL,
which list all the arches/OSes/platforms supported.  These are used by
several newly added DIST_SUBDIRS automake commands, which specify that
although when you are building you only want to build for the current
arch/OS/platform, when you do 'make dist' you want every
arch/OS/platform to get included.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3127 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/cachegrind/Makefile.am b/cachegrind/Makefile.am
index 4064dee..9c607e6 100644
--- a/cachegrind/Makefile.am
+++ b/cachegrind/Makefile.am
@@ -3,7 +3,8 @@
 include $(top_srcdir)/Makefile.tool-flags.am
 include $(top_srcdir)/Makefile.tool-inplace.am
 
-SUBDIRS = $(VG_ARCH) . tests docs
+SUBDIRS      = $(VG_ARCH)     . tests docs
+DIST_SUBDIRS = $(VG_ARCH_ALL) . tests docs
 
 AM_CPPFLAGS += -I$(top_srcdir)/cachegrind/$(VG_ARCH)
 
diff --git a/cachegrind/tests/Makefile.am b/cachegrind/tests/Makefile.am
index aef5ec7..f35080f 100644
--- a/cachegrind/tests/Makefile.am
+++ b/cachegrind/tests/Makefile.am
@@ -1,4 +1,5 @@
-SUBDIRS =  ${VG_ARCH} .
+SUBDIRS      = ${VG_ARCH}     .
+DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = filter_stderr filter_cachesim_discards
 
diff --git a/configure.in b/configure.in
index 882fdf1..237304a 100644
--- a/configure.in
+++ b/configure.in
@@ -84,6 +84,8 @@
 
 AC_MSG_CHECKING([for a supported CPU])
 AC_SUBST(VG_ARCH)
+AC_SUBST(VG_ARCH_ALL)
+VG_ARCH_ALL="arm x86"
 AC_SUBST(KICKSTART_BASE)
 AC_SUBST(ARCH_CORE_AM_CFLAGS)
 AC_SUBST(ARCH_TOOL_AM_CFLAGS)
@@ -138,6 +140,8 @@
 
 AC_MSG_CHECKING([for a supported OS])
 AC_SUBST(VG_OS)
+AC_SUBST(VG_OS_ALL)
+VG_OS_ALL="linux"
 
 case "${host_os}" in
      *linux*)
@@ -181,6 +185,8 @@
 
 AC_MSG_CHECKING([for a supported CPU/OS combination])
 AC_SUBST(VG_PLATFORM)
+AC_SUBST(VG_PLATFORM_ALL)
+VG_PLATFORM_ALL="arm-linux x86-linux"
 
 VG_PLATFORM="$VG_ARCH-$VG_OS"
 
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index fe518b4..4874b57 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -1,7 +1,11 @@
 include $(top_srcdir)/Makefile.all.am
 include $(top_srcdir)/Makefile.core-AM_CPPFLAGS.am
 
-SUBDIRS = $(VG_ARCH) $(VG_OS) $(VG_PLATFORM) demangle . docs
+## When building, we are only interested in the current arch/OS/platform.
+## But when doing 'make dist', we are interested in every arch/OS/platform.
+## That's what DIST_SUBDIRS specifies.
+SUBDIRS      = $(VG_ARCH)     $(VG_OS)     $(VG_PLATFORM)     demangle . docs
+DIST_SUBDIRS = $(VG_ARCH_ALL) $(VG_OS_ALL) $(VG_PLATFORM_ALL) demangle . docs
 
 AM_CPPFLAGS += -DVG_LIBDIR="\"$(valdir)"\" -I$(srcdir)/demangle \
 		-DKICKSTART_BASE=@KICKSTART_BASE@ \
diff --git a/include/Makefile.am b/include/Makefile.am
index 26e06ed..e9bafff 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -1,5 +1,6 @@
 
-SUBDIRS = $(VG_ARCH) $(VG_OS) $(VG_PLATFORM) .
+SUBDIRS      = $(VG_ARCH)     $(VG_OS)     $(VG_PLATFORM)     .
+DIST_SUBDIRS = $(VG_ARCH_ALL) $(VG_OS_ALL) $(VG_PLATFORM_ALL) .
 
 EXTRA_DIST = \
 	tool.h.base \
diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am
index f904786..671d770 100644
--- a/memcheck/tests/Makefile.am
+++ b/memcheck/tests/Makefile.am
@@ -1,4 +1,5 @@
-SUBDIRS =  ${VG_ARCH} .
+SUBDIRS      = ${VG_ARCH}     .
+DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = filter_allocs filter_leak_check_size \
 		 filter_stderr filter_stderr_backtrace
diff --git a/none/tests/Makefile.am b/none/tests/Makefile.am
index 525c105..7f62831 100644
--- a/none/tests/Makefile.am
+++ b/none/tests/Makefile.am
@@ -1,4 +1,5 @@
-SUBDIRS =  ${VG_ARCH} .
+SUBDIRS      = ${VG_ARCH}     .
+DIST_SUBDIRS = ${VG_ARCH_ALL} .
 
 noinst_SCRIPTS = filter_none_discards filter_stderr