File: makemake

package info (click to toggle)
wiredtiger 3.2.1-1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 25,456 kB
  • sloc: ansic: 102,922; python: 52,573; sh: 6,915; java: 6,130; cpp: 2,311; makefile: 1,018; xml: 176
file content (55 lines) | stat: -rwxr-xr-x 1,294 bytes parent folder | download | duplicates (2)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#! /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 conds ; do
	test -d ../$dir || continue
	if test -n "$conds" ; then
		# Multiple conditions are allowed, they will appear
		# as nested 'if' statements.
		for cond in $conds; do
			cat <<END_CONDITIONAL
if ${cond}
END_CONDITIONAL
		done
			cat <<END_CONDITIONAL
    SUBDIRS += $dir
END_CONDITIONAL
		for cond in $conds; do
			cat <<END_CONDITIONAL
endif
END_CONDITIONAL
		done
	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 ="
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