summaryrefslogtreecommitdiff
path: root/build_posix/makemake
blob: 44d5571e27952a801e388fee37ee8c67b8f0bcd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#! /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
sed -n '/END SUBDIRS/,$p' Make.base

echo
echo "libwiredtiger_la_LDFLAGS = -release @VERSION@"
echo "libwiredtiger_la_SOURCES=\\"
sed -e '/^[a-z]/! d' \
    -e 's/.*/	& \\/' \
    -e '$s/ \\$//' < ../dist/filelist
) > ../Makefile.am