summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org>2015-11-07 15:34:53 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2015-11-07 15:34:53 (GMT)
commit6cecc808e5552f3220b97033306e42ce152908bb (patch) (unidiff)
tree778eb3e631cc6e556f1ec31ab584446951da8885
parent638c48ec020909e52a2081b4b9dc6908592e1bab (diff)
downloadidest-6cecc808e5552f3220b97033306e42ce152908bb.tar.gz
idest-6cecc808e5552f3220b97033306e42ce152908bb.tar.bz2
Include gnulib as a submodule. Fix testsuite.
Guile 2.x outputs spurious diagnostics to stderr when compiling input files. The only way to disable it is to disable compilation by setting environment variable GUILE_AUTO_COMPILE to 0. However, even if compilation is disabled, Guile still checks whether the compiled file exists and complains on stderr if it is older than the input file. This diagnostics begins with ;;;. Delete this using sed prior to comparing stderr with the expected text. * .gitmodules: Add gnulib * gnulib: New module. * bootstrap: Update from gnulib * gint: Upgrade. * scheme/idest/batch/setlyrics.scm: Fix typo. * src/Makefile.am: Use AM_CPPFLAGS instead of obsolete includes. * tests/atlocal.in: Set GUILE_AUTO_COMPILE=0 * tests/testsuite.at (WITH_GUILE): New macro. * tests/delcomm.at: Use WITH_GUILE. * tests/fmt-shortlist.at: Likewise. * tests/framelist00.at: Likewise. * tests/framelist01.at: Likewise. * tests/framelist02.at: Likewise. * tests/list1.at: Likewise. * tests/list2.at: Likewise. * tests/lyrics00.at: Likewise. * tests/pic00.at: Likewise. * tests/pic01.at: Likewise. * tests/script00.at: Likewise. * tests/script01.at: Likewise. * tests/script02.at: Likewise. * tests/script03.at: Likewise. * tests/script04.at: Likewise. * tests/script05.at: Likewise. * tests/script06.at: Likewise. * tests/script07.at: Likewise. * tests/script08.at: Likewise. * tests/setlyrics.at: Likewise. * tests/setpic.at: Likewise. * tests/settitle.at: Likewise. * tests/shortlist.at: Likewise.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--.gitmodules3
-rwxr-xr-xbootstrap983
m---------gint0
m---------gnulib0
-rw-r--r--scheme/idest/batch/setlyrics.scm2
-rw-r--r--src/Makefile.am13
-rw-r--r--tests/atlocal.in3
-rw-r--r--tests/delcomm.at6
-rw-r--r--tests/fmt-shortlist.at7
-rw-r--r--tests/framelist00.at6
-rw-r--r--tests/framelist01.at6
-rw-r--r--tests/framelist02.at6
-rw-r--r--tests/list1.at7
-rw-r--r--tests/list2.at7
-rw-r--r--tests/lyrics00.at6
-rw-r--r--tests/pic00.at5
-rw-r--r--tests/pic01.at6
-rw-r--r--tests/script00.at6
-rw-r--r--tests/script01.at6
-rw-r--r--tests/script02.at6
-rw-r--r--tests/script03.at6
-rw-r--r--tests/script04.at6
-rw-r--r--tests/script05.at6
-rw-r--r--tests/script06.at6
-rw-r--r--tests/script07.at6
-rw-r--r--tests/script08.at6
-rw-r--r--tests/setlyrics.at6
-rw-r--r--tests/setpic.at6
-rw-r--r--tests/settitle.at7
-rw-r--r--tests/shortlist.at7
-rw-r--r--tests/testsuite.at7
31 files changed, 785 insertions, 368 deletions
diff --git a/.gitmodules b/.gitmodules
index 7c369d4..adb8e67 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,3 +1,6 @@
1[submodule "gint"] 1[submodule "gint"]
2 path = gint 2 path = gint
3 url = git://git.gnu.org.ua/gint.git 3 url = git://git.gnu.org.ua/gint.git
4[submodule "gnulib"]
5 path = gnulib
6 url = git://git.sv.gnu.org/gnulib.git
diff --git a/bootstrap b/bootstrap
index 4cb82b2..e72894c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,23 +1,33 @@
1#! /bin/sh 1#! /bin/sh
2# Print a version string.
3scriptversion=2014-12-08.12; # UTC
2 4
3# Bootstrap this package from checked-out sources. 5# Bootstrap this package from checked-out sources.
4 6
5# Copyright (C) 2003-2008 Free Software Foundation, Inc. 7# Copyright (C) 2003-2015 Free Software Foundation, Inc.
6 8
7# Dico is free software: you can redistribute it and/or modify 9# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by 10# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation, either version 3 of the License, or 11# the Free Software Foundation, either version 3 of the License, or
10# (at your option) any later version. 12# (at your option) any later version.
11 13
12# Dico is distributed in the hope that it will be useful, 14# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of 15# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details. 17# GNU General Public License for more details.
16 18
17# You should have received a copy of the GNU General Public License 19# You should have received a copy of the GNU General Public License
18# along with Dico. If not, see <http://www.gnu.org/licenses/>. 20# along with this program. If not, see <http://www.gnu.org/licenses/>.
19 21
20# Written by Paul Eggert. 22# Originally written by Paul Eggert. The canonical version of this
23# script is maintained as build-aux/bootstrap in gnulib, however, to
24# be useful to your project, you should place a copy of it under
25# version control in the top-level directory of your project. The
26# intent is that all customization can be done with a bootstrap.conf
27# file also maintained in your version control; gnulib comes with a
28# template build-aux/bootstrap.conf to get you started.
29
30# Please report bugs or propose patches to bug-gnulib@gnu.org.
21 31
22nl=' 32nl='
23' 33'
@@ -26,36 +36,77 @@ nl='
26LC_ALL=C 36LC_ALL=C
27export LC_ALL 37export LC_ALL
28 38
39# Ensure that CDPATH is not set. Otherwise, the output from cd
40# would cause trouble in at least one use below.
41(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42
29local_gl_dir=gl 43local_gl_dir=gl
30 44
31# Temporary directory names. 45# Honour $PERL, but work even if there is none
32bt='._bootmp' 46PERL="${PERL-perl}"
33bt_regex=`echo "$bt"| sed 's/\./[.]/g'` 47
34bt2=${bt}2 48me=$0
35 49
36usage() { 50usage() {
37 echo >&2 "\ 51 cat <<EOF
38Usage: $0 [OPTION]... 52Usage: $me [OPTION]...
39Bootstrap this package from the checked-out sources. 53Bootstrap this package from the checked-out sources.
40 54
41Options: 55Options:
42 --gnulib-srcdir=DIRNAME Specify the local directory where gnulib 56 --gnulib-srcdir=DIRNAME specify the local directory where gnulib
43 sources reside. Use this if you already 57 sources reside. Use this if you already
44 have gnulib sources on your machine, and 58 have gnulib sources on your machine, and
45 do not want to waste your bandwidth downloading 59 do not want to waste your bandwidth downloading
46 them again. 60 them again. Defaults to \$GNULIB_SRCDIR
47 --copy Copy files instead of creating symbolic links. 61 --bootstrap-sync if this bootstrap script is not identical to
48 --force Attempt to bootstrap even if the sources seem 62 the version in the local gnulib sources,
49 not to have been checked out. 63 update this script, and then restart it with
50 --skip-po Do not download po files. 64 /bin/sh or the shell \$CONFIG_SHELL
51 65 --no-bootstrap-sync do not check whether bootstrap is out of sync
52If the file bootstrap.conf exists in the current working directory, its 66 --copy copy files instead of creating symbolic links
67 --force attempt to bootstrap even if the sources seem
68 not to have been checked out
69 --no-git do not use git to update gnulib. Requires that
70 --gnulib-srcdir point to a correct gnulib snapshot
71 --skip-po do not download po files
72
73If the file $me.conf exists in the same directory as this script, its
53contents are read as shell variables to configure the bootstrap. 74contents are read as shell variables to configure the bootstrap.
54 75
76For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
77are honored.
78
55Running without arguments will suffice in most cases. 79Running without arguments will suffice in most cases.
56" 80EOF
81}
82
83# warnf_ FORMAT-STRING ARG1...
84warnf_ ()
85{
86 warnf_format_=$1
87 shift
88 nl='
89'
90 case $* in
91 *$nl*) me_=$(printf "$me"|tr "$nl|" '??')
92 printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
93 *) printf "$me: $warnf_format_" "$@" ;;
94 esac >&2
95}
96
97# warn_ WORD1...
98warn_ ()
99{
100 # If IFS does not start with ' ', set it and emit the warning in a subshell.
101 case $IFS in
102 ' '*) warnf_ '%s\n' "$*";;
103 *) (IFS=' '; warn_ "$@");;
104 esac
57} 105}
58 106
107# die WORD1...
108die() { warn_ "$@"; exit 1; }
109
59# Configuration. 110# Configuration.
60 111
61# Name of the Makefile.am 112# Name of the Makefile.am
@@ -67,32 +118,51 @@ gnulib_modules=
67# Any gnulib files needed that are not in modules. 118# Any gnulib files needed that are not in modules.
68gnulib_files= 119gnulib_files=
69 120
121: ${AUTOPOINT=autopoint}
122: ${AUTORECONF=autoreconf}
123
124# A function to be called right after gnulib-tool is run.
125# Override it via your own definition in bootstrap.conf.
126bootstrap_post_import_hook() { :; }
127
128# A function to be called after everything else in this script.
129# Override it via your own definition in bootstrap.conf.
130bootstrap_epilogue() { :; }
131
70# The command to download all .po files for a specified domain into 132# The command to download all .po files for a specified domain into
71# a specified directory. Fill in the first %s is the domain name, and 133# a specified directory. Fill in the first %s is the domain name, and
72# the second with the destination directory. Use rsync's -L and -r 134# the second with the destination directory. Use rsync's -L and -r
73# options because the latest/%s directory and the .po files within are 135# options because the latest/%s directory and the .po files within are
74# all symlinks. 136# all symlinks.
75po_download_command_format=\ 137po_download_command_format=\
76"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'" 138"rsync --delete --exclude '*.s1' -Lrtvz \
139 'translationproject.org::tp/latest/%s/' '%s'"
140
141# Fallback for downloading .po files (if rsync fails).
142po_download_command_format2=\
143"wget --mirror -nd -q -np -A.po -P '%s' \
144 http://translationproject.org/latest/%s/"
77 145
146# Prefer a non-empty tarname (4th argument of AC_INIT if given), else
147# fall back to the package name (1st argument with munging)
78extract_package_name=' 148extract_package_name='
79 /^AC_INIT(/{ 149 /^AC_INIT(\[*/{
80 /.*,.*,.*, */{ 150 s///
81 s/// 151 /^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
82 s/[][]//g 152 s//\1/
83 s/)$// 153 s/[],)].*//
84 p 154 p
85 q 155 q
86 } 156 }
87 s/AC_INIT(\[*// 157 s/[],)].*//
88 s/]*,.*//
89 s/^GNU // 158 s/^GNU //
90 y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ 159 y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
91 s/[^A-Za-z0-9_]/-/g 160 s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
92 p 161 p
93 } 162 }
94' 163'
95package=`sed -n "$extract_package_name" configure.ac` || exit 164package=$(sed -n "$extract_package_name" configure.ac) \
165 || die 'cannot find package name in configure.ac'
96gnulib_name=lib$package 166gnulib_name=lib$package
97 167
98build_aux=build-aux 168build_aux=build-aux
@@ -100,18 +170,7 @@ source_base=lib
100m4_base=m4 170m4_base=m4
101doc_base=doc 171doc_base=doc
102tests_base=tests 172tests_base=tests
103 173gnulib_extra_files=''
104# Extra files from gnulib, which override files from other sources.
105gnulib_extra_files="
106 $build_aux/install-sh
107 $build_aux/missing
108 $build_aux/mdate-sh
109 $build_aux/texinfo.tex
110 $build_aux/depcomp
111 $build_aux/config.guess
112 $build_aux/config.sub
113 doc/INSTALL
114"
115 174
116# Additional gnulib-tool options to use. Use "\newline" to break lines. 175# Additional gnulib-tool options to use. Use "\newline" to break lines.
117gnulib_tool_option_extras= 176gnulib_tool_option_extras=
@@ -126,7 +185,8 @@ XGETTEXT_OPTIONS='\\\
126 --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ 185 --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
127' 186'
128 187
129# Package bug report address for gettext files 188# Package bug report address and copyright holder for gettext files
189COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
130MSGID_BUGS_ADDRESS=bug-$package@gnu.org 190MSGID_BUGS_ADDRESS=bug-$package@gnu.org
131 191
132# Files we don't want to import. 192# Files we don't want to import.
@@ -145,8 +205,76 @@ copy=false
145# on which version control system (if any) is used in the source directory. 205# on which version control system (if any) is used in the source directory.
146vc_ignore=auto 206vc_ignore=auto
147 207
208# Set this to true in bootstrap.conf to enable --bootstrap-sync by
209# default.
210bootstrap_sync=false
211
212# Use git to update gnulib sources
213use_git=true
214
215check_exists() {
216 if test "$1" = "--verbose"; then
217 ($2 --version </dev/null) >/dev/null 2>&1
218 if test $? -ge 126; then
219 # If not found, run with diagnostics as one may be
220 # presented with env variables to set to find the right version
221 ($2 --version </dev/null)
222 fi
223 else
224 ($1 --version </dev/null) >/dev/null 2>&1
225 fi
226
227 test $? -lt 126
228}
229
230# find_tool ENVVAR NAMES...
231# -------------------------
232# Search for a required program. Use the value of ENVVAR, if set,
233# otherwise find the first of the NAMES that can be run.
234# If found, set ENVVAR to the program name, die otherwise.
235#
236# FIXME: code duplication, see also gnu-web-doc-update.
237find_tool ()
238{
239 find_tool_envvar=$1
240 shift
241 find_tool_names=$@
242 eval "find_tool_res=\$$find_tool_envvar"
243 if test x"$find_tool_res" = x; then
244 for i; do
245 if check_exists $i; then
246 find_tool_res=$i
247 break
248 fi
249 done
250 fi
251 if test x"$find_tool_res" = x; then
252 warn_ "one of these is required: $find_tool_names;"
253 die "alternatively set $find_tool_envvar to a compatible tool"
254 fi
255 eval "$find_tool_envvar=\$find_tool_res"
256 eval "export $find_tool_envvar"
257}
258
148# Override the default configuration, if necessary. 259# Override the default configuration, if necessary.
149test -r bootstrap.conf && . ./bootstrap.conf 260# Make sure that bootstrap.conf is sourced from the current directory
261# if we were invoked as "sh bootstrap".
262case "$0" in
263 */*) test -r "$0.conf" && . "$0.conf" ;;
264 *) test -r "$0.conf" && . ./"$0.conf" ;;
265esac
266
267# Extra files from gnulib, which override files from other sources.
268test -z "${gnulib_extra_files}" && \
269 gnulib_extra_files="
270 build-aux/install-sh
271 build-aux/mdate-sh
272 build-aux/texinfo.tex
273 build-aux/depcomp
274 build-aux/config.guess
275 build-aux/config.sub
276 doc/INSTALL
277"
150 278
151if test "$vc_ignore" = auto; then 279if test "$vc_ignore" = auto; then
152 vc_ignore= 280 vc_ignore=
@@ -165,33 +293,70 @@ do
165 usage 293 usage
166 exit;; 294 exit;;
167 --gnulib-srcdir=*) 295 --gnulib-srcdir=*)
168 GNULIB_SRCDIR=`expr "$option" : '--gnulib-srcdir=\(.*\)'`;; 296 GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
169 --skip-po) 297 --skip-po)
170 SKIP_PO=t;; 298 SKIP_PO=t;;
171 --force) 299 --force)
172 checkout_only_file=;; 300 checkout_only_file=;;
173 --copy) 301 --copy)
174 copy=true;; 302 copy=true;;
303 --bootstrap-sync)
304 bootstrap_sync=true;;
305 --no-bootstrap-sync)
306 bootstrap_sync=false;;
307 --no-git)
308 use_git=false;;
175 *) 309 *)
176 echo >&2 "$0: $option: unknown option" 310 die "$option: unknown option";;
177 exit 1;;
178 esac 311 esac
179done 312done
180 313
314$use_git || test -d "$GNULIB_SRCDIR" \
315 || die "Error: --no-git requires --gnulib-srcdir"
316
181if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then 317if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
182 echo "$0: Bootstrapping from a non-checked-out distribution is risky." >&2 318 die "Bootstrapping from a non-checked-out distribution is risky."
183 exit 1
184fi 319fi
185 320
186# If $STR is not already on a line by itself in $FILE, insert it, 321# Strip blank and comment lines to leave significant entries.
187# sorting the new contents of the file and replacing $FILE with the result. 322gitignore_entries() {
188insert_sorted_if_absent() { 323 sed '/^#/d; /^$/d' "$@"
324}
325
326# If $STR is not already on a line by itself in $FILE, insert it at the start.
327# Entries are inserted at the start of the ignore list to ensure existing
328# entries starting with ! are not overridden. Such entries support
329# whitelisting exceptions after a more generic blacklist pattern.
330insert_if_absent() {
189 file=$1 331 file=$1
190 str=$2 332 str=$2
191 test -f $file || touch $file 333 test -f $file || touch $file
192 echo "$str" | sort -u - $file | cmp -s - $file \ 334 test -r $file || die "Error: failed to read ignore file: $file"
193 || echo "$str" | sort -u - $file -o $file \ 335 duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
194 || exit 1 336 if [ "$duplicate_entries" ] ; then
337 die "Error: Duplicate entries in $file: " $duplicate_entries
338 fi
339 linesold=$(gitignore_entries $file | wc -l)
340 linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
341 if [ $linesold != $linesnew ] ; then
342 { echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
343 || die "insert_if_absent $file $str: failed"
344 fi
345}
346
347# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
348# insert_if_absent.
349insert_vc_ignore() {
350 vc_ignore_file="$1"
351 pattern="$2"
352 case $vc_ignore_file in
353 *.gitignore)
354 # A .gitignore entry that does not start with '/' applies
355 # recursively to subdirectories, so prepend '/' to every
356 # .gitignore entry.
357 pattern=$(echo "$pattern" | sed s,^,/,);;
358 esac
359 insert_if_absent "$vc_ignore_file" "$pattern"
195} 360}
196 361
197# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. 362# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
@@ -200,11 +365,8 @@ grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \
200 >/dev/null && found_aux_dir=yes 365 >/dev/null && found_aux_dir=yes
201 grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ 366 grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
202 >/dev/null && found_aux_dir=yes 367 >/dev/null && found_aux_dir=yes
203if test $found_aux_dir = no; then 368test $found_aux_dir = yes \
204 echo "$0: expected line not found in configure.ac. Add the following:" >&2 369 || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
205 echo " AC_CONFIG_AUX_DIR([$build_aux])" >&2
206 exit 1
207fi
208 370
209# If $build_aux doesn't exist, create it now, otherwise some bits 371# If $build_aux doesn't exist, create it now, otherwise some bits
210# below will malfunction. If creating it, also mark it as ignored. 372# below will malfunction. If creating it, also mark it as ignored.
@@ -212,76 +374,365 @@ if test ! -d $build_aux; then
212 mkdir $build_aux 374 mkdir $build_aux
213 for dot_ig in x $vc_ignore; do 375 for dot_ig in x $vc_ignore; do
214 test $dot_ig = x && continue 376 test $dot_ig = x && continue
215 insert_sorted_if_absent $dot_ig $build_aux 377 insert_vc_ignore $dot_ig $build_aux
378 done
379fi
380
381# Note this deviates from the version comparison in automake
382# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
383# but this should suffice as we won't be specifying old
384# version formats or redundant trailing .0 in bootstrap.conf.
385# If we did want full compatibility then we should probably
386# use m4_version_compare from autoconf.
387sort_ver() { # sort -V is not generally available
388 ver1="$1"
389 ver2="$2"
390
391 # split on '.' and compare each component
392 i=1
393 while : ; do
394 p1=$(echo "$ver1" | cut -d. -f$i)
395 p2=$(echo "$ver2" | cut -d. -f$i)
396 if [ ! "$p1" ]; then
397 echo "$1 $2"
398 break
399 elif [ ! "$p2" ]; then
400 echo "$2 $1"
401 break
402 elif [ ! "$p1" = "$p2" ]; then
403 if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
404 echo "$2 $1"
405 elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
406 echo "$1 $2"
407 else # numeric, then lexicographic comparison
408 lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
409 if [ "$lp" = "$p2" ]; then
410 echo "$1 $2"
411 else
412 echo "$2 $1"
413 fi
414 fi
415 break
416 fi
417 i=$(($i+1))
418 done
419}
420
421get_version() {
422 app=$1
423
424 $app --version >/dev/null 2>&1 || { $app --version; return 1; }
425
426 $app --version 2>&1 |
427 sed -n '# Move version to start of line.
428 s/.*[v ]\([0-9]\)/\1/
429
430 # Skip lines that do not start with version.
431 /^[0-9]/!d
432
433 # Remove characters after the version.
434 s/[^.a-z0-9-].*//
435
436 # The first component must be digits only.
437 s/^\([0-9]*\)[a-z-].*/\1/
438
439 #the following essentially does s/5.005/5.5/
440 s/\.0*\([1-9]\)/.\1/g
441 p
442 q'
443}
444
445check_versions() {
446 ret=0
447
448 while read app req_ver; do
449 # We only need libtoolize from the libtool package.
450 if test "$app" = libtool; then
451 app=libtoolize
452 fi
453 # Exempt git if --no-git is in effect.
454 if test "$app" = git; then
455 $use_git || continue
456 fi
457 # Honor $APP variables ($TAR, $AUTOCONF, etc.)
458 appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
459 test "$appvar" = TAR && appvar=AMTAR
460 case $appvar in
461 GZIP) ;; # Do not use $GZIP: it contains gzip options.
462 PERL::*) ;; # Keep perl modules as-is
463 *) eval "app=\${$appvar-$app}" ;;
464 esac
465
466 # Handle the still-experimental Automake-NG programs specially.
467 # They remain named as the mainstream Automake programs ("automake",
468 # and "aclocal") to avoid gratuitous incompatibilities with
469 # pre-existing usages (by, say, autoreconf, or custom autogen.sh
470 # scripts), but correctly identify themselves (as being part of
471 # "GNU automake-ng") when asked their version.
472 case $app in
473 automake-ng|aclocal-ng)
474 app=${app%-ng}
475 ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
476 warn_ "Error: '$app' not found or not from Automake-NG"
477 ret=1
478 continue
479 } ;;
480 # Another check is for perl modules. These can be written as
481 # e.g. perl::XML::XPath in case of XML::XPath module, etc.
482 perl::*)
483 # Extract module name
484 app="${app#perl::}"
485 if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
486 warn_ "Error: perl module '$app' not found"
487 ret=1
488 fi
489 continue
490 ;;
491 esac
492 if [ "$req_ver" = "-" ]; then
493 # Merely require app to exist; not all prereq apps are well-behaved
494 # so we have to rely on $? rather than get_version.
495 if ! check_exists --verbose $app; then
496 warn_ "Error: '$app' not found"
497 ret=1
498 fi
499 else
500 # Require app to produce a new enough version string.
501 inst_ver=$(get_version $app)
502 if [ ! "$inst_ver" ]; then
503 warn_ "Error: '$app' not found"
504 ret=1
505 else
506 latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
507 if [ ! "$latest_ver" = "$inst_ver" ]; then
508 warnf_ '%s\n' \
509 "Error: '$app' version == $inst_ver is too old" \
510 " '$app' version >= $req_ver is required"
511 ret=1
512 fi
513 fi
514 fi
216 done 515 done
516
517 return $ret
518}
519
520print_versions() {
521 echo "Program Min_version"
522 echo "----------------------"
523 printf %s "$buildreq"
524 echo "----------------------"
525 # can't depend on column -t
526}
527
528# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6.
529# Also find the compatible sha1 utility on the BSDs
530if test x"$SKIP_PO" = x; then
531 find_tool SHA1SUM sha1sum gsha1sum shasum sha1
532fi
533
534use_libtool=0
535# We'd like to use grep -E, to see if any of LT_INIT,
536# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
537# but that's not portable enough (e.g., for Solaris).
538 grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
539 && use_libtool=1
540 grep '^[ ]*LT_INIT' configure.ac >/dev/null \
541 && use_libtool=1
542if test $use_libtool = 1; then
543 find_tool LIBTOOLIZE glibtoolize libtoolize
544fi
545
546# gnulib-tool requires at least automake and autoconf.
547# If either is not listed, add it (with minimum version) as a prerequisite.
548case $buildreq in
549 *automake*) ;;
550 *) buildreq="automake 1.9
551$buildreq" ;;
552esac
553case $buildreq in
554 *autoconf*) ;;
555 *) buildreq="autoconf 2.59
556$buildreq" ;;
557esac
558
559# When we can deduce that gnulib-tool will require patch,
560# and when patch is not already listed as a prerequisite, add it, too.
561if test -d "$local_gl_dir" \
562 && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
563 case $buildreq in
564 *patch*) ;;
565 *) buildreq="patch -
566$buildreq" ;;
567 esac
568fi
569
570if ! printf "$buildreq" | check_versions; then
571 echo >&2
572 if test -f README-prereq; then
573 die "See README-prereq for how to get the prerequisite programs"
574 else
575 die "Please install the prerequisite programs"
576 fi
577fi
578
579# Warn the user if autom4te appears to be broken; this causes known
580# issues with at least gettext 0.18.3.
581probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
582if test "x$probe" != xhi; then
583 warn_ "WARNING: your autom4te wrapper eats stdin;"
584 warn_ "if bootstrap fails, consider upgrading your autotools"
217fi 585fi
218 586
219echo "$0: Bootstrapping from checked-out $package sources..." 587echo "$0: Bootstrapping from checked-out $package sources..."
220 588
589# See if we can use gnulib's git-merge-changelog merge driver.
590if $use_git && test -d .git && check_exists git; then
591 if git config merge.merge-changelog.driver >/dev/null ; then
592 :
593 elif check_exists git-merge-changelog; then
594 echo "$0: initializing git-merge-changelog driver"
595 git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
596 git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
597 else
598 echo "$0: consider installing git-merge-changelog from gnulib"
599 fi
600fi
601
602
221cleanup_gnulib() { 603cleanup_gnulib() {
222 status=$? 604 status=$?
223 rm -fr gnulib 605 rm -fr "$gnulib_path"
224 exit $status 606 exit $status
225} 607}
226 608
227# Get gnulib files. 609git_modules_config () {
610 test -f .gitmodules && git config --file .gitmodules "$@"
611}
612
613if $use_git; then
614 gnulib_path=$(git_modules_config submodule.gnulib.path)
615 test -z "$gnulib_path" && gnulib_path=gnulib
616fi
617
618# Get gnulib files. Populate $GNULIB_SRCDIR, possibly updating a
619# submodule, for use in the rest of the script.
228 620
229case ${GNULIB_SRCDIR--} in 621case ${GNULIB_SRCDIR--} in
230-) 622-)
231 if [ ! -d gnulib ]; then 623 # Note that $use_git is necessarily true in this case.
624 if git_modules_config submodule.gnulib.url >/dev/null; then
625 echo "$0: getting gnulib files..."
626 git submodule init -- "$gnulib_path" || exit $?
627 git submodule update -- "$gnulib_path" || exit $?
628
629 elif [ ! -d "$gnulib_path" ]; then
232 echo "$0: getting gnulib files..." 630 echo "$0: getting gnulib files..."
233 631
234 trap cleanup_gnulib 1 2 13 15 632 trap cleanup_gnulib 1 2 13 15
235 633
236 git clone --depth 2 git://git.sv.gnu.org/gnulib || 634 shallow=
635 git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2'
636 git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" ||
237 cleanup_gnulib 637 cleanup_gnulib
238 638
239 trap - 1 2 13 15 639 trap - 1 2 13 15
240 fi 640 fi
241 GNULIB_SRCDIR=gnulib 641 GNULIB_SRCDIR=$gnulib_path
642 ;;
643*)
644 # Use GNULIB_SRCDIR directly or as a reference.
645 if $use_git && test -d "$GNULIB_SRCDIR"/.git && \
646 git_modules_config submodule.gnulib.url >/dev/null; then
647 echo "$0: getting gnulib files..."
648 if git submodule -h|grep -- --reference > /dev/null; then
649 # Prefer the one-liner available in git 1.6.4 or newer.
650 git submodule update --init --reference "$GNULIB_SRCDIR" \
651 "$gnulib_path" || exit $?
652 else
653 # This fallback allows at least git 1.5.5.
654 if test -f "$gnulib_path"/gnulib-tool; then
655 # Since file already exists, assume submodule init already complete.
656 git submodule update -- "$gnulib_path" || exit $?
657 else
658 # Older git can't clone into an empty directory.
659 rmdir "$gnulib_path" 2>/dev/null
660 git clone --reference "$GNULIB_SRCDIR" \
661 "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \
662 && git submodule init -- "$gnulib_path" \
663 && git submodule update -- "$gnulib_path" \
664 || exit $?
665 fi
666 fi
667 GNULIB_SRCDIR=$gnulib_path
668 fi
669 ;;
242esac 670esac
243 671
672# $GNULIB_SRCDIR now points to the version of gnulib to use, and
673# we no longer need to use git or $gnulib_path below here.
674
675if $bootstrap_sync; then
676 cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
677 echo "$0: updating bootstrap and restarting..."
678 case $(sh -c 'echo "$1"' -- a) in
679 a) ignored=--;;
680 *) ignored=ignored;;
681 esac
682 exec sh -c \
683 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
684 $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
685 "$0" "$@" --no-bootstrap-sync
686 }
687fi
688
244gnulib_tool=$GNULIB_SRCDIR/gnulib-tool 689gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
245<$gnulib_tool || exit 690<$gnulib_tool || exit $?
246 691
247# Get translations. 692# Get translations.
248 693
249download_po_files() { 694download_po_files() {
250 subdir=$1 695 subdir=$1
251 domain=$2 696 domain=$2
252 echo "$0: getting translations into $subdir for $domain..." 697 echo "$me: getting translations into $subdir for $domain..."
253 cmd=`printf "$po_download_command_format" "$domain" "$subdir"` 698 cmd=$(printf "$po_download_command_format" "$domain" "$subdir")
699 eval "$cmd" && return
700 # Fallback to HTTP.
701 cmd=$(printf "$po_download_command_format2" "$subdir" "$domain")
254 eval "$cmd" 702 eval "$cmd"
255} 703}
256 704
257# Download .po files to $po_dir/.reference and copy only the new 705# Mirror .po files to $po_dir/.reference and copy only the new
258# or modified ones into $po_dir. Also update $po_dir/LINGUAS. 706# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
707# Note po files that exist locally only are left in $po_dir but will
708# not be included in LINGUAS and hence will not be distributed.
259update_po_files() { 709update_po_files() {
260 # Directory containing primary .po files. 710 # Directory containing primary .po files.
261 # Overwrite them only when we're sure a .po file is new. 711 # Overwrite them only when we're sure a .po file is new.
262 po_dir=$1 712 po_dir=$1
263 domain=$2 713 domain=$2
264 714
265 # Download *.po files into this dir. 715 # Mirror *.po files into this dir.
266 # Usually contains *.s1 checksum files. 716 # Usually contains *.s1 checksum files.
267 ref_po_dir="$po_dir/.reference" 717 ref_po_dir="$po_dir/.reference"
268 718
269 test -d $ref_po_dir || mkdir $ref_po_dir || return 719 test -d $ref_po_dir || mkdir $ref_po_dir || return
270 download_po_files $ref_po_dir $domain \ 720 download_po_files $ref_po_dir $domain \
271 && ls "$ref_po_dir"/*.po 2>/dev/null | 721 && ls "$ref_po_dir"/*.po 2>/dev/null |
272 sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" 722 sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
273 723
274 langs=`cd $ref_po_dir && echo *.po|sed 's/\.po//g'` 724 langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g')
275 test "$langs" = '*' && langs=x 725 test "$langs" = '*' && langs=x
276 for po in `cd $ref_po_dir && echo *.po|sed 's/\.po//g'`; do 726 for po in $langs; do
277 case $po in x) continue;; esac 727 case $po in x) continue;; esac
278 new_po="$ref_po_dir/$po.po" 728 new_po="$ref_po_dir/$po.po"
279 cksum_file="$ref_po_dir/$po.s1" 729 cksum_file="$ref_po_dir/$po.s1"
280 if ! test -f "$cksum_file" || 730 if ! test -f "$cksum_file" ||
281 ! test -f "$po_dir/$po.po" || 731 ! test -f "$po_dir/$po.po" ||
282 ! sha1sum -c --status "$cksum_file" < "$new_po" > /dev/null; then 732 ! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
283 echo "updated $po_dir/$po.po..." 733 echo "$me: updated $po_dir/$po.po..."
284 cp "$new_po" "$po_dir/$po.po" && sha1sum < "$new_po" > "$cksum_file" 734 cp "$new_po" "$po_dir/$po.po" \
735 && $SHA1SUM < "$new_po" > "$cksum_file" || return
285 fi 736 fi
286 done 737 done
287} 738}
@@ -306,247 +757,174 @@ symlink_to_dir()
306 757
307 # If the destination directory doesn't exist, create it. 758 # If the destination directory doesn't exist, create it.
308 # This is required at least for "lib/uniwidth/cjk.h". 759 # This is required at least for "lib/uniwidth/cjk.h".
309 dst_dir=`dirname "$dst"` 760 dst_dir=$(dirname "$dst")
310 if ! test -d "$dst_dir"; then 761 if ! test -d "$dst_dir"; then
311 mkdir -p "$dst_dir" 762 mkdir -p "$dst_dir"
312 763
313 # If we've just created a directory like lib/uniwidth, 764 # If we've just created a directory like lib/uniwidth,
314 # tell version control system(s) it's ignorable. 765 # tell version control system(s) it's ignorable.
315 # FIXME: for now, this does only one level 766 # FIXME: for now, this does only one level
316 parent=`dirname "$dst_dir"` 767 parent=$(dirname "$dst_dir")
317 for dot_ig in x $vc_ignore; do 768 for dot_ig in x $vc_ignore; do
318 test $dot_ig = x && continue 769 test $dot_ig = x && continue
319 ig=$parent/$dot_ig 770 ig=$parent/$dot_ig
320 insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'` 771 insert_vc_ignore $ig "${dst_dir##*/}"
321 done 772 done
322 fi 773 fi
323 774
324 if $copy; then 775 if $copy; then
325 { 776 {
326 test ! -h "$dst" || { 777 test ! -h "$dst" || {
327 echo "$0: rm -f $dst" && 778 echo "$me: rm -f $dst" &&
328 rm -f "$dst" 779 rm -f "$dst"
329 } 780 }
330 } && 781 } &&
331 test -f "$dst" && 782 test -f "$dst" &&
332 cmp -s "$src" "$dst" || { 783 cmp -s "$src" "$dst" || {
333 echo "$0: cp -fp $src $dst" && 784 echo "$me: cp -fp $src $dst" &&
334 cp -fp "$src" "$dst" 785 cp -fp "$src" "$dst"
335 } 786 }
336 else 787 else
788 # Leave any existing symlink alone, if it already points to the source,
789 # so that broken build tools that care about symlink times
790 # aren't confused into doing unnecessary builds. Conversely, if the
791 # existing symlink's time stamp is older than the source, make it afresh,
792 # so that broken tools aren't confused into skipping needed builds. See
793 # <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
337 test -h "$dst" && 794 test -h "$dst" &&
338 src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 && 795 src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
339 dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 && 796 dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
340 test "$src_i" = "$dst_i" || { 797 test "$src_i" = "$dst_i" &&
341 dot_dots= 798 both_ls=$(ls -dt "$src" "$dst") &&
342 case $src in 799 test "X$both_ls" = "X$dst$nl$src" || {
343 /*) ;; 800 dot_dots=
344 *) 801 case $src in
345 case /$dst/ in 802 /*) ;;
346 *//* | */../* | */./* | /*/*/*/*/*/) 803 *)
347 echo >&2 "$0: invalid symlink calculation: $src -> $dst" 804 case /$dst/ in
348 exit 1;; 805 *//* | */../* | */./* | /*/*/*/*/*/)
349 /*/*/*/*/)dot_dots=../../../;; 806 die "invalid symlink calculation: $src -> $dst";;
350 /*/*/*/)dot_dots=../../;; 807 /*/*/*/*/) dot_dots=../../../;;
351 /*/*/)dot_dots=../;; 808 /*/*/*/) dot_dots=../../;;
352 esac;; 809 /*/*/) dot_dots=../;;
353 esac 810 esac;;
354 811 esac
355 echo "$0: ln -fs $dot_dots$src $dst" && 812
356 ln -fs "$dot_dots$src" "$dst" 813 echo "$me: ln -fs $dot_dots$src $dst" &&
814 ln -fs "$dot_dots$src" "$dst"
357 } 815 }
358 fi 816 fi
359 } 817 }
360} 818}
361 819
362cp_mark_as_generated()
363{
364 cp_src=$1
365 cp_dst=$2
366
367 if cmp -s "$cp_src" "$GNULIB_SRCDIR/$cp_dst"; then
368 symlink_to_dir "$GNULIB_SRCDIR" "$cp_dst"
369 elif cmp -s "$cp_src" "$local_gl_dir/$cp_dst"; then
370 symlink_to_dir $local_gl_dir "$cp_dst"
371 else
372 case $cp_dst in
373 *.[ch]) c1='/* '; c2=' */';;
374 *.texi) c1='@c '; c2= ;;
375 *.m4|*/Make*|Make*) c1='# ' ; c2= ;;
376 *) c1= ; c2= ;;
377 esac
378
379 # If the destination directory doesn't exist, create it.
380 # This is required at least for "lib/uniwidth/cjk.h".
381 dst_dir=`dirname "$cp_dst"`
382 test -d "$dst_dir" || mkdir -p "$dst_dir"
383
384 if test -z "$c1"; then
385 cmp -s "$cp_src" "$cp_dst" || {
386 echo "$0: cp -f $cp_src $cp_dst" &&
387 rm -f "$cp_dst" &&
388 sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst"
389 }
390 else
391 # Copy the file first to get proper permissions if it
392 # doesn't already exist. Then overwrite the copy.
393 cp "$cp_src" "$cp_dst-t" &&
394 (
395 echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
396 echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
397 sed "s!$bt_regex/!!g" "$cp_src"
398 ) > $cp_dst-t &&
399 if cmp -s "$cp_dst-t" "$cp_dst"; then
400 rm -f "$cp_dst-t"
401 else
402 echo "$0: cp $cp_src $cp_dst # with edits" &&
403 mv -f "$cp_dst-t" "$cp_dst"
404 fi
405 fi
406 fi
407}
408
409version_controlled_file() { 820version_controlled_file() {
410 dir=$1 821 parent=$1
411 file=$2 822 file=$2
412 found=no 823 if test -d .git; then
413 if test -d CVS; then 824 git rm -n "$file" > /dev/null 2>&1
414 grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
415 grep '^/[^/]*/[0-9]' > /dev/null && found=yes
416 elif test -d .git; then
417 git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
418 elif test -d .svn; then 825 elif test -d .svn; then
419 svn log -r HEAD "$dir/$file" > /dev/null 2>&1 && found=yes 826 svn log -r HEAD "$file" > /dev/null 2>&1
827 elif test -d CVS; then
828 grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
829 grep '^/[^/]*/[0-9]' > /dev/null
420 else 830 else
421 echo "$0: no version control for $dir/$file?" >&2 831 warn_ "no version control for $file?"
832 false
422 fi 833 fi
423 test $found = yes
424} 834}
425 835
426slurp() { 836# NOTE: we have to be careful to run both autopoint and libtoolize
427 for dir in . `(cd $1 && find * -type d -print)`; do 837# before gnulib-tool, since gnulib-tool is likely to provide newer
428 copied= 838# versions of files "installed" by these two programs.
429 sep= 839# Then, *after* gnulib-tool (see below), we have to be careful to
430 for file in `ls -a $1/$dir`; do 840# run autoreconf in such a way that it does not run either of these
431 case $file in 841# two just-pre-run programs.
432 .|..) continue;;
433 .*) continue;; # FIXME: should all file names starting with "." be ignored?
434 esac
435 test -d $1/$dir/$file && continue
436 for excluded_file in $excluded_files; do
437 test "$dir/$file" = "$excluded_file" && continue 2
438 done
439 if test $file = Makefile.am; then
440 copied=$copied${sep}$gnulib_mk; sep=$nl
441 remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
442 sed "$remove_intl" $1/$dir/$file | cmp -s - $dir/$gnulib_mk || {
443 echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
444 rm -f $dir/$gnulib_mk &&
445 sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
446 }
447 elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
448 version_controlled_file $dir $file; then
449 echo "$0: $dir/$file overrides $1/$dir/$file"
450 else
451 copied=$copied$sep$file; sep=$nl
452 if test $file = gettext.m4; then
453 echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
454 rm -f $dir/$file
455 sed '
456 /^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
457 AC_DEFUN([AM_INTL_SUBDIR], [
458 /^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
459 AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
460 $a\
461 AC_DEFUN([gl_LOCK_EARLY], [])
462 ' $1/$dir/$file >$dir/$file
463 else
464 cp_mark_as_generated $1/$dir/$file $dir/$file
465 fi
466 fi || exit
467 done
468 842
469 for dot_ig in x $vc_ignore; do 843# Import from gettext.
470 test $dot_ig = x && continue 844with_gettext=yes
471 ig=$dir/$dot_ig 845 grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
472 if test -n "$copied"; then 846 with_gettext=no
473 insert_sorted_if_absent $ig "$copied" 847
474 # If an ignored file name ends with .in.h, then also add 848if test $with_gettext = yes || test $use_libtool = 1; then
475 # the name with just ".h". Many gnulib headers are generated, 849
476 # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc. 850 tempbase=.bootstrap$$
477 # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed 851 trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
478 f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
479 insert_sorted_if_absent $ig "$f"
480
481 # For files like sys_stat.in.h and sys_time.in.h, record as
482 # ignorable the directory we might eventually create: sys/.
483 f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
484 insert_sorted_if_absent $ig "$f"
485 fi
486 done
487 done
488}
489 852
853 > $tempbase.0 > $tempbase.1 &&
854 find . ! -type d -print | sort > $tempbase.0 || exit
490 855
491# Create boot temporary directories to import from gnulib and gettext. 856 if test $with_gettext = yes; then
492rm -fr $bt $bt2 && 857 # Released autopoint has the tendency to install macros that have been
493mkdir $bt $bt2 || exit 858 # obsoleted in current gnulib, so run this before gnulib-tool.
859 echo "$0: $AUTOPOINT --force"
860 $AUTOPOINT --force || exit
861 fi
862
863 # Autoreconf runs aclocal before libtoolize, which causes spurious
864 # warnings if the initial aclocal is confused by the libtoolized
865 # (or worse out-of-date) macro directory.
866 # libtoolize 1.9b added the --install option; but we support back
867 # to libtoolize 1.5.22, where the install action was default.
868 if test $use_libtool = 1; then
869 install=
870 case $($LIBTOOLIZE --help) in
871 *--install*) install=--install ;;
872 esac
873 echo "running: $LIBTOOLIZE $install --copy"
874 $LIBTOOLIZE $install --copy
875 fi
876
877 find . ! -type d -print | sort >$tempbase.1
878 old_IFS=$IFS
879 IFS=$nl
880 for file in $(comm -13 $tempbase.0 $tempbase.1); do
881 IFS=$old_IFS
882 parent=${file%/*}
883 version_controlled_file "$parent" "$file" || {
884 for dot_ig in x $vc_ignore; do
885 test $dot_ig = x && continue
886 ig=$parent/$dot_ig
887 insert_vc_ignore "$ig" "${file##*/}"
888 done
889 }
890 done
891 IFS=$old_IFS
892
893 rm -f $tempbase.0 $tempbase.1
894 trap - 1 2 13 15
895fi
494 896
495# Import from gnulib. 897# Import from gnulib.
496 898
497gnulib_tool_options="\ 899gnulib_tool_options="\
498 --import\ 900 --import\
499 --no-changelog\ 901 --no-changelog\
500 --aux-dir $bt/$build_aux\ 902 --aux-dir $build_aux\
501 --doc-base $bt/$doc_base\ 903 --doc-base $doc_base\
502 --lib $gnulib_name\ 904 --lib $gnulib_name\
503 --m4-base $bt/$m4_base/\ 905 --m4-base $m4_base/\
504 --source-base $bt/$source_base/\ 906 --source-base $source_base/\
505 --tests-base $bt/$tests_base\ 907 --tests-base $tests_base\
506 --local-dir $local_gl_dir\ 908 --local-dir $local_gl_dir\
507 $gnulib_tool_option_extras\ 909 $gnulib_tool_option_extras\
508" 910"
911if test $use_libtool = 1; then
912 case "$gnulib_tool_options " in
913 *' --libtool '*) ;;
914 *) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
915 esac
916fi
509echo "$0: $gnulib_tool $gnulib_tool_options --import ..." 917echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
510$gnulib_tool $gnulib_tool_options --import $gnulib_modules && 918$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
511slurp $bt || exit 919 || die "gnulib-tool failed"
512 920
513for file in $gnulib_files; do 921for file in $gnulib_files; do
514 symlink_to_dir "$GNULIB_SRCDIR" $file || exit 922 symlink_to_dir "$GNULIB_SRCDIR" $file \
923 || die "failed to symlink $file"
515done 924done
516 925
517 926bootstrap_post_import_hook \
518# Import from gettext. 927 || die "bootstrap_post_import_hook failed"
519with_gettext=yes
520 grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
521 with_gettext=no
522
523if test $with_gettext = yes; then
524 echo "$0: (cd $bt2; autopoint) ..."
525 cp configure.ac $bt2 &&
526 (cd $bt2 && autopoint && rm configure.ac) &&
527 slurp $bt2 $bt || exit
528
529 rm -fr $bt $bt2 || exit
530fi
531
532# Coreutils is unusual in that it generates some of its test-related
533# Makefile.am files. That must be done before invoking automake.
534mam_template=tests/Makefile.am.in
535if test -f $mam_template; then
536 PERL=perl
537 for tool in cut head join pr sort tac tail test tr uniq wc; do
538 m=tests/$tool/Makefile.am
539 t=${m}t
540 rm -f $m $t
541 sed -n '1,/^##test-files-begin/p' $mam_template > $t
542 echo "x = $tool" >> $t
543 srcdir=tests/$tool
544 $PERL -I$srcdir -w -- tests/mk-script $srcdir --list >> $t
545 sed -n '/^##test-files-end/,$p' $mam_template >> $t
546 chmod -w $t
547 mv $t $m
548 done
549fi
550 928
551# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some 929# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
552# gnulib-populated directories. Such .m4 files would cause aclocal to fail. 930# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
@@ -560,23 +938,32 @@ find "$m4_base" "$source_base" \
560 -depth \( -name '*.m4' -o -name '*.[ch]' \) \ 938 -depth \( -name '*.m4' -o -name '*.[ch]' \) \
561 -type l -xtype l -delete > /dev/null 2>&1 939 -type l -xtype l -delete > /dev/null 2>&1
562 940
563# Reconfigure, getting other files. 941# Invoke autoreconf with --force --install to ensure upgrades of tools
942# such as ylwrap.
943AUTORECONFFLAGS="--verbose --install --force -I $m4_base $ACLOCAL_FLAGS"
564 944
565echo "$0: autoreconf --force --install --symlink ..." 945# Some systems (RHEL 5) are using ancient autotools, for which the
566autoreconf --force --install --symlink 946# --no-recursive option had not been invented. Detect that lack and
947# omit the option when it's not supported. FIXME in 2017: remove this
948# hack when RHEL 5 autotools are updated, or when they become irrelevant.
949case $($AUTORECONF --help) in
950 *--no-recursive*) AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive";;
951esac
567 952
568# FIXME: A kludge to avoid unnecessary data in the distribution. 953# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
569test -d libltdl/config && rm -rf libltdl/config 954echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
570test -d libltdl/m4 && rm -rf libltdl/m4 955AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
956 || die "autoreconf failed"
571 957
572# Get some extra files from gnulib, overriding existing files. 958# Get some extra files from gnulib, overriding existing files.
573for file in $gnulib_extra_files; do 959for file in $gnulib_extra_files; do
574 case $file in 960 case $file in
575 */INSTALL) dst=INSTALL;; 961 */INSTALL) dst=INSTALL;;
576 build-aux/*) dst=$build_aux/`expr "$file" : 'build-aux/\(.*\)'`;; 962 build-aux/*) dst=$build_aux/${file#build-aux/};;
577 *) dst=$file;; 963 *) dst=$file;;
578 esac 964 esac
579 symlink_to_dir "$GNULIB_SRCDIR" $file $dst || exit 965 symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
966 || die "failed to symlink $file"
580done 967done
581 968
582if test $with_gettext = yes; then 969if test $with_gettext = yes; then
@@ -585,13 +972,26 @@ if test $with_gettext = yes; then
585 rm -f po/Makevars 972 rm -f po/Makevars
586 sed ' 973 sed '
587 /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ 974 /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
588 /^MSGID_BUGS_ADDRESS *=/s/=.*/= '"$MSGID_BUGS_ADDRESS"'/ 975 /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
976 /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
589 /^XGETTEXT_OPTIONS *=/{ 977 /^XGETTEXT_OPTIONS *=/{
590 s/$/ \\/ 978 s/$/ \\/
591 a\ 979 a\
592 '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} 980 '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
593 } 981 }
594 ' po/Makevars.template >po/Makevars 982 ' po/Makevars.template >po/Makevars \
983 || die 'cannot generate po/Makevars'
984
985 # If the 'gettext' module is in use, grab the latest Makefile.in.in.
986 # If only the 'gettext-h' module is in use, assume autopoint already
987 # put the correct version of this file into place.
988 case $gnulib_modules in
989 *gettext-h*) ;;
990 *gettext*)
991 cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
992 || die "cannot create po/Makefile.in.in"
993 ;;
994 esac
595 995
596 if test -d runtime-po; then 996 if test -d runtime-po; then
597 # Similarly for runtime-po/Makevars, but not quite the same. 997 # Similarly for runtime-po/Makevars, but not quite the same.
@@ -601,15 +1001,26 @@ if test $with_gettext = yes; then
601 /^subdir *=.*/s/=.*/= runtime-po/ 1001 /^subdir *=.*/s/=.*/= runtime-po/
602 /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ 1002 /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
603 /^XGETTEXT_OPTIONS *=/{ 1003 /^XGETTEXT_OPTIONS *=/{
604 s/$/ \\/ 1004 s/$/ \\/
605 a\ 1005 a\
606 '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} 1006 '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
607 } 1007 }
608 ' <po/Makevars.template >runtime-po/Makevars 1008 ' po/Makevars.template >runtime-po/Makevars \
1009 || die 'cannot generate runtime-po/Makevars'
609 1010
610 # Copy identical files from po to runtime-po. 1011 # Copy identical files from po to runtime-po.
611 (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) 1012 (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po)
612 fi 1013 fi
613fi 1014fi
614 1015
1016bootstrap_epilogue
1017
615echo "$0: done. Now you can run './configure'." 1018echo "$0: done. Now you can run './configure'."
1019
1020# Local variables:
1021# eval: (add-hook 'write-file-hooks 'time-stamp)
1022# time-stamp-start: "scriptversion="
1023# time-stamp-format: "%:y-%02m-%02d.%02H"
1024# time-stamp-time-zone: "UTC"
1025# time-stamp-end: "; # UTC"
1026# End:
diff --git a/gint b/gint
Subproject b39efd37a7fbf478072c72f82b4310c8620a4ce Subproject fd86bf7d44b0c970771830692ae7491447ebe8b
diff --git a/gnulib b/gnulib
new file mode 160000
Subproject 36d982f39b683d0266b9c6ff1e01cbfc94bd97f
diff --git a/scheme/idest/batch/setlyrics.scm b/scheme/idest/batch/setlyrics.scm
index b41cb5b..ad4dd2d 100644
--- a/scheme/idest/batch/setlyrics.scm
+++ b/scheme/idest/batch/setlyrics.scm
@@ -72,7 +72,7 @@
72 ((< (length (command-line)) 2) 72 ((< (length (command-line)) 2)
73 (format (current-error-port) 73 (format (current-error-port)
74 "usage: idest -S ~A [OPTIONS] FILE...\n\ 74 "usage: idest -S ~A [OPTIONS] FILE...\n\
75ry `idest -S ~A --help', for more info.\n" 75Try `idest -S ~A --help', for more info.\n"
76 progname progname) 76 progname progname)
77 (exit 1))) 77 (exit 1)))
78 78
diff --git a/src/Makefile.am b/src/Makefile.am
index bd06dbf..2c34303 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -29,7 +29,14 @@ idest_SOURCES=\
29 slist.c 29 slist.c
30BUILT_SOURCES=cmdline.h frametab.c 30BUILT_SOURCES=cmdline.h frametab.c
31EXTRA_DIST=cmdline.opt getopt.m4 31EXTRA_DIST=cmdline.opt getopt.m4
32INCLUDES=-I$(top_srcdir)/gnu -I$(top_builddir)/gnu -I$(top_srcdir)/libid3tag @GUILE_INCLUDES@ 32AM_CPPFLAGS = \
33 -DGUILE_SITE=\"@GUILE_SITE@\"\
34 -DPKG_SITE=\"$(sitedir)\"\
35 -DVERSION_SITE=\"$(sitedir)/$(VERSION)\"\
36 -I$(top_srcdir)/gnu\
37 -I$(top_builddir)/gnu\
38 -I$(top_srcdir)/libid3tag\
39 @GUILE_INCLUDES@
33LDADD=../gnu/libgnu.a ../libid3tag/libid3tag.a -lz @GUILE_LIBS@ 40LDADD=../gnu/libgnu.a ../libid3tag/libid3tag.a -lz @GUILE_LIBS@
34SUFFIXES=.opt .c .h 41SUFFIXES=.opt .c .h
35 42
@@ -49,7 +56,3 @@ sitedir = @GUILE_SITE@/$(PACKAGE)
49site_DATA= 56site_DATA=
50include ../gint/gint.mk 57include ../gint/gint.mk
51 58
52AM_CPPFLAGS=\
53 -DGUILE_SITE=\"@GUILE_SITE@\"\
54 -DPKG_SITE=\"$(sitedir)\"\
55 -DVERSION_SITE=\"$(sitedir)/$(VERSION)\"
diff --git a/tests/atlocal.in b/tests/atlocal.in
index a302b99..35ad063 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -10,5 +10,6 @@ trap "cleanup; test -r $XFAILFILE && cat $XFAILFILE; exit $?" 1 2 13 15
10 10
11GUILE_VERSION="@GUILE_VERSION@" 11GUILE_VERSION="@GUILE_VERSION@"
12INSTALL_PROG="@INSTALL@" 12INSTALL_PROG="@INSTALL@"
13 13GUILE_AUTO_COMPILE=0
14export GUILE_AUTO_COMPILE
14 15
diff --git a/tests/delcomm.at b/tests/delcomm.at
index f263061..236f05a 100644
--- a/tests/delcomm.at
+++ b/tests/delcomm.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,11 @@ AT_SETUP([examples: delcomm])
18AT_KEYWORDS([script examples delcomm]) 18AT_KEYWORDS([script examples delcomm])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file1 -s $abs_srcdir/id3v1 10k 22genfile -f file1 -s $abs_srcdir/id3v1 10k
23genfile -f file2 -p $abs_srcdir/id3v2 10k 23genfile -f file2 -p $abs_srcdir/id3v2 10k
24 24
25idest -N -S $abs_top_srcdir/examples/delcomm.scm file1 file2 25idest -N -S $abs_top_srcdir/examples/delcomm.scm file1 file2])
26echo file1 26echo file1
27idest -a file1 27idest -a file1
28echo file2 28echo file2
diff --git a/tests/fmt-shortlist.at b/tests/fmt-shortlist.at
index 925646c..d529d84 100644
--- a/tests/fmt-shortlist.at
+++ b/tests/fmt-shortlist.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,11 @@ AT_SETUP([formats: shortlist])
18AT_KEYWORDS([script format shortlist]) 18AT_KEYWORDS([script format shortlist])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22
23genfile -f file1 -s $abs_srcdir/id3v1 10k 22genfile -f file1 -s $abs_srcdir/id3v1 10k
24genfile -f file2 -p $abs_srcdir/id3v2 10k 23genfile -f file2 -p $abs_srcdir/id3v2 10k
25 24
26idest -N -p $abs_top_srcdir/scheme --format shortlist file1 file2 25idest -N -p $abs_top_srcdir/scheme --format shortlist file1 file2])
27], 26],
28[0], 27[0],
29[file1: File by Sergey Poznyakoff, 2011 28[file1: File by Sergey Poznyakoff, 2011
diff --git a/tests/framelist00.at b/tests/framelist00.at
index 894d0f0..1faaeb0 100644
--- a/tests/framelist00.at
+++ b/tests/framelist00.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@ AT_SETUP([formats: framelist --full])
18AT_KEYWORDS([script format framelist--full framelist00]) 18AT_KEYWORDS([script format framelist--full framelist00])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file -p $abs_srcdir/id3v2 10k 22genfile -f file -p $abs_srcdir/id3v2 10k
23idest -N -p $abs_top_srcdir/scheme --format framelist --full file 23idest -N -p $abs_top_srcdir/scheme --format framelist --full file])
24], 24],
25[0], 25[0],
26[TIT2 descr="Title/songname/content description" 26[TIT2 descr="Title/songname/content description"
diff --git a/tests/framelist01.at b/tests/framelist01.at
index 59e5ca2..1e37262 100644
--- a/tests/framelist01.at
+++ b/tests/framelist01.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@ AT_SETUP([formats: framelist --frames])
18AT_KEYWORDS([script format framelist--frames framelist01]) 18AT_KEYWORDS([script format framelist--frames framelist01])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file -p $abs_srcdir/id3v2 10k 22genfile -f file -p $abs_srcdir/id3v2 10k
23idest -N -p $abs_top_srcdir/scheme --format framelist --frames TIT2,COMM,APIC file 23idest -N -p $abs_top_srcdir/scheme --format framelist --frames TIT2,COMM,APIC file])
24], 24],
25[0], 25[0],
26[TIT2 26[TIT2
diff --git a/tests/framelist02.at b/tests/framelist02.at
index c56d11e..6376ca7 100644
--- a/tests/framelist02.at
+++ b/tests/framelist02.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@ AT_SETUP([formats: framelist --single-line])
18AT_KEYWORDS([script format framelist--single-line framelist02]) 18AT_KEYWORDS([script format framelist--single-line framelist02])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file -p $abs_srcdir/id3v2 10k 22genfile -f file -p $abs_srcdir/id3v2 10k
23idest -N -p $abs_top_srcdir/scheme --format framelist --single-line file 23idest -N -p $abs_top_srcdir/scheme --format framelist --single-line file])
24], 24],
25[0], 25[0],
26[TIT2,TALB,TRCK,COMM,TPE1,TDRC,TCON,TCOP,TENC,USLT,WPUB,WXXX,WXXX,APIC,APIC 26[TIT2,TALB,TRCK,COMM,TPE1,TDRC,TCON,TCOP,TENC,USLT,WPUB,WXXX,WXXX,APIC,APIC
diff --git a/tests/list1.at b/tests/list1.at
index 80d869b..4464dfb 100644
--- a/tests/list1.at
+++ b/tests/list1.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,11 @@ AT_SETUP([examples: list1])
18AT_KEYWORDS([script examples list1]) 18AT_KEYWORDS([script examples list1])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22
23genfile -f file1 -s $abs_srcdir/id3v1 10k 22genfile -f file1 -s $abs_srcdir/id3v1 10k
24genfile -f file2 -p $abs_srcdir/id3v2 10k 23genfile -f file2 -p $abs_srcdir/id3v2 10k
25 24
26idest -N -S $abs_top_srcdir/examples/list1.scm file1 file2 25idest -N -S $abs_top_srcdir/examples/list1.scm file1 file2])
27], 26],
28[0], 27[0],
29[file1 28[file1
diff --git a/tests/list2.at b/tests/list2.at
index 73008c6..5bb082c 100644
--- a/tests/list2.at
+++ b/tests/list2.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,11 @@ AT_SETUP([examples: list2])
18AT_KEYWORDS([script examples list2]) 18AT_KEYWORDS([script examples list2])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22
23genfile -f file1 -s $abs_srcdir/id3v1 10k 22genfile -f file1 -s $abs_srcdir/id3v1 10k
24genfile -f file2 -p $abs_srcdir/id3v2 10k 23genfile -f file2 -p $abs_srcdir/id3v2 10k
25 24
26idest -N -S $abs_top_srcdir/examples/list2.scm TIT2,TALB,COMM,TENC file1 file2 25idest -N -S $abs_top_srcdir/examples/list2.scm TIT2,TALB,COMM,TENC file1 file2])
27], 26],
28[0], 27[0],
29[file1 28[file1
diff --git a/tests/lyrics00.at b/tests/lyrics00.at
index 0eefe05..1162398 100644
--- a/tests/lyrics00.at
+++ b/tests/lyrics00.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,10 +18,10 @@ AT_SETUP([formats: lyrics])
18AT_KEYWORDS([script format lyrics lyrics00]) 18AT_KEYWORDS([script format lyrics lyrics00])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file -p $abs_srcdir/id3v2 10k 22genfile -f file -p $abs_srcdir/id3v2 10k
23unset PAGER 23unset PAGER
24idest -N -p $abs_top_srcdir/scheme --format lyrics file 24idest -N -p $abs_top_srcdir/scheme --format lyrics file])
25], 25],
26[0], 26[0],
27[File 27[File
diff --git a/tests/pic00.at b/tests/pic00.at
index 1a177e3..8a97551 100644
--- a/tests/pic00.at
+++ b/tests/pic00.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,7 @@ AT_SETUP([formats: pic --help])
18AT_KEYWORDS([script format pic--help pic00]) 18AT_KEYWORDS([script format pic--help pic00])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([idest -N -p $abs_top_srcdir/scheme --format pic --help])
22idest -N -p $abs_top_srcdir/scheme --format pic --help
23], 22],
24[0], 23[0],
25[usage: idest --format=pic [[OPTIONS]] FILE... 24[usage: idest --format=pic [[OPTIONS]] FILE...
diff --git a/tests/pic01.at b/tests/pic01.at
index 4c01c32..a264186 100644
--- a/tests/pic01.at
+++ b/tests/pic01.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@ AT_SETUP([formats: pic --store])
18AT_KEYWORDS([script format pic--store pic01]) 18AT_KEYWORDS([script format pic--store pic01])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22genfile -f file -p $abs_srcdir/id3v2 10k 22genfile -f file -p $abs_srcdir/id3v2 10k
23idest -N -p $abs_top_srcdir/scheme --format pic --store --file ~N-~C.~T file 23idest -N -p $abs_top_srcdir/scheme --format pic --store --file ~N-~C.~T file])
24echo file-32x32 sample image.png 24echo file-32x32 sample image.png
25cmp "file-32x32 sample image.png" $abs_srcdir/idest-32.png 25cmp "file-32x32 sample image.png" $abs_srcdir/idest-32.png
26echo file-68x68 sample image.png 26echo file-68x68 sample image.png
diff --git a/tests/script00.at b/tests/script00.at
index 402e158..92b08ee 100644
--- a/tests/script00.at
+++ b/tests/script00.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@ AT_DATA([framelist.scm],[
29]) 29])
30 30
31AT_CHECK([ 31AT_CHECK([
32PREREQ_GUILE 32WITH_GUILE([
33genfile -f file1 -s $abs_srcdir/id3v1 10k 33genfile -f file1 -s $abs_srcdir/id3v1 10k
34genfile -f file2 -p $abs_srcdir/id3v2 10k 34genfile -f file2 -p $abs_srcdir/id3v2 10k
35 35
36idest -N -S ./framelist.scm file1 file2 36idest -N -S ./framelist.scm file1 file2])
37], 37],
38[0], 38[0],
39[file1 39[file1
diff --git a/tests/script01.at b/tests/script01.at
index e03aa41..64e185b 100644
--- a/tests/script01.at
+++ b/tests/script01.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ AT_DATA([framelist.scm],[
29]) 29])
30 30
31AT_CHECK([ 31AT_CHECK([
32PREREQ_GUILE 32WITH_GUILE([
33genfile -f file1 -s $abs_srcdir/id3v1 10k 33genfile -f file1 -s $abs_srcdir/id3v1 10k
34genfile -f file2 -p $abs_srcdir/id3v2 10k 34genfile -f file2 -p $abs_srcdir/id3v2 10k
35 35
@@ -38,7 +38,7 @@ idest -N -S framelist file1 file2
38echo In subdir 38echo In subdir
39mkdir subdir 39mkdir subdir
40mv framelist.scm subdir 40mv framelist.scm subdir
41idest -N -P `pwd`/subdir -S framelist file1 file2 41idest -N -P `pwd`/subdir -S framelist file1 file2])
42], 42],
43[0], 43[0],
44[In current working dir 44[In current working dir
diff --git a/tests/script02.at b/tests/script02.at
index 8eeee5c..0985f35 100644
--- a/tests/script02.at
+++ b/tests/script02.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -39,9 +39,9 @@ AT_DATA([.idest.scm],[
39]) 39])
40 40
41AT_CHECK([ 41AT_CHECK([
42PREREQ_GUILE 42WITH_GUILE([
43genfile -f file1 -s $abs_srcdir/id3v1 10k 43genfile -f file1 -s $abs_srcdir/id3v1 10k
44HOME=/tmp idest -S ./framelist.scm file1 | sed '4s|.*/idest/idest.scm|GUILE_SITE_DIR/idest/idest.scm|' 44HOME=/tmp idest -S ./framelist.scm file1 | sed '4s|.*/idest/idest.scm|GUILE_SITE_DIR/idest/idest.scm|'])
45], 45],
46[0], 46[0],
47[Startup file .idest.scm loaded 47[Startup file .idest.scm loaded
diff --git a/tests/script03.at b/tests/script03.at
index 040d7a2..4901169 100644
--- a/tests/script03.at
+++ b/tests/script03.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -26,9 +26,9 @@ AT_DATA([test.scm],[
26]) 26])
27 27
28AT_CHECK([ 28AT_CHECK([
29PREREQ_GUILE 29WITH_GUILE([
30genfile -f file -s $abs_srcdir/id3v1 10k 30genfile -f file -s $abs_srcdir/id3v1 10k
31idest -N -S ./test.scm 31idest -N -S ./test.scm])
32], 32],
33[0], 33[0],
34[file 34[file
diff --git a/tests/script04.at b/tests/script04.at
index 8c83b1f..0d6a0a7 100644
--- a/tests/script04.at
+++ b/tests/script04.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -28,10 +28,10 @@ AT_DATA([delpic.scm],[
28]) 28])
29 29
30AT_CHECK([ 30AT_CHECK([
31PREREQ_GUILE 31WITH_GUILE([
32genfile -f file -p $abs_srcdir/id3v2 10k 32genfile -f file -p $abs_srcdir/id3v2 10k
33echo removing APIC frames 33echo removing APIC frames
34idest -N -S ./delpic.scm file 34idest -N -S ./delpic.scm file])
35echo tags 35echo tags
36idest -a file 36idest -a file
37], 37],
diff --git a/tests/script05.at b/tests/script05.at
index eaa76c4..89ebfb1 100644
--- a/tests/script05.at
+++ b/tests/script05.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -28,12 +28,12 @@ AT_DATA([delpic.scm],[
28]) 28])
29 29
30AT_CHECK([ 30AT_CHECK([
31PREREQ_GUILE 31WITH_GUILE([
32genfile -f file -p $abs_srcdir/id3v2 10k 32genfile -f file -p $abs_srcdir/id3v2 10k
33cp file file.bak 33cp file file.bak
34echo removing APIC frames 34echo removing APIC frames
35idest -N -p $abs_top_srcdir/scheme -n -S delpic.scm file | 35idest -N -p $abs_top_srcdir/scheme -n -S delpic.scm file |
36 sed "s|$abs_top_srcdir|abs_top_srcdir|" 36 sed "s|$abs_top_srcdir|abs_top_srcdir|"])
37echo cmp 37echo cmp
38cmp file.bak file 38cmp file.bak file
39], 39],
diff --git a/tests/script06.at b/tests/script06.at
index 12f00e2..233466c 100644
--- a/tests/script06.at
+++ b/tests/script06.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,8 +18,8 @@ AT_SETUP([basic scripting: formats])
18AT_KEYWORDS([script format script06]) 18AT_KEYWORDS([script format script06])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22idest -N -p $abs_top_srcdir/scheme --format framelist $abs_srcdir/id3v2 22idest -N -p $abs_top_srcdir/scheme --format framelist $abs_srcdir/id3v2])
23], 23],
24[0], 24[0],
25[TIT2 25[TIT2
diff --git a/tests/script07.at b/tests/script07.at
index 2a5d3c7..99c9b95 100644
--- a/tests/script07.at
+++ b/tests/script07.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -28,11 +28,11 @@ AT_DATA([delpic.scm],
28]) 28])
29 29
30AT_CHECK([ 30AT_CHECK([
31PREREQ_GUILE 31WITH_GUILE([
32genfile -f file -p $abs_srcdir/id3v2 10k 32genfile -f file -p $abs_srcdir/id3v2 10k
33$INSTALL_PROG -d scheme/idest/batch 33$INSTALL_PROG -d scheme/idest/batch
34$INSTALL_PROG delpic.scm scheme/idest/batch 34$INSTALL_PROG delpic.scm scheme/idest/batch
35idest -N -p $abs_top_srcdir/scheme:`pwd`/scheme --batch delpic file 35idest -N -p $abs_top_srcdir/scheme:`pwd`/scheme --batch delpic file])
36idest -a file 36idest -a file
37], 37],
38[0], 38[0],
diff --git a/tests/script08.at b/tests/script08.at
index d48e470..8ff78f7 100644
--- a/tests/script08.at
+++ b/tests/script08.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ AT_DATA([delpic.scm],
28]) 28])
29 29
30AT_CHECK([ 30AT_CHECK([
31PREREQ_GUILE 31WITH_GUILE([
32genfile -f file -p $abs_srcdir/id3v2 10k 32genfile -f file -p $abs_srcdir/id3v2 10k
33cp file file.bak 33cp file file.bak
34$INSTALL_PROG -d scheme/idest/batch 34$INSTALL_PROG -d scheme/idest/batch
@@ -36,7 +36,7 @@ $INSTALL_PROG delpic.scm scheme/idest/batch
36echo dry run 36echo dry run
37subdir=`pwd`/scheme 37subdir=`pwd`/scheme
38idest -N -p $abs_top_srcdir/scheme:$subdir -n --batch delpic file | 38idest -N -p $abs_top_srcdir/scheme:$subdir -n --batch delpic file |
39 sed "s|$subdir|subdir|;s|$abs_top_srcdir|abs_top_srcdir|" 39 sed "s|$subdir|subdir|;s|$abs_top_srcdir|abs_top_srcdir|"])
40echo cmp 40echo cmp
41cmp file.bak file 41cmp file.bak file
42], 42],
diff --git a/tests/setlyrics.at b/tests/setlyrics.at
index 2b9f983..dba8090 100644
--- a/tests/setlyrics.at
+++ b/tests/setlyrics.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -31,10 +31,10 @@ manipulating ID3 tags and to apply them to any number of files.
31]) 31])
32 32
33AT_CHECK([ 33AT_CHECK([
34PREREQ_GUILE 34WITH_GUILE([
35genfile -f file 10k 35genfile -f file 10k
36idest -N -p $abs_top_srcdir/scheme --batch \ 36idest -N -p $abs_top_srcdir/scheme --batch \
37 setlyrics --lang eng -c 'sample lyrics' -f input file 37 setlyrics --lang eng -c 'sample lyrics' -f input file])
38idest -a file | sed 's/ *$//' 38idest -a file | sed 's/ *$//'
39], 39],
40[0], 40[0],
diff --git a/tests/setpic.at b/tests/setpic.at
index 82642cb..e8ef343 100644
--- a/tests/setpic.at
+++ b/tests/setpic.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -19,10 +19,10 @@ AT_KEYWORDS([script batch setpic])
19 19
20 20
21AT_CHECK([ 21AT_CHECK([
22PREREQ_GUILE 22WITH_GUILE([
23genfile -f file 10k 23genfile -f file 10k
24idest -N -p $abs_top_srcdir/scheme --batch \ 24idest -N -p $abs_top_srcdir/scheme --batch \
25 setpic -d '32x32 picture' -f $abs_srcdir/idest-32.png file 25 setpic -d '32x32 picture' -f $abs_srcdir/idest-32.png file])
26idest -a file | sed 's/ *$//' 26idest -a file | sed 's/ *$//'
27], 27],
28[0], 28[0],
diff --git a/tests/settitle.at b/tests/settitle.at
index bd71e79..7afb9db 100644
--- a/tests/settitle.at
+++ b/tests/settitle.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,11 +18,10 @@ AT_SETUP([examples: settitle])
18AT_KEYWORDS([script examples settitle]) 18AT_KEYWORDS([script examples settitle])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22
23genfile -f Test_file_for_idest.mp3 10k 22genfile -f Test_file_for_idest.mp3 10k
24idest -N -S $abs_top_srcdir/examples/settitle.scm Test_file_for_idest.mp3 23idest -N -S $abs_top_srcdir/examples/settitle.scm Test_file_for_idest.mp3
25idest -a Test_file_for_idest.mp3 24idest -a Test_file_for_idest.mp3])
26], 25],
27[0], 26[0],
28[TIT2: Test file for idest 27[TIT2: Test file for idest
diff --git a/tests/shortlist.at b/tests/shortlist.at
index cb13aba..b4c25c2 100644
--- a/tests/shortlist.at
+++ b/tests/shortlist.at
@@ -1,5 +1,5 @@
1# This file is part of idest -*- autotest -*- 1# This file is part of idest -*- autotest -*-
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -18,12 +18,11 @@ AT_SETUP([examples: shortlist])
18AT_KEYWORDS([script examples shortlist]) 18AT_KEYWORDS([script examples shortlist])
19 19
20AT_CHECK([ 20AT_CHECK([
21PREREQ_GUILE 21WITH_GUILE([
22
23genfile -f file1 -s $abs_srcdir/id3v1 10k 22genfile -f file1 -s $abs_srcdir/id3v1 10k
24genfile -f file2 -p $abs_srcdir/id3v2 10k 23genfile -f file2 -p $abs_srcdir/id3v2 10k
25 24
26idest -N -S $abs_top_srcdir/examples/shortlist.scm file1 file2 25idest -N -S $abs_top_srcdir/examples/shortlist.scm file1 file2])
27], 26],
28[0], 27[0],
29[file1: File by Sergey Poznyakoff, 2011 28[file1: File by Sergey Poznyakoff, 2011
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 196567d..1168a52 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,5 +1,5 @@
1# This file is part of idest 1# This file is part of idest
2# Copyright (C) 2011 Sergey Poznyakoff 2# Copyright (C) 2011, 2015 Sergey Poznyakoff
3# 3#
4# Idest is free software; you can redistribute it and/or modify 4# Idest is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,11 @@ m4_version_prereq([2.52g])
19m4_define([AT_SKIP_TEST],[exit 77]) 19m4_define([AT_SKIP_TEST],[exit 77])
20 20
21m4_define([PREREQ_GUILE],[test -z "$GUILE_VERSION" && AT_SKIP_TEST]) 21m4_define([PREREQ_GUILE],[test -z "$GUILE_VERSION" && AT_SKIP_TEST])
22m4_define([WITH_GUILE],[PREREQ_GUILE
23($1) 2>stderr.log
24sed '/^;;; /d' stderr.log >&2
25rm stderr.log
26])
22 27
23dnl # Begin tests 28dnl # Begin tests
24 29

Return to:

Send suggestions and report system problems to the System administrator.