aboutsummaryrefslogtreecommitdiff
blob: ea564e068be9a3f07c6c02990288feb39bd6b9f1 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash -e

v() { echo "$@"; "$@"; }

m4dir="autotools/m4"

# check for dependencies
if ! qlist -qI dev-libs/gnulib > /dev/null ; then
	echo "please install dev-libs/gnulib"
	exit 1
fi
if ! qlist -qI sys-devel/autoconf-archive > /dev/null ; then
	echo "please install sys-devel/autoconf-archive"
	exit 1
fi

# keep this list updated with non-generated M4 files
keepm4=( ac_check_sendfile.m4 )
for keepf in "${keepm4[@]}" ; do
	v mv "${m4dir}/${keepf}" "autotools/"
done
v rm -rf autotools/{gnulib,m4}
v mkdir "${m4dir}"
for keepf in "${keepm4[@]}" ; do
	v mv "autotools/${keepf}" "${m4dir}/"
done

# reload the gnulib code
PATH=/usr/local/src/gnu/gnulib:${PATH}
mods="
	dirent
	faccessat
	fdopendir
	fstatat
	futimens
	getline
	getopt-posix
	inttypes
	mkdirat
	openat
	readlinkat
	renameat
	stat-time
	strcasestr-simple
	strncat
	symlinkat
	sys_stat
	unlinkat
	utimensat
	vasprintf-posix
	xalloc
"
v gnulib-tool \
	--source-base=autotools/gnulib --m4-base=autotools/m4 \
	--import \
	--no-vc-files \
	${mods}

export AUTOMAKE="automake --foreign"
v autoreconf -i -f