Generate date for the man page

* Makefile.am (dist-hook): Add .strace.1.in.date generation.
* strace.spec.in (%setup): Likewise.
* configure.ac (manpage_date): New m4 define.
(MANPAGE_DATE): New define/subst.
* strace.1 (.TH): Add manpage date and strace's version.
This commit is contained in:
Eugene Syromyatnikov 2017-08-10 20:40:29 +02:00
parent 189320c6c7
commit 23bd66bfee
4 changed files with 7 additions and 1 deletions

View File

@ -884,6 +884,7 @@ sen.h: $(patsubst %,$(srcdir)/%,$(syscallent_files))
dist-hook:
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
${AM_V_GEN}echo $(COPYRIGHT_YEAR) > $(distdir)/.year
${AM_V_GEN}echo $(MANPAGE_DATE) > $(distdir)/.strace.1.in.date
today = $(shell date +%Y-%m-%d)
version_regexp = $(subst .,\.,$(VERSION))

View File

@ -37,6 +37,7 @@ AC_INIT([strace],
[strace],
[https://strace.io])
m4_define([copyright_year], m4_esyscmd([./copyright-year-gen .year]))
m4_define([manpage_date], m4_esyscmd([./file-date-gen strace.1.in]))
AC_COPYRIGHT([Copyright (c) 1999-]copyright_year[ The strace developers.])
AC_CONFIG_SRCDIR([strace.c])
AC_CONFIG_AUX_DIR([.])
@ -63,6 +64,9 @@ AX_CODE_COVERAGE
AC_DEFINE([COPYRIGHT_YEAR], "[copyright_year]", [Current copyright year.])
AC_SUBST([COPYRIGHT_YEAR], [copyright_year])
AC_DEFINE([MANPAGE_DATE], "[manpage_date]", [Date])
AC_SUBST([MANPAGE_DATE], [manpage_date])
AC_MSG_CHECKING([for supported architecture])
arch_m32=
arch_mx32=

View File

@ -51,7 +51,7 @@
. el \
. BR "\\$1"
..
.TH STRACE 1
.TH STRACE 1 "@MANPAGE_DATE@" "strace @VERSION@"
.SH NAME
strace \- trace system calls and signals
.SH SYNOPSIS

View File

@ -49,6 +49,7 @@ The `strace' program in the `strace' package is for 32-bit processes.
%setup -q
echo -n %version-%release > .tarball-version
echo -n @COPYRIGHT_YEAR@ > .year
echo -n @MANPAGE_DATE@ > .strace.1.in.date
%build
echo 'BEGIN OF BUILD ENVIRONMENT INFORMATION'