[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a saner bootstrap script
From: |
Jim Meyering |
Subject: |
Re: a saner bootstrap script |
Date: |
Sat, 15 Oct 2011 23:15:06 +0200 |
Gary V. Vaughan wrote:
> Hi Pádraig, Jim,
>
> Is there anything else I can do to help you incorporate this, and the
> matching bootstrap.conf I wrote for you into coreutils now that the
> release is out?
Hi Gary,
Thanks for persevering. I have just tried it.
It looks like your coreutils working directory must have contained
an intl/ directory, but most people don't have that. Since I don't
have one, I get lots of these when compiling in lib/:
cc1: error: ../intl: No such file or directory [-Werror]
Merely creating the directory gets past that, and the build
did complete, but obviously I don't want to have to do that.
I used AM_GNU_GETTEXT([external]... after all.
Not surprisingly, the part of the current bootstrap script that
takes care of that transformation is absent from your version:
- if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
- copied=$copied${sep}$gnulib_mk; sep=$nl
- remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
- sed "$remove_intl" $1/$dir/$file |
- cmp - $dir/$gnulib_mk > /dev/null || {
- echo "$me: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
- rm -f $dir/$gnulib_mk &&
- sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk &&
- gnulib_mk_hook $dir/$gnulib_mk
- }
- elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
- version_controlled_file $dir $file; then
- echo "$me: $dir/$file overrides $1/$dir/$file"
- else
- copied=$copied$sep$file; sep=$nl
- cp_mark_as_generated $1/$dir/$file $dir/$file
- fi || exit
Please make at least a token effort to minimize differences in
bootstrap.conf. That makes it a lot easier to compare to the original.
Here is a new version with fewer gratuitous white space changes and
that avoids changing the copyright header.
======================================================
# Bootstrap configuration.
# Copyright (C) 2006-2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
## -------------- ##
## Configuration. ##
## -------------- ##
# List of programs, minimum versions, and software urls required to
# bootstrap, maintain and release GNU coreutils.
# Build prerequisites
buildreq='
bison - http://www.gnu.org/s/bison
git 1.4.4 http://git-scm.com
gperf - http://www.gnu.org/s/gperf
gzip - http://www.gnu.org/s/gzip
makeinfo - http://www.gnu.org/s/texinfo
patch - http://www.gnu.org/s/patch
perl 5.5 http://perl.com
rsync - http://www.samba.org/rsync
tar - http://www.gnu.org/s/tar
xz - http://tukaani.org/xz
'
# Instructions on how to install packages in $buildreq.
buildreq_readme='README-prereq'
# File that should exist in the top directory of a checked out hierarchy,
# but not in a distribution tarball.
checkout_only_file='README-hacking'
# Non-default gnulib directory options.
gnulib_name=libcoreutils
gnulib_mk=gnulib.mk
local_gl_dir=gl
tests_base=gnulib-tests
# Additional gnulib-tool options to use.
gnulib_tool_options='
--no-changelog
--avoid=canonicalize-lgpl
--avoid=dummy
--with-tests
'
# gnulib modules used by this package.
gnulib_modules='
acl
alignof
alloca
announce-gen
areadlink-with-size
argmatch
argv-iter
assert
autobuild
backupfile
base64
c-strcase
c-strtod
c-strtold
calloc-gnu
canon-host
canonicalize
chown
cloexec
closein
closeout
config-h
configmake
crypto/md5
crypto/sha1
crypto/sha256
crypto/sha512
cycle-check
d-ino
d-type
di-set
diacrit
dirfd
dirname
do-release-commit-and-tag
dtoastr
dup2
environ
error
euidaccess
exclude
exitfail
faccessat
fadvise
fchdir
fclose
fcntl
fcntl-safer
fdl
fdutimensat
file-type
fileblocks
filemode
filenamecat
filevercmp
fnmatch-gnu
fopen-safer
fprintftime
freopen
freopen-safer
fseeko
fsusage
fsync
ftello
ftoastr
fts
full-read
full-write
getgroups
gethrxtime
getline
getloadavg
getndelim2
getopt-gnu
getpagesize
getpass-gnu
gettext
gettime
gettimeofday
getugroups
getusershell
git-version-gen
gitlog-to-changelog
gnu-make
gnu-web-doc-update
gnumakefile
gnupload
group-member
hard-locale
hash
hash-pjw
heap
host-os
human
idcache
ignore-value
inttostr
inttypes
isapipe
isblank
largefile
lchmod
lchown
ldtoastr
lib-ignore
linebuffer
link
link-follow
linkat
long-options
lstat
maintainer-makefile
malloc-gnu
manywarnings
mbrlen
mbrtowc
mbsalign
mbswidth
memcasecmp
memchr
memcmp2
mempcpy
memrchr
mgetgroups
mkancesdirs
mkdir
mkdir-p
mkstemp
mktime
modechange
mountlist
mpsort
netinet_in
nproc
obstack
parse-datetime
perl
physmem
posix-shell
posixtm
posixver
priv-set
progname
propername
pthread
putenv
quote
quotearg
randint
randperm
read-file
readlink
readtokens
readtokens0
readutmp
realloc-gnu
regex
remove
rename
rmdir
root-dev-ino
rpmatch
safe-read
same
save-cwd
savedir
savewd
selinux-at
settime
sig2str
sigaction
ssize_t
stat-macros
stat-size
stat-time
stdbool
stdlib-safer
stpcpy
stpncpy
strdup-posix
strftime
strsignal
strtod
strtoimax
strtoumax
symlink
sys_ioctl
sys_stat
sys_wait
termios
timer-time
timespec
tzset
uname
unicodeio
unistd-safer
unlink-busy
unlocked-io
unsetenv
update-copyright
uptime
useless-if-before-free
userspec
utimecmp
utimens
vasprintf-posix
vc-list-files
verify
verror
version-etc-fsf
wcwidth
wcswidth
winsz-ioctl
winsz-termios
write-any-file
xalloc
xfreopen
xgetcwd
xgetgroups
xgethostname
xmemcoll
xnanosleep
xprintf
xprintf-posix
xreadlink
xstrtod
xstrtoimax
xstrtol
xstrtold
xstrtoumax
yesno
'
# Other locale categories that need message catalogs.
extra_locale_categories=LC_TIME
# Additional options to xgettext.
xgettext_options=$xgettext_options'
--from-code=UTF-8
'
## --------------- ##
## Hook functions. ##
## --------------- ##
# coreutils_force_changelog
# -------------------------
# Automake requires that ChangeLog exist.
coreutils_force_changelog ()
{
$debug_cmd
touch ChangeLog || exit 1
}
func_add_hook func_gnulib_tool coreutils_force_changelog
# coreutils_cleanup_changelog
# ---------------------------
# Remove the empty ChangeLog we created earlier.
coreutils_cleanup_changelog ()
{
$debug_cmd
test -s Changelog || rm ChangeLog || exit 1
}
func_add_hook func_fini coreutils_cleanup_changelog
# coreutils_inject_makefile_macro_assignments
# -------------------------------------------
# Automatically ensure that we declare all the Automake variables
# assigned only with `+=' in the includable `gnulib.mk' files generated
# by `gnulib-tool'. This function doesn't maintain the `=' assignments
# in `Makefile.am', so you could end up with old unused entries if you
# don't prune the dead code regularly.
coreutils_inject_makefile_macro_assignments ()
{
$debug_cmd
# For all directories containing a `gnulib-tool' generated
# `$gnulib_mk'...
for dir in lib gnulib-tests
do
M="$dir/Makefile.am"
# Contains the path of a temporary file containing edited
# Makefile.am if changes were necessary.
T=
# Files in this directory that might append to macros.
files="$M"
if test x"$M" != "$dir/$gnulib_mk"; then
files="$files $dir/$gnulib_mk"
fi
# ...list each macro assigned with `+='...
for macro in `$SED -n 's|#.*$||
/ *+= */{
s| *+=.*$||
p
}' $files | sort -u`
do
# ...which is not first assigned with `=' in either `gnulib.mk'
# or 'Makefile.am' in the same directory...
if cat $files \
|$SED -e 's|#.*$||' \
|func_grep_q "^$macro *= *"; then :
else
func_verbose "injecting initial \`$macro =' to \`$M'"
# ...then inject an `=' assignment above the `include
# gnulib.mk' line.
test -n "$T" || {
T="${M}T$$"
trap 'x=$?; rm $T; exit $x' 1 2 13 15
$SED '/^include '"$gnulib_mk"'/,$d' "$M" > "$T"
}
echo "$macro =" >> "$T"
fi
done #/macro
# If we injected any macro assignments, tidy up our file droppings.
test x = "x$T" || {
func_echo "edited \`$M' (backup in \`$M~')"
$SED -n '/^include '"$gnulib_mk"'/,$p' "$M" >> "$T"
mv -f "$M" "$M~"
mv -f "$T" "$M"
trap - 1 2 13 15
}
done #/dir
}
func_add_hook func_gnulib_tool coreutils_inject_makefile_macro_assignments
# coreutils_optimise_po_makefile_grep
# -----------------------------------
# Since this is a "GNU" package, replace this line
# if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
# | grep -v 'libtool:' >/dev/null; then
# with this:
# if true; then
# Why? That pipeline searches all files in $(top_srcdir), and if you
# happen to have large files (or apparently large sparse files), the
# first grep may well run out of memory.
coreutils_optimise_po_makefile_grep ()
{
$debug_cmd
perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
po/Makefile.in.in
}
func_add_hook func_fini coreutils_optimise_po_makefile_grep
# Local variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "# bootstrap.conf (GNU coreutils) version "
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "$"
# End:
- Re: MacOS X 10.7 and gettext, (continued)
- Re: MacOS X 10.7 and gettext, Peter O'Gorman, 2011/10/05
- Re: MacOS X 10.7 and gettext, Gary V. Vaughan, 2011/10/05
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/05
- Re: a saner bootstrap script, Gary V . Vaughan, 2011/10/05
- Re: a saner bootstrap script, Pádraig Brady, 2011/10/06
- Re: a saner bootstrap script, Gary V . Vaughan, 2011/10/06
- Re: a saner bootstrap script, Pádraig Brady, 2011/10/06
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/06
- Re: a saner bootstrap script, Bruno Haible, 2011/10/06
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/15
- Re: a saner bootstrap script,
Jim Meyering <=
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/16
- Re: a saner bootstrap script, Bruno Haible, 2011/10/16
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/16
- [PATCH] Fix coreutils -Iintl vs gnulib gettext [WAS Re: a saner bootstrap script], Gary V. Vaughan, 2011/10/19
- Re: [PATCH] Fix coreutils -Iintl vs gnulib gettext [WAS Re: a saner bootstrap script], Jim Meyering, 2011/10/19
- Re: a saner bootstrap script, Gary V. Vaughan, 2011/10/20
- Re: a saner bootstrap script, Jim Meyering, 2011/10/20
- Re: a saner bootstrap script, Gary V . Vaughan, 2011/10/20
- Re: a saner bootstrap script, Jim Meyering, 2011/10/20
- Re: a saner bootstrap script, Bruno Haible, 2011/10/20