Mercurial > hg > octave-nkf
annotate bootstrap @ 17296:3a9efb68272d ss-3-7-6
snapshot 3.7.6
* configure.ac (OCTAVE_VERSION): Bump to 3.7.6.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 20 Aug 2013 15:17:54 -0400 |
parents | b91fc9348e2e |
children | a801d0ab5830 |
rev | line source |
---|---|
3298 | 1 #! /bin/sh |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
2 # Print a version string. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
3 scriptversion=2012-07-19.14; # UTC |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
4 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
5 # Bootstrap this package from checked-out sources. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
6 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
7 # Copyright (C) 2003-2012 Free Software Foundation, Inc. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
8 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
9 # This program is free software: you can redistribute it and/or modify |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
10 # it under the terms of the GNU General Public License as published by |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
11 # the Free Software Foundation, either version 3 of the License, or |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
12 # (at your option) any later version. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
13 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
14 # This program is distributed in the hope that it will be useful, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
17 # GNU General Public License for more details. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
18 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
19 # You should have received a copy of the GNU General Public License |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
20 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
21 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
22 # Originally written by Paul Eggert. The canonical version of this |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
23 # script is maintained as build-aux/bootstrap in gnulib, however, to |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
24 # be useful to your project, you should place a copy of it under |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
25 # version control in the top-level directory of your project. The |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
26 # intent is that all customization can be done with a bootstrap.conf |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
27 # file also maintained in your version control; gnulib comes with a |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
28 # template build-aux/bootstrap.conf to get you started. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
29 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
30 # Please report bugs or propose patches to bug-gnulib@gnu.org. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
31 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
32 nl=' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
33 ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
34 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
35 # Ensure file names are sorted consistently across platforms. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
36 LC_ALL=C |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
37 export LC_ALL |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
38 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
39 # Ensure that CDPATH is not set. Otherwise, the output from cd |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
40 # would cause trouble in at least one use below. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
41 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
42 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
43 local_gl_dir=gl |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
44 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
45 me=$0 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
46 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
47 usage() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
48 cat <<EOF |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
49 Usage: $me [OPTION]... |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
50 Bootstrap this package from the checked-out sources. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
51 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
52 Options: |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
53 --gnulib-srcdir=DIRNAME specify the local directory where gnulib |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
54 sources reside. Use this if you already |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
55 have gnulib sources on your machine, and |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
56 do not want to waste your bandwidth downloading |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
57 them again. Defaults to \$GNULIB_SRCDIR |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
58 --bootstrap-sync if this bootstrap script is not identical to |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
59 the version in the local gnulib sources, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
60 update this script, and then restart it with |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
61 /bin/sh or the shell \$CONFIG_SHELL |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
62 --no-bootstrap-sync do not check whether bootstrap is out of sync |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
63 --copy copy files instead of creating symbolic links |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
64 --force attempt to bootstrap even if the sources seem |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
65 not to have been checked out |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
66 --no-git do not use git to update gnulib. Requires that |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
67 --gnulib-srcdir point to a correct gnulib snapshot |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
68 --skip-po do not download po files |
3298 | 69 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
70 If the file $me.conf exists in the same directory as this script, its |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
71 contents are read as shell variables to configure the bootstrap. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
72 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
73 For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
74 are honored. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
75 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
76 Running without arguments will suffice in most cases. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
77 EOF |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
78 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
79 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
80 # warnf_ FORMAT-STRING ARG1... |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
81 warnf_ () |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
82 { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
83 warnf_format_=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
84 shift |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
85 nl=' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
86 ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
87 case $* in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
88 *$nl*) me_=$(printf "$me"|tr "$nl|" '??') |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
89 printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
90 *) printf "$me: $warnf_format_" "$@" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
91 esac >&2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
92 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
93 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
94 # warn_ WORD1... |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
95 warn_ () |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
96 { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
97 # If IFS does not start with ' ', set it and emit the warning in a subshell. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
98 case $IFS in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
99 ' '*) warnf_ '%s\n' "$*";; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
100 *) (IFS=' '; warn_ "$@");; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
101 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
102 } |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
103 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
104 # die WORD1... |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
105 die() { warn_ "$@"; exit 1; } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
106 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
107 # Configuration. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
108 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
109 # Name of the Makefile.am |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
110 gnulib_mk=gnulib.mk |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
111 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
112 # List of gnulib modules needed. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
113 gnulib_modules= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
114 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
115 # Any gnulib files needed that are not in modules. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
116 gnulib_files= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
117 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
118 : ${AUTOPOINT=autopoint} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
119 : ${AUTORECONF=autoreconf} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
120 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
121 # A function to be called right after gnulib-tool is run. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
122 # Override it via your own definition in bootstrap.conf. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
123 bootstrap_post_import_hook() { :; } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
124 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
125 # A function to be called after everything else in this script. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
126 # Override it via your own definition in bootstrap.conf. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
127 bootstrap_epilogue() { :; } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
128 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
129 # The command to download all .po files for a specified domain into |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
130 # a specified directory. Fill in the first %s is the domain name, and |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
131 # the second with the destination directory. Use rsync's -L and -r |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
132 # options because the latest/%s directory and the .po files within are |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
133 # all symlinks. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
134 po_download_command_format=\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
135 "rsync --delete --exclude '*.s1' -Lrtvz \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
136 'translationproject.org::tp/latest/%s/' '%s'" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
137 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
138 # Fallback for downloading .po files (if rsync fails). |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
139 po_download_command_format2=\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
140 "wget --mirror -nd -q -np -A.po -P '%s' \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
141 http://translationproject.org/latest/%s/" |
12158
a73df5341f3c
autogen.sh: check for required files instead of having automake do it
John W. Eaton <jwe@octave.org>
parents:
9946
diff
changeset
|
142 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
143 extract_package_name=' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
144 /^AC_INIT(/{ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
145 /.*,.*,.*, */{ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
146 s/// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
147 s/[][]//g |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
148 s/)$// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
149 p |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
150 q |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
151 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
152 s/AC_INIT(\[*// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
153 s/]*,.*// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
154 s/^GNU // |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
155 y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
156 s/[^A-Za-z0-9_]/-/g |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
157 p |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
158 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
159 ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
160 package=$(sed -n "$extract_package_name" configure.ac) \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
161 || die 'cannot find package name in configure.ac' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
162 gnulib_name=lib$package |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
163 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
164 build_aux=build-aux |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
165 source_base=lib |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
166 m4_base=m4 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
167 doc_base=doc |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
168 tests_base=tests |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
169 gnulib_extra_files='' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
170 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
171 # Additional gnulib-tool options to use. Use "\newline" to break lines. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
172 gnulib_tool_option_extras= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
173 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
174 # Other locale categories that need message catalogs. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
175 EXTRA_LOCALE_CATEGORIES= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
176 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
177 # Additional xgettext options to use. Use "\\\newline" to break lines. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
178 XGETTEXT_OPTIONS='\\\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
179 --flag=_:1:pass-c-format\\\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
180 --flag=N_:1:pass-c-format\\\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
181 --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
182 ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
183 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
184 # Package bug report address and copyright holder for gettext files |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
185 COPYRIGHT_HOLDER='Free Software Foundation, Inc.' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
186 MSGID_BUGS_ADDRESS=bug-$package@gnu.org |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
187 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
188 # Files we don't want to import. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
189 excluded_files= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
190 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
191 # File that should exist in the top directory of a checked out hierarchy, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
192 # but not in a distribution tarball. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
193 checkout_only_file=README-hacking |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
194 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
195 # Whether to use copies instead of symlinks. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
196 copy=false |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
197 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
198 # Set this to '.cvsignore .gitignore' in bootstrap.conf if you want |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
199 # those files to be generated in directories like lib/, m4/, and po/. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
200 # Or set it to 'auto' to make this script select which to use based |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
201 # on which version control system (if any) is used in the source directory. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
202 vc_ignore=auto |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
203 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
204 # Set this to true in bootstrap.conf to enable --bootstrap-sync by |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
205 # default. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
206 bootstrap_sync=false |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
207 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
208 # Don't use git to update gnulib sources. We keep gnulib under a |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
209 # Mercurial subrepository instead |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
210 use_git=false |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
211 GNULIB_SRCDIR=gnulib-hg |
12158
a73df5341f3c
autogen.sh: check for required files instead of having automake do it
John W. Eaton <jwe@octave.org>
parents:
9946
diff
changeset
|
212 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
213 # find_tool ENVVAR NAMES... |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
214 # ------------------------- |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
215 # Search for a required program. Use the value of ENVVAR, if set, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
216 # otherwise find the first of the NAMES that can be run (i.e., |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
217 # supports --version). If found, set ENVVAR to the program name, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
218 # die otherwise. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
219 # |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
220 # FIXME: code duplication, see also gnu-web-doc-update. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
221 find_tool () |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
222 { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
223 find_tool_envvar=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
224 shift |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
225 find_tool_names=$@ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
226 eval "find_tool_res=\$$find_tool_envvar" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
227 if test x"$find_tool_res" = x; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
228 for i |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
229 do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
230 if ($i --version </dev/null) >/dev/null 2>&1; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
231 find_tool_res=$i |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
232 break |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
233 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
234 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
235 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
236 find_tool_error_prefix="\$$find_tool_envvar: " |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
237 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
238 test x"$find_tool_res" != x \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
239 || die "one of these is required: $find_tool_names" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
240 ($find_tool_res --version </dev/null) >/dev/null 2>&1 \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
241 || die "${find_tool_error_prefix}cannot run $find_tool_res --version" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
242 eval "$find_tool_envvar=\$find_tool_res" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
243 eval "export $find_tool_envvar" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
244 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
245 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
246 # Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
247 find_tool SHA1SUM sha1sum gsha1sum shasum |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
248 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
249 # Override the default configuration, if necessary. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
250 # Make sure that bootstrap.conf is sourced from the current directory |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
251 # if we were invoked as "sh bootstrap". |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
252 case "$0" in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
253 */*) test -r "$0.conf" && . "$0.conf" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
254 *) test -r "$0.conf" && . ./"$0.conf" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
255 esac |
12158
a73df5341f3c
autogen.sh: check for required files instead of having automake do it
John W. Eaton <jwe@octave.org>
parents:
9946
diff
changeset
|
256 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
257 # Extra files from gnulib, which override files from other sources. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
258 test -z "${gnulib_extra_files}" && \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
259 gnulib_extra_files=" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
260 $build_aux/install-sh |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
261 $build_aux/mdate-sh |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
262 $build_aux/texinfo.tex |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
263 $build_aux/depcomp |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
264 $build_aux/config.guess |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
265 $build_aux/config.sub |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
266 doc/INSTALL |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
267 " |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
268 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
269 if test "$vc_ignore" = auto; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
270 vc_ignore= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
271 test -d .git && vc_ignore=.gitignore |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
272 test -d CVS && vc_ignore="$vc_ignore .cvsignore" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
273 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
274 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
275 # Translate configuration into internal form. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
276 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
277 # Parse options. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
278 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
279 for option |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
280 do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
281 case $option in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
282 --help) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
283 usage |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
284 exit;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
285 --gnulib-srcdir=*) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
286 GNULIB_SRCDIR=${option#--gnulib-srcdir=};; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
287 --skip-po) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
288 SKIP_PO=t;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
289 --force) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
290 checkout_only_file=;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
291 --copy) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
292 copy=true;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
293 --bootstrap-sync) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
294 bootstrap_sync=true;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
295 --no-bootstrap-sync) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
296 bootstrap_sync=false;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
297 --no-git) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
298 use_git=false;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
299 *) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
300 die "$option: unknown option";; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
301 esac |
12158
a73df5341f3c
autogen.sh: check for required files instead of having automake do it
John W. Eaton <jwe@octave.org>
parents:
9946
diff
changeset
|
302 done |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
303 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
304 $use_git || test -d "$GNULIB_SRCDIR" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
305 || die "Error: --no-git requires --gnulib-srcdir" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
306 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
307 if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
308 die "Bootstrapping from a non-checked-out distribution is risky." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
309 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
310 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
311 # Ensure that lines starting with ! sort last, per gitignore conventions |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
312 # for whitelisting exceptions after a more generic blacklist pattern. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
313 sort_patterns() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
314 sort -u "$@" | sed '/^!/ { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
315 H |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
316 d |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
317 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
318 $ { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
319 P |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
320 x |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
321 s/^\n// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
322 }' | sed '/^$/d' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
323 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
324 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
325 # If $STR is not already on a line by itself in $FILE, insert it, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
326 # sorting the new contents of the file and replacing $FILE with the result. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
327 insert_sorted_if_absent() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
328 file=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
329 str=$2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
330 test -f $file || touch $file |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
331 echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
332 || { echo "$str" | sort_patterns - $file > $file.bak \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
333 && mv $file.bak $file; } \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
334 || die "insert_sorted_if_absent $file $str: failed" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
335 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
336 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
337 # Adjust $PATTERN for $VC_IGNORE_FILE and insert it with |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
338 # insert_sorted_if_absent. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
339 insert_vc_ignore() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
340 vc_ignore_file="$1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
341 pattern="$2" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
342 case $vc_ignore_file in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
343 *.gitignore) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
344 # A .gitignore entry that does not start with '/' applies |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
345 # recursively to subdirectories, so prepend '/' to every |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
346 # .gitignore entry. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
347 pattern=$(echo "$pattern" | sed s,^,/,);; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
348 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
349 insert_sorted_if_absent "$vc_ignore_file" "$pattern" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
350 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
351 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
352 # Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
353 found_aux_dir=no |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
354 grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
355 >/dev/null && found_aux_dir=yes |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
356 grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
357 >/dev/null && found_aux_dir=yes |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
358 test $found_aux_dir = yes \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
359 || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
360 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
361 # If $build_aux doesn't exist, create it now, otherwise some bits |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
362 # below will malfunction. If creating it, also mark it as ignored. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
363 if test ! -d $build_aux; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
364 mkdir $build_aux |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
365 for dot_ig in x $vc_ignore; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
366 test $dot_ig = x && continue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
367 insert_vc_ignore $dot_ig $build_aux |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
368 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
369 fi |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
370 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
371 # Note this deviates from the version comparison in automake |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
372 # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
373 # but this should suffice as we won't be specifying old |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
374 # version formats or redundant trailing .0 in bootstrap.conf. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
375 # If we did want full compatibility then we should probably |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
376 # use m4_version_compare from autoconf. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
377 sort_ver() { # sort -V is not generally available |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
378 ver1="$1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
379 ver2="$2" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
380 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
381 # split on '.' and compare each component |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
382 i=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
383 while : ; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
384 p1=$(echo "$ver1" | cut -d. -f$i) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
385 p2=$(echo "$ver2" | cut -d. -f$i) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
386 if [ ! "$p1" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
387 echo "$1 $2" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
388 break |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
389 elif [ ! "$p2" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
390 echo "$2 $1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
391 break |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
392 elif [ ! "$p1" = "$p2" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
393 if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
394 echo "$2 $1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
395 elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
396 echo "$1 $2" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
397 else # numeric, then lexicographic comparison |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
398 lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
399 if [ "$lp" = "$p2" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
400 echo "$1 $2" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
401 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
402 echo "$2 $1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
403 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
404 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
405 break |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
406 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
407 i=$(($i+1)) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
408 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
409 } |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
410 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
411 get_version() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
412 app=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
413 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
414 $app --version >/dev/null 2>&1 || return 1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
415 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
416 $app --version 2>&1 | |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
417 sed -n '# Move version to start of line. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
418 s/.*[v ]\([0-9]\)/\1/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
419 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
420 # Skip lines that do not start with version. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
421 /^[0-9]/!d |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
422 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
423 # Remove characters after the version. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
424 s/[^.a-z0-9-].*// |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
425 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
426 # The first component must be digits only. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
427 s/^\([0-9]*\)[a-z-].*/\1/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
428 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
429 #the following essentially does s/5.005/5.5/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
430 s/\.0*\([1-9]\)/.\1/g |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
431 p |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
432 q' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
433 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
434 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
435 check_versions() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
436 ret=0 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
437 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
438 while read app req_ver; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
439 # We only need libtoolize from the libtool package. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
440 if test "$app" = libtool; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
441 app=libtoolize |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
442 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
443 # Exempt git if --no-git is in effect. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
444 if test "$app" = git; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
445 $use_git || continue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
446 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
447 # Honor $APP variables ($TAR, $AUTOCONF, etc.) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
448 appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
449 test "$appvar" = TAR && appvar=AMTAR |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
450 case $appvar in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
451 GZIP) ;; # Do not use $GZIP: it contains gzip options. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
452 *) eval "app=\${$appvar-$app}" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
453 esac |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
454 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
455 # Handle the still-experimental Automake-NG programs specially. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
456 # They remain named as the mainstream Automake programs ("automake", |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
457 # and "aclocal") to avoid gratuitous incompatibilities with |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
458 # pre-existing usages (by, say, autoreconf, or custom autogen.sh |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
459 # scripts), but correctly identify themselves (as being part of |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
460 # "GNU automake-ng") when asked their version. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
461 case $app in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
462 automake-ng|aclocal-ng) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
463 app=${app%-ng} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
464 ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
465 warn_ "Error: '$app' not found or not from Automake-NG" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
466 ret=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
467 continue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
468 } ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
469 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
470 if [ "$req_ver" = "-" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
471 # Merely require app to exist; not all prereq apps are well-behaved |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
472 # so we have to rely on $? rather than get_version. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
473 $app --version >/dev/null 2>&1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
474 if [ 126 -le $? ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
475 warn_ "Error: '$app' not found" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
476 ret=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
477 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
478 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
479 # Require app to produce a new enough version string. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
480 inst_ver=$(get_version $app) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
481 if [ ! "$inst_ver" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
482 warn_ "Error: '$app' not found" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
483 ret=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
484 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
485 latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
486 if [ ! "$latest_ver" = "$inst_ver" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
487 warnf_ '%s\n' \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
488 "Error: '$app' version == $inst_ver is too old" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
489 " '$app' version >= $req_ver is required" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
490 ret=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
491 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
492 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
493 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
494 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
495 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
496 return $ret |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
497 } |
3298 | 498 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
499 print_versions() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
500 echo "Program Min_version" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
501 echo "----------------------" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
502 printf %s "$buildreq" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
503 echo "----------------------" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
504 # can't depend on column -t |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
505 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
506 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
507 use_libtool=0 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
508 # We'd like to use grep -E, to see if any of LT_INIT, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
509 # AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
510 # but that's not portable enough (e.g., for Solaris). |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
511 grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
512 && use_libtool=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
513 grep '^[ ]*LT_INIT' configure.ac >/dev/null \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
514 && use_libtool=1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
515 if test $use_libtool = 1; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
516 find_tool LIBTOOLIZE glibtoolize libtoolize |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
517 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
518 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
519 # gnulib-tool requires at least automake and autoconf. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
520 # If either is not listed, add it (with minimum version) as a prerequisite. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
521 case $buildreq in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
522 *automake*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
523 *) buildreq="automake 1.9 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
524 $buildreq" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
525 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
526 case $buildreq in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
527 *autoconf*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
528 *) buildreq="autoconf 2.59 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
529 $buildreq" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
530 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
531 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
532 # When we can deduce that gnulib-tool will require patch, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
533 # and when patch is not already listed as a prerequisite, add it, too. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
534 if test -d "$local_gl_dir" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
535 && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
536 case $buildreq in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
537 *patch*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
538 *) buildreq="patch - |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
539 $buildreq" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
540 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
541 fi |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
542 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
543 if ! printf "$buildreq" | check_versions; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
544 echo >&2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
545 if test -f README-prereq; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
546 die "See README-prereq for how to get the prerequisite programs" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
547 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
548 die "Please install the prerequisite programs" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
549 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
550 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
551 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
552 echo "$0: Bootstrapping from checked-out $package sources..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
553 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
554 # See if we can use gnulib's git-merge-changelog merge driver. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
555 if test -d .git && (git --version) >/dev/null 2>/dev/null ; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
556 if git config merge.merge-changelog.driver >/dev/null ; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
557 : |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
558 elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
559 echo "$0: initializing git-merge-changelog driver" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
560 git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
561 git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
562 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
563 echo "$0: consider installing git-merge-changelog from gnulib" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
564 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
565 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
566 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
567 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
568 cleanup_gnulib() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
569 status=$? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
570 rm -fr "$gnulib_path" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
571 exit $status |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
572 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
573 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
574 git_modules_config () { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
575 test -f .gitmodules && git config --file .gitmodules "$@" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
576 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
577 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
578 gnulib_path=$(git_modules_config submodule.gnulib.path) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
579 test -z "$gnulib_path" && gnulib_path=gnulib |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
580 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
581 # Get gnulib files. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
582 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
583 case ${GNULIB_SRCDIR--} in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
584 -) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
585 if git_modules_config submodule.gnulib.url >/dev/null; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
586 echo "$0: getting gnulib files..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
587 git submodule init || exit $? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
588 git submodule update || exit $? |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
589 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
590 elif [ ! -d "$gnulib_path" ]; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
591 echo "$0: getting gnulib files..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
592 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
593 trap cleanup_gnulib 1 2 13 15 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
594 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
595 shallow= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
596 git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
597 git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
598 cleanup_gnulib |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
599 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
600 trap - 1 2 13 15 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
601 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
602 GNULIB_SRCDIR=$gnulib_path |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
603 ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
604 *) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
605 # Use GNULIB_SRCDIR as a reference. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
606 if test -d "$GNULIB_SRCDIR"/.git && \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
607 git_modules_config submodule.gnulib.url >/dev/null; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
608 echo "$0: getting gnulib files..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
609 if git submodule -h|grep -- --reference > /dev/null; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
610 # Prefer the one-liner available in git 1.6.4 or newer. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
611 git submodule update --init --reference "$GNULIB_SRCDIR" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
612 "$gnulib_path" || exit $? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
613 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
614 # This fallback allows at least git 1.5.5. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
615 if test -f "$gnulib_path"/gnulib-tool; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
616 # Since file already exists, assume submodule init already complete. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
617 git submodule update || exit $? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
618 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
619 # Older git can't clone into an empty directory. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
620 rmdir "$gnulib_path" 2>/dev/null |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
621 git clone --reference "$GNULIB_SRCDIR" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
622 "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
623 && git submodule init && git submodule update \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
624 || exit $? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
625 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
626 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
627 GNULIB_SRCDIR=$gnulib_path |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
628 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
629 ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
630 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
631 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
632 if $bootstrap_sync; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
633 cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
634 echo "$0: updating bootstrap and restarting..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
635 exec sh -c \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
636 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
637 -- "$GNULIB_SRCDIR/build-aux/bootstrap" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
638 "$0" "$@" --no-bootstrap-sync |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
639 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
640 fi |
9794
0d4613a736e9
convert build system to use automake and libtool
John W. Eaton <jwe@octave.org>
parents:
9645
diff
changeset
|
641 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
642 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
643 <$gnulib_tool || exit $? |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
644 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
645 # Get translations. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
646 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
647 download_po_files() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
648 subdir=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
649 domain=$2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
650 echo "$me: getting translations into $subdir for $domain..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
651 cmd=$(printf "$po_download_command_format" "$domain" "$subdir") |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
652 eval "$cmd" && return |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
653 # Fallback to HTTP. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
654 cmd=$(printf "$po_download_command_format2" "$subdir" "$domain") |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
655 eval "$cmd" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
656 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
657 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
658 # Mirror .po files to $po_dir/.reference and copy only the new |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
659 # or modified ones into $po_dir. Also update $po_dir/LINGUAS. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
660 # Note po files that exist locally only are left in $po_dir but will |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
661 # not be included in LINGUAS and hence will not be distributed. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
662 update_po_files() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
663 # Directory containing primary .po files. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
664 # Overwrite them only when we're sure a .po file is new. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
665 po_dir=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
666 domain=$2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
667 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
668 # Mirror *.po files into this dir. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
669 # Usually contains *.s1 checksum files. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
670 ref_po_dir="$po_dir/.reference" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
671 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
672 test -d $ref_po_dir || mkdir $ref_po_dir || return |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
673 download_po_files $ref_po_dir $domain \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
674 && ls "$ref_po_dir"/*.po 2>/dev/null | |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
675 sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
676 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
677 langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
678 test "$langs" = '*' && langs=x |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
679 for po in $langs; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
680 case $po in x) continue;; esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
681 new_po="$ref_po_dir/$po.po" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
682 cksum_file="$ref_po_dir/$po.s1" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
683 if ! test -f "$cksum_file" || |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
684 ! test -f "$po_dir/$po.po" || |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
685 ! $SHA1SUM -c --status "$cksum_file" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
686 < "$new_po" > /dev/null; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
687 echo "$me: updated $po_dir/$po.po..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
688 cp "$new_po" "$po_dir/$po.po" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
689 && $SHA1SUM < "$new_po" > "$cksum_file" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
690 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
691 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
692 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
693 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
694 case $SKIP_PO in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
695 '') |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
696 if test -d po; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
697 update_po_files po $package || exit |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
698 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
699 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
700 if test -d runtime-po; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
701 update_po_files runtime-po $package-runtime || exit |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
702 fi;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
703 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
704 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
705 symlink_to_dir() |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
706 { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
707 src=$1/$2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
708 dst=${3-$2} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
709 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
710 test -f "$src" && { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
711 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
712 # If the destination directory doesn't exist, create it. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
713 # This is required at least for "lib/uniwidth/cjk.h". |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
714 dst_dir=$(dirname "$dst") |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
715 if ! test -d "$dst_dir"; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
716 mkdir -p "$dst_dir" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
717 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
718 # If we've just created a directory like lib/uniwidth, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
719 # tell version control system(s) it's ignorable. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
720 # FIXME: for now, this does only one level |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
721 parent=$(dirname "$dst_dir") |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
722 for dot_ig in x $vc_ignore; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
723 test $dot_ig = x && continue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
724 ig=$parent/$dot_ig |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
725 insert_vc_ignore $ig "${dst_dir##*/}" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
726 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
727 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
728 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
729 if $copy; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
730 { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
731 test ! -h "$dst" || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
732 echo "$me: rm -f $dst" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
733 rm -f "$dst" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
734 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
735 } && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
736 test -f "$dst" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
737 cmp -s "$src" "$dst" || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
738 echo "$me: cp -fp $src $dst" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
739 cp -fp "$src" "$dst" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
740 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
741 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
742 # Leave any existing symlink alone, if it already points to the source, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
743 # so that broken build tools that care about symlink times |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
744 # aren't confused into doing unnecessary builds. Conversely, if the |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
745 # existing symlink's time stamp is older than the source, make it afresh, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
746 # so that broken tools aren't confused into skipping needed builds. See |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
747 # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
748 test -h "$dst" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
749 src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
750 dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
751 test "$src_i" = "$dst_i" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
752 both_ls=$(ls -dt "$src" "$dst") && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
753 test "X$both_ls" = "X$dst$nl$src" || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
754 dot_dots= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
755 case $src in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
756 /*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
757 *) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
758 case /$dst/ in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
759 *//* | */../* | */./* | /*/*/*/*/*/) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
760 die "invalid symlink calculation: $src -> $dst";; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
761 /*/*/*/*/) dot_dots=../../../;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
762 /*/*/*/) dot_dots=../../;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
763 /*/*/) dot_dots=../;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
764 esac;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
765 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
766 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
767 echo "$me: ln -fs $dot_dots$src $dst" && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
768 ln -fs "$dot_dots$src" "$dst" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
769 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
770 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
771 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
772 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
773 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
774 version_controlled_file() { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
775 parent=$1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
776 file=$2 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
777 if test -d .git; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
778 git rm -n "$file" > /dev/null 2>&1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
779 elif test -d .svn; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
780 svn log -r HEAD "$file" > /dev/null 2>&1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
781 elif test -d CVS; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
782 grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
783 grep '^/[^/]*/[0-9]' > /dev/null |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
784 else |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
785 warn_ "no version control for $file?" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
786 false |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
787 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
788 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
789 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
790 # NOTE: we have to be careful to run both autopoint and libtoolize |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
791 # before gnulib-tool, since gnulib-tool is likely to provide newer |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
792 # versions of files "installed" by these two programs. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
793 # Then, *after* gnulib-tool (see below), we have to be careful to |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
794 # run autoreconf in such a way that it does not run either of these |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
795 # two just-pre-run programs. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
796 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
797 # Import from gettext. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
798 with_gettext=yes |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
799 grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
800 with_gettext=no |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
801 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
802 if test $with_gettext = yes || test $use_libtool = 1; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
803 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
804 tempbase=.bootstrap$$ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
805 trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
806 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
807 > $tempbase.0 > $tempbase.1 && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
808 find . ! -type d -print | sort > $tempbase.0 || exit |
14185
d584f90d2c47
configure: search for gfortran first instead of g77
John W. Eaton <jwe@octave.org>
parents:
12733
diff
changeset
|
809 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
810 if test $with_gettext = yes; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
811 # Released autopoint has the tendency to install macros that have been |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
812 # obsoleted in current gnulib, so run this before gnulib-tool. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
813 echo "$0: $AUTOPOINT --force" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
814 $AUTOPOINT --force || exit |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
815 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
816 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
817 # Autoreconf runs aclocal before libtoolize, which causes spurious |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
818 # warnings if the initial aclocal is confused by the libtoolized |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
819 # (or worse out-of-date) macro directory. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
820 # libtoolize 1.9b added the --install option; but we support back |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
821 # to libtoolize 1.5.22, where the install action was default. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
822 if test $use_libtool = 1; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
823 install= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
824 case $($LIBTOOLIZE --help) in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
825 *--install*) install=--install ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
826 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
827 echo "running: $LIBTOOLIZE $install --copy" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
828 $LIBTOOLIZE $install --copy |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
829 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
830 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
831 find . ! -type d -print | sort >$tempbase.1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
832 old_IFS=$IFS |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
833 IFS=$nl |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
834 for file in $(comm -13 $tempbase.0 $tempbase.1); do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
835 IFS=$old_IFS |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
836 parent=${file%/*} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
837 version_controlled_file "$parent" "$file" || { |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
838 for dot_ig in x $vc_ignore; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
839 test $dot_ig = x && continue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
840 ig=$parent/$dot_ig |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
841 insert_vc_ignore "$ig" "${file##*/}" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
842 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
843 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
844 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
845 IFS=$old_IFS |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
846 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
847 rm -f $tempbase.0 $tempbase.1 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
848 trap - 1 2 13 15 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
849 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
850 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
851 # Import from gnulib. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
852 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
853 gnulib_tool_options="\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
854 --import\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
855 --no-changelog\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
856 --aux-dir $build_aux\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
857 --doc-base $doc_base\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
858 --lib $gnulib_name\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
859 --m4-base $m4_base/\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
860 --source-base $source_base/\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
861 --tests-base $tests_base\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
862 --local-dir $local_gl_dir\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
863 $gnulib_tool_option_extras\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
864 " |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
865 if test $use_libtool = 1; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
866 case "$gnulib_tool_options " in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
867 *' --libtool '*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
868 *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
869 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
870 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
871 echo "$0: $gnulib_tool $gnulib_tool_options --import ..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
872 $gnulib_tool $gnulib_tool_options --import $gnulib_modules && |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
873 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
874 for file in $gnulib_files; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
875 symlink_to_dir "$GNULIB_SRCDIR" $file \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
876 || die "failed to symlink $file" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
877 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
878 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
879 bootstrap_post_import_hook \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
880 || die "bootstrap_post_import_hook failed" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
881 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
882 # Remove any dangling symlink matching "*.m4" or "*.[ch]" in some |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
883 # gnulib-populated directories. Such .m4 files would cause aclocal to fail. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
884 # The following requires GNU find 4.2.3 or newer. Considering the usual |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
885 # portability constraints of this script, that may seem a very demanding |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
886 # requirement, but it should be ok. Ignore any failure, which is fine, |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
887 # since this is only a convenience to help developers avoid the relatively |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
888 # unusual case in which a symlinked-to .m4 file is git-removed from gnulib |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
889 # between successive runs of this script. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
890 find "$m4_base" "$source_base" \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
891 -depth \( -name '*.m4' -o -name '*.[ch]' \) \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
892 -type l -xtype l -delete > /dev/null 2>&1 |
14185
d584f90d2c47
configure: search for gfortran first instead of g77
John W. Eaton <jwe@octave.org>
parents:
12733
diff
changeset
|
893 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
894 # Some systems (RHEL 5) are using ancient autotools, for which the |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
895 # --no-recursive option had not been invented. Detect that lack and |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
896 # omit the option when it's not supported. FIXME in 2017: remove this |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
897 # hack when RHEL 5 autotools are updated, or when they become irrelevant. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
898 no_recursive= |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
899 case $($AUTORECONF --help) in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
900 *--no-recursive*) no_recursive=--no-recursive;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
901 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
902 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
903 # Tell autoreconf not to invoke autopoint or libtoolize; they were run above. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
904 echo "running: AUTOPOINT=true LIBTOOLIZE=true " \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
905 "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
906 AUTOPOINT=true LIBTOOLIZE=true \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
907 $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
908 || die "autoreconf failed" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
909 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
910 # Get some extra files from gnulib, overriding existing files. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
911 for file in $gnulib_extra_files; do |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
912 case $file in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
913 */INSTALL) dst=INSTALL;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
914 build-aux/*) dst=$build_aux/${file#build-aux/};; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
915 *) dst=$file;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
916 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
917 symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
918 || die "failed to symlink $file" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
919 done |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
920 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
921 if test $with_gettext = yes; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
922 # Create gettext configuration. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
923 echo "$0: Creating po/Makevars from po/Makevars.template ..." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
924 rm -f po/Makevars |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
925 sed ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
926 /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
927 /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
928 /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
929 /^XGETTEXT_OPTIONS *=/{ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
930 s/$/ \\/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
931 a\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
932 '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
933 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
934 ' po/Makevars.template >po/Makevars \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
935 || die 'cannot generate po/Makevars' |
14185
d584f90d2c47
configure: search for gfortran first instead of g77
John W. Eaton <jwe@octave.org>
parents:
12733
diff
changeset
|
936 |
15920
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
937 # If the 'gettext' module is in use, grab the latest Makefile.in.in. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
938 # If only the 'gettext-h' module is in use, assume autopoint already |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
939 # put the correct version of this file into place. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
940 case $gnulib_modules in |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
941 *gettext-h*) ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
942 *gettext*) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
943 cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
944 || die "cannot create po/Makefile.in.in" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
945 ;; |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
946 esac |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
947 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
948 if test -d runtime-po; then |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
949 # Similarly for runtime-po/Makevars, but not quite the same. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
950 rm -f runtime-po/Makevars |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
951 sed ' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
952 /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
953 /^subdir *=.*/s/=.*/= runtime-po/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
954 /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
955 /^XGETTEXT_OPTIONS *=/{ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
956 s/$/ \\/ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
957 a\ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
958 '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
959 } |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
960 ' po/Makevars.template >runtime-po/Makevars \ |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
961 || die 'cannot generate runtime-po/Makevars' |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
962 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
963 # Copy identical files from po to runtime-po. |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
964 (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
965 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
966 fi |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
967 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
968 bootstrap_epilogue |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
969 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
970 echo "$0: done. Now you can run './configure'." |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
971 |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
972 # Local variables: |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
973 # eval: (add-hook 'write-file-hooks 'time-stamp) |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
974 # time-stamp-start: "scriptversion=" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
975 # time-stamp-format: "%:y-%02m-%02d.%02H" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
976 # time-stamp-time-zone: "UTC" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
977 # time-stamp-end: "; # UTC" |
b91fc9348e2e
use hook functions for gnulib's bootrap script instead of our wrapper script
John W. Eaton <jwe@octave.org>
parents:
15414
diff
changeset
|
978 # End: |