aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--.gitmodules6
-rw-r--r--README-hacking18
-rwxr-xr-xbootstrap1117
-rw-r--r--bootstrap.conf63
m---------gnulib0
m---------paxutils0
-rw-r--r--po/.gitignore9
-rw-r--r--src/copyin.c2
-rw-r--r--src/util.c4
-rw-r--r--tests/symlink-bad-length.at2
11 files changed, 786 insertions, 437 deletions
diff --git a/.gitignore b/.gitignore
index f1bcbd1..ea5bcba 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,9 +25,7 @@ config.status
25configure 25configure
26core 26core
27gnu 27gnu
28gnulib
29lib 28lib
30m4 29m4
31paxutils
32rmt 30rmt
33stamp-h1 31stamp-h1
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..1dc373d
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,6 @@
1[submodule "gnulib"]
2 path = gnulib
3 url = git://git.sv.gnu.org/gnulib.git
4[submodule "paxutils"]
5 path = paxutils
6 url = git://git.sv.gnu.org/paxutils.git
diff --git a/README-hacking b/README-hacking
index 4b15efc..4471e91 100644
--- a/README-hacking
+++ b/README-hacking
@@ -12,7 +12,6 @@ version.
12- Autoconf <http://www.gnu.org/software/autoconf/> 12- Autoconf <http://www.gnu.org/software/autoconf/>
13- M4 <http://www.gnu.org/software/m4/> 13- M4 <http://www.gnu.org/software/m4/>
14- Texinfo <http://www.gnu.org/software/texinfo> 14- Texinfo <http://www.gnu.org/software/texinfo>
15- Gnulib <http://www.gnu.org/software/gnulib>
16- Git <http://git.or.cz> 15- Git <http://git.or.cz>
17 16
18* Bootstrapping 17* Bootstrapping
@@ -33,23 +32,14 @@ Once done, proceed as described in the file README (section
33INSTALLATION). 32INSTALLATION).
34 33
35Normally you will have to run bootstrap only once. However, if you 34Normally you will have to run bootstrap only once. However, if you
36intend to hack on GNU cpio, you might need to run it again later. In 35intend to hack on GNU cpio, you might need to run it again later.
37this case, you will probably want to save some time and bandwidth by 36There are several options that you may find useful in this case.
38avoiding downloading the same files again. If so, create in GNU cpio 37See 'bootstrap --help' for a detailed list.
39root directory the file named `.bootstrap' with the following
40contents:
41
42 --gnulib-srcdir=$HOME/gnulib --paxutils-srcdir=$HOME/paxutils
43
44Replace `$HOME/gnulib' and $HOME/paxutils with the actual directory
45where the Gnulib and Paxutils sources reside.
46
47For more information about `bootstrap', run `bootstrap --help'.
48 38
49 39
50* Copyright information 40* Copyright information
51 41
52 Copyright (C) 2007-2010, 2014 Free Software Foundation, Inc. 42 Copyright (C) 2007-2010, 2014-2015 Free Software Foundation, Inc.
53 43
54 Permission is granted to anyone to make or distribute verbatim copies 44 Permission is granted to anyone to make or distribute verbatim copies
55 of this document as received, in any medium, provided that the 45 of this document as received, in any medium, provided that the
diff --git a/bootstrap b/bootstrap
index aeb46e0..5e318e4 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,8 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Print a version string.
3scriptversion=2015-08-24.08; # 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-2010, 2014 Free Software Foundation, Inc. 7# Copyright (C) 2003-2015 Free Software Foundation, Inc.
6 8
7# This program 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
@@ -17,7 +19,15 @@
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 this program. 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 and Sergey Poznyakoff. 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,41 +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 --paxutils-srcdir=DIRNAME Specify the local directory where paxutils 56 --gnulib-srcdir=DIRNAME specify the local directory where gnulib
43 sources reside. Use this if you already
44 have paxutils sources on your machine, and
45 do not want to waste your bandwidth dowloading
46 them again.
47 --gnulib-srcdir=DIRNAME Specify the local directory where gnulib
48 sources reside. Use this if you already 57 sources reside. Use this if you already
49 have gnulib sources on your machine, and 58 have gnulib sources on your machine, and
50 do not want to waste your bandwidth downloading 59 do not want to waste your bandwidth downloading
51 them again. 60 them again. Defaults to \$GNULIB_SRCDIR
52 --copy Copy files instead of creating symbolic links. 61 --bootstrap-sync if this bootstrap script is not identical to
53 --force Attempt to bootstrap even if the sources seem 62 the version in the local gnulib sources,
54 not to have been checked out. 63 update this script, and then restart it with
55 --skip-po Do not download po files. 64 /bin/sh or the shell \$CONFIG_SHELL
56 65 --no-bootstrap-sync do not check whether bootstrap is out of sync
57If the file $0.conf exists in the same directory as this script, 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
58contents are read as shell variables to configure the bootstrap. 74contents are read as shell variables to configure the bootstrap.
59 75
76For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
77are honored.
78
60Running without arguments will suffice in most cases. 79Running without arguments will suffice in most cases.
61" 80EOF
62} 81}
63 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
105}
106
107# die WORD1...
108die() { warn_ "$@"; exit 1; }
109
64# Configuration. 110# Configuration.
65 111
66# Name of the Makefile.am 112# Name of the Makefile.am
@@ -72,18 +118,51 @@ gnulib_modules=
72# Any gnulib files needed that are not in modules. 118# Any gnulib files needed that are not in modules.
73gnulib_files= 119gnulib_files=
74 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
75# 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
76# 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
77# 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
78# 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
79# all symlinks. 136# all symlinks.
80po_download_command_format=\ 137po_download_command_format=\
81"rsync -Lrtvz 'translationproject.org::tp/latest/%s/' '%s'" 138"rsync --delete --exclude '*.s1' -Lrtvz \
82 139 'translationproject.org::tp/latest/%s/' '%s'"
83extract_package_name='divert(-1)[]changequote([,])[]define([AC_INIT],[divert(0)[]patsubst([$1],[GNU ],[])[]divert(-1)])' 140
84 141# Fallback for downloading .po files (if rsync fails).
85package=`echo $extract_package_name | m4 - configure.ac` || exit