summaryrefslogtreecommitdiff
path: root/build_posix/makemake
diff options
context:
space:
mode:
authorMichael Cahill <michael.cahill@wiredtiger.com>2011-09-27 16:26:56 +1000
committerMichael Cahill <michael.cahill@wiredtiger.com>2011-09-27 16:26:56 +1000
commit60c69d3b5abed3911d4e19d989904b68bafddf8d (patch)
treef8fd6461d914e6239b8479633b53d8083684e362 /build_posix/makemake
parent06be8f28ffbe79062b89d5a53cdadb86da42d226 (diff)
downloadmongo-60c69d3b5abed3911d4e19d989904b68bafddf8d.tar.gz
Strip C-based tests from release trees.
Add a general purpose check to build_posix/makemake that strips nonexistent subdirectories from Makefile.am, so stripping subdirs is as simple as adding them to dist/s_release.list.
Diffstat (limited to 'build_posix/makemake')
-rwxr-xr-xbuild_posix/makemake37
1 files changed, 26 insertions, 11 deletions
diff --git a/build_posix/makemake b/build_posix/makemake
index 113b3025be6..e95747f6d6f 100755
--- a/build_posix/makemake
+++ b/build_posix/makemake
@@ -4,15 +4,30 @@
# All rights reserved.
# Build Makefile.am
-filelist=../dist/filelist
-set_sources()
-{
- echo
- echo "libwiredtiger_la_LDFLAGS = -release @VERSION@"
- echo "libwiredtiger_la_SOURCES=\\"
- sed -e '/^[a-z]/! d' \
- -e 's/.*/ & \\/' \
- -e '$s/ \\$//' < $filelist
-}
-(cat Make.base; set_sources) > ../Makefile.am
+# Process Make.base, removing any subdirs that don't exist.
+# This is used in release trees, which exclude some parts of
+# the development tree.
+(sed -n '1,/^SUBDIRS/p' Make.base
+
+sed '1,/^SUBDIRS/d' Make.base | sed -e '/^$/,$d' -e 's/ \\$//' | \
+ while read d ; do
+ case "$d" in
+ [a-z]*) [ -d ../$d ] || continue ;;
+ esac
+ echo " $d \\"
+ done | sed '$s/ \\$//'
+
+# Terminate the list with a blank line
+echo
+
+# Write the rest of Make.base
+sed '1,/^SUBDIRS/d' Make.base | sed '1,/^$/d'
+
+echo
+echo "libwiredtiger_la_LDFLAGS = -release @VERSION@"
+echo "libwiredtiger_la_SOURCES=\\"
+sed -e '/^[a-z]/! d' \
+ -e 's/.*/ & \\/' \
+ -e '$s/ \\$//' < ../dist/filelist
+) > ../Makefile.am