groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 01/01: Makefile.am: correctly calculate MAJOR_VERSION etc.


From: Ingo Schwarze
Subject: [groff] 01/01: Makefile.am: correctly calculate MAJOR_VERSION etc.
Date: Fri, 10 Aug 2018 18:20:01 -0400 (EDT)

schwarze pushed a commit to branch master
in repository groff.

commit f1af4b0b05e79c96cef886442681e12b3fca0184
Author: Ingo Schwarze <address@hidden>
Date:   Fri Aug 10 05:40:57 2018 +0200

    Makefile.am: correctly calculate MAJOR_VERSION etc.
    
    In a BRE, "\+" does not mean "one or more repetitions".
    Fix the calculation by using cut(1) instead of sed(1),
    which is also in POSIX and much simpler for this task.
    OK wl@
---
 ChangeLog   | 4 ++++
 Makefile.am | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 15c0147..0f48366 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-08-09  Ingo Schwarze  <address@hidden>
+
+       * Makefile.am: correctly calculate MAJOR_VERSION etc.
+
 2018-06-19  Deri James  <address@hidden>
 
        Fixes to gropdf
diff --git a/Makefile.am b/Makefile.am
index ad2d84d..6021f79 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -636,9 +636,9 @@ endif
 #
 # Also see configure.ac for the related SHORT_VERSION macro.
 
-MAJOR_VERSION =`echo $(VERSION) | sed 's/\([0-9]\+\)\.[0-9]\+.*/\1/'`
-MINOR_VERSION =`echo $(VERSION) | sed 's/[0-9]\+\.\([0-9]\+\).*/\1/'`
-REVISION = `echo $(VERSION) | sed 's/[0-9]\+\.[0-9]\+\.\(.*\)/\1/'`
+MAJOR_VERSION = `echo $(VERSION) | cut -d . -f 1`
+MINOR_VERSION = `echo $(VERSION) | cut -d . -f 2`
+REVISION      = `echo $(VERSION) | cut -d . -f 3`
 
 # Non-recursive makefile system. See Automake manual '7.3 An
 # Alternative Approach to Subdirectories'. We use a single Makefile.am



reply via email to

[Prev in Thread] Current Thread [Next in Thread]