This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:
- Arch/OS/platform-specific files are now included/excluded via the
preprocessor, rather than via the build system. This is more consistent
(we use the pre-processor for small arch/OS/platform-specific chunks
within files) and makes the build system much simpler, as the sources for
all programs are the same on all platforms.
- Vast amounts of cut+paste Makefile.am code has been factored out. If a
new platform is implemented, you need to add 11 extra Makefile.am lines.
Previously it was over 100 lines.
- Vex has been autotoolised. Dependency checking now works in Vex (no more
incomplete builds). Parallel builds now also work. --with-vex no longer
works; it's little use and a pain to support. VEX/Makefile is still in
the Vex repository and gets overwritten at configure-time; it should
probably be renamed Makefile-gcc to avoid possible problems, such as
accidentally committing a generated Makefile. There's a bunch of hacky
copying to deal with the fact that autotools don't handle same-named files
in different directories. Julian plans to rename the files to avoid this
problem.
- Various small Makefile.am things have been made more standard automake
style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
own.
- The existing five top-level Makefile.am include files have been
consolidated into three.
- Most Makefile.am files now are structured more clearly, with comment
headers separating sections, declarations relating to the same things next
to each other, better spacing and layout, etc.
- Removed the unused exp-ptrcheck/tests/x86 directory.
- Renamed some XML files.
- Factored out some duplicated dSYM handling code.
- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
Makefile.am files to be much more standard.
- Cleaned up m_coredump by merging a bunch of files that had been
overzealously separated.
The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed. And the build system is much simpler.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index 563bd14..b584f19 100644
--- a/configure.in
+++ b/configure.in
@@ -16,43 +16,6 @@
AM_MAINTAINER_MODE
#----------------------------------------------------------------------------
-# Where is VEX ?
-#----------------------------------------------------------------------------
-# Nb: For the 2nd arg, the help string, AS_HELP_STRING is the proper way, but
-# older autoconfs don't support it... here's what it would say:
-#
-# AS_HELP_STRING([--with-vex], [Vex directory]),
-#
-AC_ARG_WITH(vex,
- [ --with-vex=/path/to/vex/dir Vex directory],
-[
- AC_CHECK_FILE($withval/pub/libvex.h,
- [VEX_DIR=$withval],
- [AC_MSG_ERROR([Directory '$withval' does not exist, or does not contain Vex])])
-],
-[
- VEX_DIR='$(top_srcdir)/VEX'
-])
-AC_SUBST(VEX_DIR)
-
-# "make distcheck" first builds a tarball, then extracts it.
-# Then it creates a build directory different from the extracted sources
-# (called _build), and issues
-#
-# ../configure $(DISTCHECK_CONFIGURE_FLAGS)
-#
-# and then builds, runs "make check", installs using DESTDIR, runs make
-# installcheck, uninstalls, checks whether the installed base is empty
-# again, then does yet another "make dist" and compares the resulting
-# tarball with the one it started off with for identical content. Then it
-# tests "make distclean" for no leftover files.
-#
-# So this line means: when doing "make dist", use the same --with-vex value
-# that you used when running configure to configure this tree in the first
-# place.
-AC_SUBST([DISTCHECK_CONFIGURE_FLAGS], [--with-vex=$VEX_DIR])
-
-#----------------------------------------------------------------------------
# Checks for various programs.
#----------------------------------------------------------------------------
CFLAGS="-Wno-long-long"
@@ -1835,8 +1798,10 @@
# Ok. We're done checking.
#----------------------------------------------------------------------------
-AC_OUTPUT(
+# Nb: VEX/Makefile is generated from Makefile.vex.in.
+AC_CONFIG_FILES([
Makefile
+ VEX/Makefile:Makefile.vex.in
valgrind.spec
valgrind.pc
glibc-2.X.supp
@@ -1850,8 +1815,8 @@
perf/Makefile
perf/vg_perf
include/Makefile
- include/vki/Makefile
auxprogs/Makefile
+ mpi/Makefile
coregrind/Makefile
memcheck/Makefile
memcheck/tests/Makefile
@@ -1900,7 +1865,8 @@
drd/docs/Makefile
drd/scripts/download-and-build-splash2
drd/tests/Makefile
-)
+])
+AC_OUTPUT
cat<<EOF