From: Jeremy Harris Date: Sat, 24 Nov 2012 22:51:55 +0000 (+0000) Subject: Insert version number and date into documentation at build time. Bug 1318. X-Git-Tag: exim-4_82_RC2~111 X-Git-Url: https://git.exim.org/users/jgh/exim.git/commitdiff_plain/2aee48d6f2a6526fffe18cd619fde9693f400034 Insert version number and date into documentation at build time. Bug 1318. Write a temp file with macro definitions from the makefile, and include it from the doc sources. Pass the version to make from the perl script. It is still needed to manually update the previous-version number and changebar indicators (.new/.wen) manually. --- diff --git a/doc/doc-docbook/Makefile b/doc/doc-docbook/Makefile index 7f3f07166..07eb322fa 100644 --- a/doc/doc-docbook/Makefile +++ b/doc/doc-docbook/Makefile @@ -23,10 +23,22 @@ exim.8: spec.xml x2man ######################################################################## +.PHONY: local_params +local_params: + echo .macro version > $@ + echo $(EXIM_VER) >> $@ + echo .endmacro >> $@ + echo .macro fulldate >> $@ + date "+%d %b %Y" >> $@ + echo .endmacro >> $@ + echo .macro year >> $@ + date "+%Y" >> $@ + echo .endmacro >> $@ + ############################### FILTER ################################# -filter.xml: filter.xfpt +filter.xml: local_params filter.xfpt xfpt filter.xfpt filter-pr.xml: filter.xml Pre-xml @@ -104,7 +116,7 @@ filter.info: filter-info.xml ################################ SPEC ################################## -spec.xml: spec.xfpt +spec.xml: local_params spec.xfpt xfpt spec.xfpt spec-pr.xml: spec.xml Pre-xml diff --git a/doc/doc-docbook/filter.xfpt b/doc/doc-docbook/filter.xfpt index f235a278d..e54909e94 100644 --- a/doc/doc-docbook/filter.xfpt +++ b/doc/doc-docbook/filter.xfpt @@ -8,6 +8,7 @@ .include stdflags .include stdmacs +.include ./local_params .docbook . ///////////////////////////////////////////////////////////////////////////// @@ -59,15 +60,23 @@ Exim's interfaces to mail filtering Exim filtering -23 November 2009 + +.fulldate + PhilipHazel PH - 4.80 - 17 May 2012 + +.version + + +.fulldate + PH -2010University of Cambridge + +.year + University of Cambridge .literal off @@ -77,8 +86,8 @@ .chapter "Forwarding and filtering in Exim" "CHAPforandfilt" This document describes the user interfaces to Exim's in-built mail filtering -facilities, and is copyright © University of Cambridge 2007. It -corresponds to Exim version 4.80. +facilities, and is copyright © University of Cambridge &year(). It +corresponds to Exim version &version(). diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 6b63062be..9d2dc4b27 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -41,12 +41,11 @@ .book . ///////////////////////////////////////////////////////////////////////////// -. These definitions set some parameters and save some typing. Remember that -. the element must also be updated for each new edition. +. These definitions set some parameters and save some typing. . ///////////////////////////////////////////////////////////////////////////// .set previousversion "4.80" -.set version "4.80" +.include ./local_params .set ACL "access control lists (ACLs)" .set I "    " @@ -170,15 +169,23 @@ Specification of the Exim Mail Transfer Agent The Exim MTA -17 May 2012 + +.fulldate + EximMaintainers EM - 4.80 - 17 May 2012 + +.version + + +.fulldate + EM -2012University of Cambridge + +.year + University of Cambridge .literal off @@ -367,7 +374,7 @@ contributors. .new .cindex "documentation" -This edition of the Exim specification applies to version &version; of Exim. +This edition of the Exim specification applies to version &version() of Exim. Substantive changes from the &previousversion; edition are marked in some renditions of the document; this paragraph is so marked if the rendition is capable of showing a change indicator. @@ -1618,7 +1625,7 @@ for only a short time (see &%timeout_frozen_after%& and .section "Unpacking" "SECID23" Exim is distributed as a gzipped or bzipped tar file which, when unpacked, creates a directory with the name of the current release (for example, -&_exim-&version;_&) into which the following files are placed: +&_exim-&version()_&) into which the following files are placed: .table2 140pt .irow &_ACKNOWLEDGMENTS_& "contains some acknowledgments" @@ -2314,7 +2321,7 @@ INFO_DIRECTORY, as described in section &<>& below. For the utility programs, old versions are renamed by adding the suffix &_.O_& to their names. The Exim binary itself, however, is handled differently. It is installed under a name that includes the version number and the compile number, -for example &_exim-&version;-1_&. The script then arranges for a symbolic link +for example &_exim-&version()-1_&. The script then arranges for a symbolic link called &_exim_& to point to the binary. If you are updating a previous version of Exim, the script takes care to ensure that the name &_exim_& is never absent from the directory (as seen by other processes). diff --git a/release-process/scripts/mk_exim_release.pl b/release-process/scripts/mk_exim_release.pl index ffb9ecff6..d29770d27 100755 --- a/release-process/scripts/mk_exim_release.pl +++ b/release-process/scripts/mk_exim_release.pl @@ -191,7 +191,7 @@ sub build_documentation { my $context = shift; my $docdir = File::Spec->catdir( $context->{release_tree}, 'doc', 'doc-docbook' ); - system("cd '$docdir' && ./OS-Fixups && make everything") == 0 + system("cd '$docdir' && ./OS-Fixups && make EXIM_VER=$context->{release} everything") == 0 || croak "Doc build failed"; copy_docbook_files($context);