tar: fix current_block confusion
[tar.git] / bootstrap.conf
blobb2bfc0eb843a1f836ea5f7f074569fe203f95a7b
1 # Bootstrap configuration for GNU tar.
3 # Copyright 2006-2024 Free Software Foundation, Inc.
5 # This file is part of GNU tar.
7 # GNU tar is free software; you can redistribute it and/or modify
8 # 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
10 # (at your option) any later version.
12 # GNU tar is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 # GNU General Public License for more details.
17 # 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 source_base=gnu
21 gnulib_name=libgnu
23 # We don't need these modules, even though gnulib-tool ordinarily
24 # includes them because of dependencies on the modules 'exclude’ and 'regex'.
25 avoided_gnulib_modules='
26         --avoid=lock
27         --avoid=mbuiter
28         --avoid=mbuiterf
32 # Additional xgettext options to use.  Use "\\\newline" to break lines.
33 XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
34  --flag=_:1:pass-c-format\\\
35  --flag=N_:1:pass-c-format\\\
36  --flag=error:3:c-format --flag=error_at_line:5:c-format\\\
37  --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\
38  --flag=argp_error:2:c-format\\\
39  --flag=__argp_error:2:c-format\\\
40  --flag=argp_failure:4:c-format\\\
41  --flag=__argp_failure:4:c-format\\\
42  --flag=argp_fmtstream_printf:2:c-format\\\
43  --flag=__argp_fmtstream_printf:2:c-format\\\
46 # Gettext supplies these files, but we don't need them since
47 # we don't have an intl subdirectory.
48 excluded_files='
49     m4/glibc2.m4
50     m4/intdiv0.m4
51     m4/lcmessage.m4
52     m4/lock.m4
53     m4/printf-posix.m4
54     m4/uintmax_t.m4
55     m4/ulonglong.m4
56     m4/visibility.m4
59 # Read local configuration file
60 if [ -r .bootstrap ]; then
61   echo "$0: Reading configuration file .bootstrap"
62   eval set -- "`sed 's/#.*$//;/^$/d' .bootstrap | tr '\n' ' '` $*"
65 bootstrap_post_pull_hook() {
66   mkdir -p m4 $source_base
67   git submodule init
68   git submodule update
71 PAXUTILS=paxutils
73 # gnulib modules used by this package.
74 # getopt-gnu is for paxutils.
75 gnulib_modules="$avoided_gnulib_modules
76 `grep -h '^[^#]' gnulib.modules`
77 getopt-gnu
80 # copy_files srcdir dstdir
81 copy_files() {
82   for file in `cat $1/DISTFILES`
83   do
84     case $file in
85     "#*")  continue;;
86     esac
87     dst=`echo $file | sed 's^.*/^^'`
88     if [ $# -eq 3 ]; then
89       case $dst in
90       ${3}*) ;;
91       *) dst=${3}$dst;;
92       esac
93     fi
94     if [ "$2" = '.' ]; then
95       ln -sf $1/$file $2
96     else
97       symlink_to_dir "$1" "$file" "$2/$dst" || exit
98     fi
99 # FIXME    ignorefile $2 $dst
100   done
103 bootstrap_post_import_hook() {
105   test -f ChangeLog || cat > ChangeLog <<EOT
106 This file is a placeholder. It will be replaced with the actual ChangeLog
107 by make dist.  Run make ChangeLog if you wish to create it earlier.
110   # Import from paxutils
111   copy_files ${PAXUTILS} .
112   copy_files ${PAXUTILS}/am m4
114   echo "$0: Creating m4/paxutils.m4"
115   (echo "# This file is generated automatically. Please, do not edit."
116    echo "#"
117    echo "AC_DEFUN([${package}_PAXUTILS],["
118    cat ${PAXUTILS}/am/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
119    echo "])") > ./m4/paxutils.m4
120   #FIXME ignorefile m4 paxutils.m4
122   mkdir -p rmt
124   for dir in doc rmt lib tests; do
125     copy_files ${PAXUTILS}/$dir $dir
126   done
128   copy_files ${PAXUTILS}/paxlib lib pax