diff options
author | Karl Berry <karl@freefriends.org> | 2019-06-06 22:21:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-06-06 22:21:33 +0000 |
commit | b1f25da6362d2bb38aa5b1eaea73a4609b0c906b (patch) | |
tree | 799a16a4f0005dd1f676064f99caa6b5ab9d5a51 /Build/source | |
parent | a49413506f5b7b1cf775e17dc08cf373a9db023b (diff) |
build-info.sh script to create Work/buildinfo.log
git-svn-id: svn://tug.org/texlive/trunk@51335 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source')
-rwxr-xr-x | Build/source/Build | 33 | ||||
-rw-r--r-- | Build/source/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/Makefile.am | 27 | ||||
-rw-r--r-- | Build/source/Makefile.in | 23 | ||||
-rwxr-xr-x | Build/source/doc/build-info.sh | 27 |
5 files changed, 105 insertions, 14 deletions
diff --git a/Build/source/Build b/Build/source/Build index 3189b44167d..f71d515f70f 100755 --- a/Build/source/Build +++ b/Build/source/Build @@ -71,9 +71,6 @@ if test "x$1" = x--debug || test "x$1" = x-g; then TL_BUILD_ENV="$c $cxx $objcxx $TL_BUILD_ENV" fi -# allow override of configure location. -: ${TL_CONFIGURE=../configure} - # allow for changing the banner identification, e.g., # --with-banner-add='/SomeDistro'; see the build doc. : ${TL_CONF_BANNER=} @@ -91,6 +88,9 @@ fi # allow override of xdvi toolkit, default to standard xaw. : ${TL_CONF_XDVI_TOOLKIT=--with-xdvi-x-toolkit=xaw} +# allow override of configure location. +: ${TL_CONFIGURE=../configure} + # allow adding arbitrary other configure args, after all the others. : ${TL_CONFIGURE_ARGS=} @@ -109,12 +109,33 @@ cd $TL_WORKDIR || exit 1 # failure at either step. { echo "starting TeX Live build at `date`" - echo "on `uname -a`" - echo "in `pwd`" - echo "$0 $*" + echo "uname: `uname -a`" + test -s /etc/issue && echo "/etc/issue: `sed 1q /etc/issue`" + echo "pwd: `pwd`" + echo "cmdline: $0 $*" echo env | sort >buildenv.log # + # Export the interesting TL_* variables that might be set, + # so they can be logged by build-info. + TL_BUILD_COMMAND_LINE="$0 $*"; export TL_BUILD_COMMAND_LINE + test -z "$TL_BUILD_ENV" || export TL_BUILD_ENV + test -z "$TL_COMPILER_GFLAGS" || export TL_COMPILER_GFLAGS + test -z "$TL_CONF_BANNER" || export TL_CONF_BANNER + test -z "$TL_CONF_LARGEFILE" || export TL_CONF_LARGEFILE + test -z "$TL_CONF_MISSING" || export TL_CONF_MISSING + test -z "$TL_CONF_SHARED" || export TL_CONF_SHARED + test -z "$TL_CONF_XDVI_TOOLKIT" || export TL_CONF_XDVI_TOOLKIT + test -z "$TL_CONFIGURE" || export TL_CONFIGURE + test -z "$TL_CONFIGURE_ARGS" || export TL_CONFIGURE_ARGS + test -z "$TL_INSTALL_DEST" || export TL_INSTALL_DEST + test -z "$TL_MAKE" || export TL_MAKE + test -z "$TL_MAKE_FLAGS" || export TL_MAKE_FLAGS + test -z "$TL_MAKE_VERBOSE" || export TL_MAKE_VERBOSE + test -z "$TL_POSTCONFIGURE" || export TL_POSTCONFIGURE + test -z "$TL_TARGET" || export TL_TARGET + test -z "$TL_WORKDIR" || export TL_WORKDIR + # set -vx # show the configure and make commands in the log. eval $TL_BUILD_ENV $TL_CONFIGURE \ diff --git a/Build/source/ChangeLog b/Build/source/ChangeLog index 7d340a90256..f09ca0fb9ff 100644 --- a/Build/source/ChangeLog +++ b/Build/source/ChangeLog @@ -1,3 +1,12 @@ +2019-06-06 Karl Berry <karl@tug.org> + + * Makefile.am (world): make build-info. + (build-info): new target to invoke doc/build-info.sh. + (build_info_target): new variable. + * Build: export TL_* variables so build-info.sh can report them. + * doc/build-info.sh: new script to report compiler versions, + dump environment, config.status, etc. + 2019-05-03 Karl Berry <karl@tug.org> * version.ac: 2020/dev. diff --git a/Build/source/Makefile.am b/Build/source/Makefile.am index 388c89aed78..dee82b40479 100644 --- a/Build/source/Makefile.am +++ b/Build/source/Makefile.am @@ -42,25 +42,40 @@ recurse_top = include $(srcdir)/am/recurse.am -# This is the default target for the Build script in TeX Live. +# This (world) is the default target for the ./Build script in TeX Live. .PHONY: world # Run texlinks here since the binaries won't be there # at install-data, and fmtutil.cnf won't be there at install-exec, # and there is no install-hook or install-local. texlinks_dir = texk/texlive/tl_scripts world: all -## Serialize 'make all' and 'make install-strip'. + @echo "top-level make $@: running $(build_info_target)..." + $(MAKE) $(AM_MAKEFLAGS) $(build_info_target) +# +# Serialize 'make all' and 'make install-strip'. @echo "top-level make $@: running install-strip..." $(MAKE) $(AM_MAKEFLAGS) install-strip -## - @echo "top-level make $@: running texlinks in $(texlinks_dir) ..." +# + @echo "top-level make $@: making run-texlinks in $(texlinks_dir) ..." cd $(texlinks_dir) && $(MAKE) $(AM_MAKEFLAGS) run-texlinks -## +# @echo "top-level make $@: running $(check_target)..." $(MAKE) $(AM_MAKEFLAGS) $(check_target) -## +# @echo "top-level make $@ done." +# create file buildinfo.log in working directory, to record relevant +# information about the build environment. +build-info: + -env MAKE="$(MAKE)" LDFLAGS="$(LDFLAGS)" \ + CC="$(CC)" CFLAGS="$(CFLAGS)" \ + CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ + OBJC="$(OBJC)" OBJCXXFLAGS="$(OBJCXXFLAGS)" \ + $(srcdir)/doc/build-info.sh >buildinfo.log + +# should be harmless to run that, but just in case: +build_info_target = build-info + install-exec-hook: @echo "WARNING: make install does not result in a usable TeX!" @echo " ! The binaries require the myriad support files." diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index 91556fa9aef..9160a978016 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -513,6 +513,9 @@ CONFIG_AUX = $(recurse_top)subsubdir-conf.cmd # at install-data, and fmtutil.cnf won't be there at install-exec, # and there is no install-hook or install-local. texlinks_dir = texk/texlive/tl_scripts + +# should be harmless to run that, but just in case: +build_info_target = build-info @cross_FALSE@check_target = check # Allow for skipping make check if needed. @@ -1029,17 +1032,33 @@ $(CONFIG_AUX): @echo "configure in $(recurse_top)auxdir/auxsub failed to create the file $@" exit 1 -# This is the default target for the Build script in TeX Live. +# This (world) is the default target for the ./Build script in TeX Live. .PHONY: world world: all + @echo "top-level make $@: running $(build_info_target)..." + $(MAKE) $(AM_MAKEFLAGS) $(build_info_target) +# +# Serialize 'make all' and 'make install-strip'. @echo "top-level make $@: running install-strip..." $(MAKE) $(AM_MAKEFLAGS) install-strip - @echo "top-level make $@: running texlinks in $(texlinks_dir) ..." +# + @echo "top-level make $@: making run-texlinks in $(texlinks_dir) ..." cd $(texlinks_dir) && $(MAKE) $(AM_MAKEFLAGS) run-texlinks +# @echo "top-level make $@: running $(check_target)..." $(MAKE) $(AM_MAKEFLAGS) $(check_target) +# @echo "top-level make $@ done." +# create file buildinfo.log in working directory, to record relevant +# information about the build environment. +build-info: + -env MAKE="$(MAKE)" LDFLAGS="$(LDFLAGS)" \ + CC="$(CC)" CFLAGS="$(CFLAGS)" \ + CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ + OBJC="$(OBJC)" OBJCXXFLAGS="$(OBJCXXFLAGS)" \ + $(srcdir)/doc/build-info.sh >buildinfo.log + install-exec-hook: @echo "WARNING: make install does not result in a usable TeX!" @echo " ! The binaries require the myriad support files." diff --git a/Build/source/doc/build-info.sh b/Build/source/doc/build-info.sh new file mode 100755 index 00000000000..b67875419e5 --- /dev/null +++ b/Build/source/doc/build-info.sh @@ -0,0 +1,27 @@ +#!/bin/sh +# $Id$ +# Report build environment; run from top-level Makefile so any make +# overrides will be taken into account. + +printf 'uname\t"%s"\n' "`uname -a`" +test -s /etc/issue \ +&& printf 'issue\t"%s"\n' "`sed 1q /etc/issue`" +# bsd doesn't have /etc/issue, but seems sufficiently identified by uname. + +printf 'MAKE-v\t"%s"\n' "`${MAKE-make} -v 2>&1 | sed 1q`" +# BSD make does not give version info with -v, but the +# first line of the usage message is a sort of identifier. + +# our configure defaults to using gcc and g++. +printf 'CC-v\t"%s"\n' "`${CC-gcc} --version 2>&1 | sed 1q`" +printf 'CXX-v\t"%s"\n' "`${CXX-g++} --version 2>&1 | sed 1q`" + +# dump whole environment to be sure we get anything relevant, +# although it will surely include many irrelevancies. +env | sort -f + +# the whole configure line and more. +test -s config.status \ +&& (printf 'CONFIG_STATUS\n'; ./config.status --version) + +exit 0 |