From 69210e3404429005409ef0824d1faa942a4a96e7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 22 Jun 2019 22:05:57 +0000 Subject: do buildinfo.sh first git-svn-id: svn://tug.org/texlive/trunk@51425 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/Build | 15 ++++++++------- Build/source/ChangeLog | 11 +++++++++++ Build/source/Makefile.am | 14 +++++++------- Build/source/Makefile.in | 14 +++++++------- Build/source/configure | 4 ++-- Build/source/doc/build-info.sh | 27 --------------------------- Build/source/doc/buildinfo.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 7 files changed, 75 insertions(+), 50 deletions(-) delete mode 100755 Build/source/doc/build-info.sh create mode 100755 Build/source/doc/buildinfo.sh (limited to 'Build/source') diff --git a/Build/source/Build b/Build/source/Build index f71d515f70f..d0854dd74c5 100755 --- a/Build/source/Build +++ b/Build/source/Build @@ -109,16 +109,16 @@ cd $TL_WORKDIR || exit 1 # failure at either step. { echo "starting TeX Live build at `date`" - echo "uname: `uname -a`" - test -s /etc/issue && echo "/etc/issue: `sed 1q /etc/issue`" - echo "pwd: `pwd`" - echo "cmdline: $0 $*" + printf 'CMDLINE\t"%s"\n' "$0 $*" + printf 'PWD\t"%s"\n' "`pwd`" + # + # output system info (will also be done by make, to buildinfo.log). + $mydir/doc/buildinfo.sh --no-config-status + echo "See also buildenv.log and buildinfo.log in `pwd`" 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 + # so they can be dumped to buildenv.log. 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 @@ -135,6 +135,7 @@ cd $TL_WORKDIR || exit 1 test -z "$TL_POSTCONFIGURE" || export TL_POSTCONFIGURE test -z "$TL_TARGET" || export TL_TARGET test -z "$TL_WORKDIR" || export TL_WORKDIR + env | sort >buildenv.log # set -vx # show the configure and make commands in the log. diff --git a/Build/source/ChangeLog b/Build/source/ChangeLog index f09ca0fb9ff..285a826080b 100644 --- a/Build/source/ChangeLog +++ b/Build/source/ChangeLog @@ -1,3 +1,14 @@ +2019-06-22 Karl Berry + + * doc/buildinfo.sh: rename from build-info.sh; + forget /etc/issue; + allow option to omit config.status output; + do not dump environment; + run lsb_release -a. We'll see ... + * Build: use buildinfo.sh instead of inline commands (mostly). + * Makefile.am (buildinfo): make dependency of all-recursive + so that it runs first; rename from build-info; remove from world. + 2019-06-06 Karl Berry * Makefile.am (world): make build-info. diff --git a/Build/source/Makefile.am b/Build/source/Makefile.am index dee82b40479..353dcecfc14 100644 --- a/Build/source/Makefile.am +++ b/Build/source/Makefile.am @@ -49,9 +49,6 @@ include $(srcdir)/am/recurse.am # and there is no install-hook or install-local. texlinks_dir = texk/texlive/tl_scripts 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 @@ -66,15 +63,18 @@ world: all # create file buildinfo.log in working directory, to record relevant # information about the build environment. -build-info: +buildinfo: -env MAKE="$(MAKE)" LDFLAGS="$(LDFLAGS)" \ CC="$(CC)" CFLAGS="$(CFLAGS)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ OBJC="$(OBJC)" OBJCXXFLAGS="$(OBJCXXFLAGS)" \ - $(srcdir)/doc/build-info.sh >buildinfo.log + $(srcdir)/doc/buildinfo.sh >buildinfo.log + +# should be harmless to run it, but just in case: +build_info_target = buildinfo -# should be harmless to run that, but just in case: -build_info_target = build-info +# run buildinfo first. +all-recursive: buildinfo install-exec-hook: @echo "WARNING: make install does not result in a usable TeX!" diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index 9160a978016..879bf06f86f 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -514,8 +514,8 @@ CONFIG_AUX = $(recurse_top)subsubdir-conf.cmd # 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 +# should be harmless to run it, but just in case: +build_info_target = buildinfo @cross_FALSE@check_target = check # Allow for skipping make check if needed. @@ -1035,9 +1035,6 @@ $(CONFIG_AUX): # 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 @@ -1052,12 +1049,15 @@ world: all # create file buildinfo.log in working directory, to record relevant # information about the build environment. -build-info: +buildinfo: -env MAKE="$(MAKE)" LDFLAGS="$(LDFLAGS)" \ CC="$(CC)" CFLAGS="$(CFLAGS)" \ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" \ OBJC="$(OBJC)" OBJCXXFLAGS="$(OBJCXXFLAGS)" \ - $(srcdir)/doc/build-info.sh >buildinfo.log + $(srcdir)/doc/buildinfo.sh >buildinfo.log + +# run buildinfo first. +all-recursive: buildinfo install-exec-hook: @echo "WARNING: make install does not result in a usable TeX!" diff --git a/Build/source/configure b/Build/source/configure index 835c8df6415..4f8c2107e4e 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -1745,8 +1745,8 @@ Optional Packages: --with-mf-x-toolkit use X toolkit for METAFONT --with-gs=/PATH/TO/gs Hard-wire the location of GhostScript --with-xdvi-x-toolkit=KIT - Use toolkit KIT (motif/xaw/xaw3d/neXtaw) for xdvi - [default: Motif if available, else Xaw] + Use toolkit KIT (xaw/motif/xaw3d/neXtaw) for xdvi + [default: Xaw] --with-system-harfbuzz use installed harfbuzz headers and library (requires pkg-config) --with-system-icu use installed ICU headers and libraries (requires diff --git a/Build/source/doc/build-info.sh b/Build/source/doc/build-info.sh deleted file mode 100755 index b67875419e5..00000000000 --- a/Build/source/doc/build-info.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/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 diff --git a/Build/source/doc/buildinfo.sh b/Build/source/doc/buildinfo.sh new file mode 100755 index 00000000000..be141e1b71b --- /dev/null +++ b/Build/source/doc/buildinfo.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# $Id$ +# Public domain. Report basics of current system; run from top-level +# Makefile so any make overrides will be taken into account. (And from +# Build.) buildenv.log with full environment dump is also created. + +do_config_status=true +if test "x$1" = x--no-config-status; then + shift + do_config_status=false +fi + +printf 'UNAME\t"%s"\n' "`uname -a`" + +# /etc/issue often contains only placeholders, so don't bother. + +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 sort of an 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`" + +# Some Linux-based systems provide this, but don't worry if not there. +# Let's hope that other systems are sufficiently identified by uname, +# don't feel like doing a big system-information hunt. But if we do: +# http://www.datadisk.co.uk/html_docs/misc/unix_commands.htm +if test -n "`lsb_release -a 2>/dev/null`"; then + printf '\nLSB_RELEASE\n' + lsb_release -a 2>&1 +fi + +# the whole configure line and more, if requested. +# (We want this from make, but not from Build.) +$do_config_status \ +&& test -s config.status \ +&& (printf '\nCONFIG_STATUS\n'; ./config.status --version | sed -n '1,/^$/p') + +exit 0 -- cgit v1.2.3