]>
Commit | Line | Data |
---|---|---|
47be870b LP |
1 | #!/bin/bash |
2 | ||
3 | # This file is part of systemd. | |
4 | # | |
47be870b LP |
5 | # systemd is free software; you can redistribute it and/or modify it |
6 | # under the terms of the GNU General Public License as published by | |
7 | # the Free Software Foundation; either version 2 of the License, or | |
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 | |
13 | # General Public License for more details. | |
14 | # | |
15 | # You should have received a copy of the GNU General Public License | |
16 | # along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
17 | ||
47be870b LP |
18 | if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then |
19 | cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ | |
20 | chmod +x .git/hooks/pre-commit && \ | |
21 | echo "Activated pre-commit hook." | |
22 | fi | |
23 | ||
6bd9fe5a KS |
24 | intltoolize --force --automake |
25 | autoreconf --force --install --symlink | |
26 | ||
ae446765 KS |
27 | libdir() { |
28 | echo $(cd $1/$(gcc -print-multi-os-directory); pwd) | |
29 | } | |
30 | ||
6bd9fe5a | 31 | args="\ |
6bd9fe5a KS |
32 | --sysconfdir=/etc \ |
33 | --localstatedir=/var \ | |
34 | --libdir=$(libdir /usr/lib) \ | |
6bd9fe5a KS |
35 | --libexecdir=/usr/lib" |
36 | ||
772f4698 KS |
37 | if [ ! -L /bin ]; then |
38 | args="$args \ | |
39 | --with-rootprefix= \ | |
40 | --with-rootlibdir=$(libdir /lib) \ | |
41 | " | |
42 | fi | |
43 | ||
6bd9fe5a KS |
44 | if [ "x$1" != "xc" ]; then |
45 | echo | |
46 | echo "----------------------------------------------------------------" | |
47 | echo "Initialized build system. For a common configuration please run:" | |
48 | echo "----------------------------------------------------------------" | |
49 | echo | |
50 | echo "./configure CFLAGS='-g -O0' $args" | |
51 | echo | |
47be870b | 52 | else |
6bd9fe5a KS |
53 | echo ./configure CFLAGS='-g -O0' $args |
54 | ./configure CFLAGS='-g -O0' $args | |
55 | make clean | |
47be870b | 56 | fi |