summaryrefslogtreecommitdiff
path: root/build_posix/makemake
diff options
context:
space:
mode:
Diffstat (limited to 'build_posix/makemake')
-rwxr-xr-xbuild_posix/makemake22
1 files changed, 16 insertions, 6 deletions
diff --git a/build_posix/makemake b/build_posix/makemake
index 9ed9d252911..506420b4aaf 100755
--- a/build_posix/makemake
+++ b/build_posix/makemake
@@ -7,7 +7,7 @@
(sed -n '1,/BEGIN SUBDIRS/p' Make.base
echo "SUBDIRS ="
-sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | (while read dir cond ; do
+sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | while read dir cond ; do
test -d ../$dir || continue
if test -n "$cond" ; then
cat <<END_CONDITIONAL
@@ -18,17 +18,27 @@ END_CONDITIONAL
else
echo "SUBDIRS += $dir"
fi
-done)
+done
# Write the rest of Make.base, up to SOURCES
sed -n '/END SUBDIRS/,/BEGIN SOURCES/p' Make.base
+# Write the list of sources.
echo
echo "libwiredtiger_la_LDFLAGS = -release @VERSION@"
-echo "libwiredtiger_la_SOURCES=\\"
-sed -e '/^[a-z]/!d' \
- -e 's/.*/ & \\/' \
- -e '$s/ \\$//' < ../dist/filelist
+echo "libwiredtiger_la_SOURCES ="
+sed -e '/^[a-z]/!d' < ../dist/filelist | while read file cond; do
+ if test -n "$cond"; then
+ cat <<END_CONDITIONAL
+# DO NOT indent the "libwiredtiger_la_SOURCES" lines, it breaks the build.
+if ${cond}
+libwiredtiger_la_SOURCES += $file
+endif
+END_CONDITIONAL
+ else
+ echo "libwiredtiger_la_SOURCES += $file"
+ fi
+done
# Write the rest of Make.base
sed -n '/END SOURCES/,$p' Make.base