texlive[51425] Build/source: do buildinfo.sh first

commits+karl at tug.org commits+karl at tug.org
Sun Jun 23 00:05:58 CEST 2019


Revision: 51425
          http://tug.org/svn/texlive?view=revision&revision=51425
Author:   karl
Date:     2019-06-23 00:05:57 +0200 (Sun, 23 Jun 2019)
Log Message:
-----------
do buildinfo.sh first

Modified Paths:
--------------
    trunk/Build/source/Build
    trunk/Build/source/ChangeLog
    trunk/Build/source/Makefile.am
    trunk/Build/source/Makefile.in
    trunk/Build/source/configure

Added Paths:
-----------
    trunk/Build/source/doc/buildinfo.sh

Removed Paths:
-------------
    trunk/Build/source/doc/build-info.sh

Modified: trunk/Build/source/Build
===================================================================
--- trunk/Build/source/Build	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/Build	2019-06-22 22:05:57 UTC (rev 51425)
@@ -109,16 +109,16 @@
 # 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 @@
   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.
 

Modified: trunk/Build/source/ChangeLog
===================================================================
--- trunk/Build/source/ChangeLog	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/ChangeLog	2019-06-22 22:05:57 UTC (rev 51425)
@@ -1,3 +1,14 @@
+2019-06-22  Karl Berry  <karl at freefriends.org>
+
+	* 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  <karl at tug.org>
 
 	* Makefile.am (world): make build-info.

Modified: trunk/Build/source/Makefile.am
===================================================================
--- trunk/Build/source/Makefile.am	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/Makefile.am	2019-06-22 22:05:57 UTC (rev 51425)
@@ -49,9 +49,6 @@
 # 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,16 +63,19 @@
 
 # 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 that, but just in case:
-build_info_target = build-info
+# should be harmless to run it, but just in case:
+build_info_target = buildinfo
 
+# run buildinfo first.
+all-recursive: buildinfo
+
 install-exec-hook:
 	@echo "WARNING: make install does not result in a usable TeX!"
 	@echo "  ! The binaries require the myriad support files."

Modified: trunk/Build/source/Makefile.in
===================================================================
--- trunk/Build/source/Makefile.in	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/Makefile.in	2019-06-22 22:05:57 UTC (rev 51425)
@@ -514,8 +514,8 @@
 # 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 at check_target = check
 
 # Allow for skipping make check if needed.
@@ -1035,9 +1035,6 @@
 # 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,13 +1049,16 @@
 
 # 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!"
 	@echo "  ! The binaries require the myriad support files."

Modified: trunk/Build/source/configure
===================================================================
--- trunk/Build/source/configure	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/configure	2019-06-22 22:05:57 UTC (rev 51425)
@@ -1745,8 +1745,8 @@
   --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

Deleted: trunk/Build/source/doc/build-info.sh
===================================================================
--- trunk/Build/source/doc/build-info.sh	2019-06-22 21:23:02 UTC (rev 51424)
+++ trunk/Build/source/doc/build-info.sh	2019-06-22 22:05:57 UTC (rev 51425)
@@ -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

Copied: trunk/Build/source/doc/buildinfo.sh (from rev 51419, trunk/Build/source/doc/build-info.sh)
===================================================================
--- trunk/Build/source/doc/buildinfo.sh	                        (rev 0)
+++ trunk/Build/source/doc/buildinfo.sh	2019-06-22 22:05:57 UTC (rev 51425)
@@ -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



More information about the tex-live-commits mailing list