[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/6] Simplify and improve safety of bootstrap process.
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH 6/6] Simplify and improve safety of bootstrap process. |
Date: |
Tue, 31 Aug 2010 20:16:03 +0200 |
User-agent: |
Mutt/1.5.20 (2010-04-22) |
* Gary V. Vaughan wrote on Tue, Aug 31, 2010 at 08:43:20AM CEST:
> * Makefile.am (bootstrap_files): List files that need to be
> generated at bootstrap time before `./configure && make' can
> work. It turns out that this is considerably fewer files than we
> had thought necessary previously.
> (bootstrap-deps-prep): Ensure minimum set of required substitution
> variables are non-empty.
> (bootstrap-deps): Depend on `bootstrap' files.
> * bootstrap (Generate bootstrap dependencies): Now that
> `Makefile.am' is entirely responsible for rebuilding files at
> bootstrap time, we need only specify the new `bootstrap-deps'
> target, and supply values for the substitutions checked by
> `bootstrap-deps-prep'.
This is a fairly nice cleanup that I think is valuable to redo without
the other rejected patches. Please resubmit with nit below addressed,
and I will approve it then after looking over once more.
Thanks,
Ralf
> --- a/Makefile.am
> +++ b/Makefile.am
> +## Document the make macros that are needed to build bootstrap-deps
> +## dependencies when called from `bootstrap' (developer's machine),
> +## where the Makefile.am is fed to make in its raw format before
> +## `configure' has found the correct values (on the build machine).
> +bootstrap_files = \
> + $(auxdir)/ltmain.sh \
> + $(m4dir)/ltversion.m4 \
> + libltdl/Makefile.am
> +
> +.PHONY: bootstrap-deps bootstrap-deps-prep
> +bootstrap-deps: bootstrap-deps-prep $(bootstrap_files)
> +bootstrap-deps-prep:
> +## The following variables are substituted by `bootstrap-dep-preps'
> + @test -n "$(srcdir)" \
> + || echo "ERROR: don't call $(MAKE) with srcdir unset."
> + @test -n "$(M4SH)" \
> + || echo "ERROR: don't call $(MAKE) with M4SH unset."
> + @test -n "$(PACKAGE)" \
> + || echo "ERROR: don't call $(MAKE) with PACKAGE unset."
> + @test -n "$(PACKAGE_BUGREPORT)" \
> + || echo "ERROR: don't call $(MAKE) with PACKAGE_BUGREPORT unset."
> + @test -n "$(PACKAGE_NAME)" \
> + || echo "ERROR: don't call $(MAKE) with PACKAGE_NAME unset."
> + @test -n "$(PACKAGE_URL)" \
> + || echo "ERROR: don't call $(MAKE) with PACKAGE_URL unset."
> + @test -n "$(SED)" \
> + || echo "ERROR: don't call $(MAKE) with SED unset."
> + @test -n "$(VERSION)" \
> + || echo "ERROR: don't call $(MAKE) with VERSION unset."
> + rm -f $(bootstrap_files)
It would be nice if this rule would actually error out (i.e., have
nonzero exit status) if any of the variables were unset.
> -test -f clcommit.m4sh && $MAKE -f Makefile.maint ./commit \
> - srcdir=. top_srcdir=. PACKAGE="$package" VERSION="$version" \
> - M4SH="$AUTOM4TE -l m4sh" \
> - SED="$SED" GREP="$GREP" FGREP="$FGREP" EGREP="$EGREP" LN_S="$LN_S"
> +func_show_eval "$MAKE bootstrap-deps \
> +M4SH='$AUTOM4TE --language=m4sh' PACKAGE='$package' \
> +PACKAGE_BUGREPORT='$package_bugreport' PACKAGE_NAME='$package_name' \
> +PACKAGE_URL='$package_url' SED='$SED' srcdir=. VERSION='$version'"
For bootstrap, the func_show_eval from the rejected patch is probably
gotten just as easily by just 'set -x'; besides the fact that using eval
on this string is wrong.
- [PATCH 2/6] Fix partial commit support., (continued)
- [PATCH 2/6] Fix partial commit support., Gary V. Vaughan, 2010/08/31
- [PATCH 3/6] Support missing detached signatures, like gnulib implementation., Gary V. Vaughan, 2010/08/31
- [PATCH 4/6] Rewrite bootstrap script for consistency with our other shell code., Gary V. Vaughan, 2010/08/31
- [PATCH 6/6] Simplify and improve safety of bootstrap process., Gary V. Vaughan, 2010/08/31
- Re: [PATCH 6/6] Simplify and improve safety of bootstrap process.,
Ralf Wildenhues <=
- [PATCH 5/6] Don't leak developer GREP, SED etc into distribution file., Gary V. Vaughan, 2010/08/31
- Re: Backport non-gnulib dependent parts of my use-gnulib topic branch, Ralf Wildenhues, 2010/08/31