texlive[51335] Build/source: build-info.sh script to create
commits+karl at tug.org
commits+karl at tug.org
Fri Jun 7 00:21:34 CEST 2019
Revision: 51335
http://tug.org/svn/texlive?view=revision&revision=51335
Author: karl
Date: 2019-06-07 00:21:33 +0200 (Fri, 07 Jun 2019)
Log Message:
-----------
build-info.sh script to create Work/buildinfo.log
Modified Paths:
--------------
trunk/Build/source/Build
trunk/Build/source/ChangeLog
trunk/Build/source/Makefile.am
trunk/Build/source/Makefile.in
Added Paths:
-----------
trunk/Build/source/doc/build-info.sh
Modified: trunk/Build/source/Build
===================================================================
--- trunk/Build/source/Build 2019-06-06 22:04:12 UTC (rev 51334)
+++ trunk/Build/source/Build 2019-06-06 22:21:33 UTC (rev 51335)
@@ -71,9 +71,6 @@
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 @@
# 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 @@
# 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 \
Modified: trunk/Build/source/ChangeLog
===================================================================
--- trunk/Build/source/ChangeLog 2019-06-06 22:04:12 UTC (rev 51334)
+++ trunk/Build/source/ChangeLog 2019-06-06 22:21:33 UTC (rev 51335)
@@ -1,3 +1,12 @@
+2019-06-06 Karl Berry <karl at 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 at tug.org>
* version.ac: 2020/dev.
Modified: trunk/Build/source/Makefile.am
===================================================================
--- trunk/Build/source/Makefile.am 2019-06-06 22:04:12 UTC (rev 51334)
+++ trunk/Build/source/Makefile.am 2019-06-06 22:21:33 UTC (rev 51335)
@@ -42,7 +42,7 @@
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,
@@ -49,18 +49,33 @@
# 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."
Modified: trunk/Build/source/Makefile.in
===================================================================
--- trunk/Build/source/Makefile.in 2019-06-06 22:04:12 UTC (rev 51334)
+++ trunk/Build/source/Makefile.in 2019-06-06 22:21:33 UTC (rev 51335)
@@ -513,6 +513,9 @@
# 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 at check_target = check
# Allow for skipping make check if needed.
@@ -1029,17 +1032,33 @@
@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."
Added: trunk/Build/source/doc/build-info.sh
===================================================================
--- trunk/Build/source/doc/build-info.sh (rev 0)
+++ trunk/Build/source/doc/build-info.sh 2019-06-06 22:21:33 UTC (rev 51335)
@@ -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
Property changes on: trunk/Build/source/doc/build-info.sh
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+LF
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Date Author Id Revision
\ No newline at end of property
More information about the tex-live-commits
mailing list