fish: Sort returned paths so the list is stable across multiple calls.
[libguestfs.git] / bootstrap
1 #!/bin/sh
2
3 usage() {
4   echo >&2 "\
5 Usage: $0 [OPTION]...
6 Bootstrap this package from the checked-out sources.
7 "
8 }
9
10 for option
11 do
12   case $option in
13   --help)
14     usage
15     exit;;
16   *)
17     echo >&2 "$0: $option: unknown option"
18     exit 1;;
19   esac
20 done
21
22 # Get gnulib files.
23
24 echo "$0: getting gnulib files..."
25 git submodule init || exit $?
26 git submodule update || exit $?
27 GNULIB_SRCDIR=.gnulib
28
29 ls po/*.po 2>/dev/null | sed 's|.*/||; s|\.po$||' > po/LINGUAS
30
31 # Run autopoint, to get po/Makevars.template:
32 # Also, released autopoint has the tendency to install macros that have
33 # been obsoleted in current gnulib, so run this before gnulib-tool.
34 autopoint --force
35
36 # Autoreconf runs aclocal before libtoolize, which causes spurious
37 # warnings if the initial aclocal is confused by the libtoolized
38 # (or worse out-of-date) macro directory.
39 libtoolize --copy --install
40
41 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
42 <$gnulib_tool || exit
43
44 (cd daemon && mkdir -p tests lib && ../$gnulib_tool --update)
45
46 modules='
47 arpa_inet
48 c-ctype
49 closeout
50 error
51 filevercmp
52 fts
53 full-read
54 full-write
55 gitlog-to-changelog
56 gnu-make
57 gnumakefile
58 hash
59 hash-pjw
60 ignore-value
61 lock
62 maintainer-makefile
63 manywarnings
64 netinet_in
65 progname
66 setenv
67 strchrnul
68 strerror
69 strndup
70 vasprintf
71 vc-list-files
72 warnings
73 xalloc
74 xalloc-die
75 xstrtol
76 xstrtoll
77 xvasprintf
78 '
79
80 $gnulib_tool                    \
81   --avoid=dummy                 \
82   --with-tests                  \
83   --m4-base=m4                  \
84   --source-base=gnulib/lib      \
85   --tests-base=gnulib/tests     \
86   --import $modules
87
88 # Disable autopoint and libtoolize, since they were already done above.
89 AUTOPOINT=true LIBTOOLIZE=true autoreconf --verbose --install