view build-aux/mk-build-info-cc.in.sh @ 21597:fe1447ae68cf

Add more info to version.m and store build info in the binary (bug #45659) * build-info.in.cc, build-info.h: New files. * mk-build-info-h.in.sh: New script. * configure.ac, Makefile.am: Update. * module.mk (update_hg_id, libinterp/build-info.cc): New rules. * version.m: Also return release date. Add input argument. * toplev.cc (F__octave_config_info__): New fields, builddate, buildtime, hgid, releasedate.
author mmuetzel <markus.muetzel@gmx.de>
date Fri, 08 Apr 2016 21:41:18 +0200
parents
children
line wrap: on
line source

#! /bin/sh
#
# Copyright (C) 2016 M. Muetzel
#
# This file is part of Octave.
#
# Octave is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at
# your option) any later version.
#
# Octave is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with Octave; see the file COPYING.  If not, see
# <http://www.gnu.org/licenses/>.

: ${SED=@SED@}

OCTAVE_HG_ID=$(hg identify --id)

$SED \
  -e "s|%NO_EDIT_WARNING%|DO NOT EDIT!  Generated automatically by mk-build-info-cc.|" \
  -e "s|%OCTAVE_HG_ID%|${OCTAVE_HG_ID}|"