]>
Commit | Line | Data |
---|---|---|
72d25fd9 | 1 | #!/bin/sh |
47be870b LP |
2 | |
3 | # This file is part of systemd. | |
4 | # | |
47be870b | 5 | # systemd is free software; you can redistribute it and/or modify it |
5430f7f2 LP |
6 | # under the terms of the GNU Lesser General Public License as published by |
7 | # the Free Software Foundation; either version 2.1 of the License, or | |
47be870b LP |
8 | # (at your option) any later version. |
9 | # | |
10 | # systemd is distributed in the hope that it will be useful, but | |
11 | # WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
5430f7f2 | 13 | # Lesser General Public License for more details. |
47be870b | 14 | # |
5430f7f2 | 15 | # You should have received a copy of the GNU Lesser General Public License |
47be870b LP |
16 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. |
17 | ||
2fd8b540 ZJS |
18 | set -e |
19 | ||
72d25fd9 MM |
20 | if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then |
21 | # This part is allowed to fail | |
843605d3 LP |
22 | cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ |
23 | chmod +x .git/hooks/pre-commit && \ | |
72d25fd9 | 24 | echo "Activated pre-commit hook." || : |
47be870b LP |
25 | fi |
26 | ||
72d25fd9 | 27 | if which gtkdocize >/dev/null 2>/dev/null; then |
843605d3 LP |
28 | gtkdocize --docdir docs/ |
29 | gtkdocargs=--enable-gtk-doc | |
72d25fd9 MM |
30 | else |
31 | echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation." | |
32 | rm -f docs/gtk-doc.make | |
33 | echo 'EXTRA_DIST =' > docs/gtk-doc.make | |
92ec4495 JJ |
34 | fi |
35 | ||
6bd9fe5a KS |
36 | intltoolize --force --automake |
37 | autoreconf --force --install --symlink | |
38 | ||
ae446765 | 39 | libdir() { |
72d25fd9 | 40 | echo $(cd "$1/$(gcc -print-multi-os-directory)"; pwd) |
ae446765 KS |
41 | } |
42 | ||
6bd9fe5a | 43 | args="\ |
6bd9fe5a KS |
44 | --sysconfdir=/etc \ |
45 | --localstatedir=/var \ | |
46 | --libdir=$(libdir /usr/lib) \ | |
80a5cbac | 47 | $gtkdocargs" |
6bd9fe5a | 48 | |
772f4698 KS |
49 | if [ ! -L /bin ]; then |
50 | args="$args \ | |
51 | --with-rootprefix= \ | |
52 | --with-rootlibdir=$(libdir /lib) \ | |
53 | " | |
54 | fi | |
55 | ||
72d25fd9 | 56 | if [ "x$1" = "xc" ]; then |
6a179865 | 57 | ./configure CFLAGS='-g -O0' $args |
843605d3 LP |
58 | make clean |
59 | else | |
60 | echo | |
61 | echo "----------------------------------------------------------------" | |
62 | echo "Initialized build system. For a common configuration please run:" | |
63 | echo "----------------------------------------------------------------" | |
64 | echo | |
6a179865 | 65 | echo "./configure CFLAGS='-g -O0' $args" |
843605d3 | 66 | echo |
47be870b | 67 | fi |