* WT-2658 Only include PPC-specific files in PPC builds * Add support for conditional file inclusion by adding a second argument on lines in dist/filelist. Add a new automake conditional, POWERPC_HOST, set for the various PPC host CPUs. Change dist/filelist to only compile the checksum/power8 files if POWERPC_HOST is set. * Merge the Windows and POSIX file lists, use POSIX_HOST and WINDOWS_HOST to mark source files needed for builds on those systems.
46 lines
1.1 KiB
Bash
Executable File
46 lines
1.1 KiB
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# Build Makefile.am
|
|
|
|
# Process Make.base, insert subdirs that exist from Make.subdirs
|
|
# (in release trees, some of the subdirs might be excluded).
|
|
(sed -n '1,/BEGIN SUBDIRS/p' Make.base
|
|
|
|
echo "SUBDIRS ="
|
|
sed -e 's/#.*$//' -e '/^$/d' Make.subdirs | while read dir cond ; do
|
|
test -d ../$dir || continue
|
|
if test -n "$cond" ; then
|
|
cat <<END_CONDITIONAL
|
|
if ${cond}
|
|
SUBDIRS += $dir
|
|
endif
|
|
END_CONDITIONAL
|
|
else
|
|
echo "SUBDIRS += $dir"
|
|
fi
|
|
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' < ../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
|
|
) > ../Makefile.am
|