From 5385edd1362286d79ee4567e7b717ee77e97071e Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 4 Apr 2005 12:06:05 +0000 Subject: [PATCH] DISTRO added; auto-determine RELVER from VERSION file ** NOTE: For any modules with Makefiles that already contain variables for RELVER, etc., the existing variables in those Makefiles will override the ones in this file. The Makefiles would need to be rewritten in order for the variable definitions in this file to have any effect. My point being that these additions will not break any existing builds :) --- cvstools/Makefile.incl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cvstools/Makefile.incl b/cvstools/Makefile.incl index 4db508bbd..a45f422a0 100644 --- a/cvstools/Makefile.incl +++ b/cvstools/Makefile.incl @@ -31,12 +31,27 @@ RUNTRANG=$(CVSTOOLSROOT)/runtrang # used only when doing release builds. #----------------------------------------------------------------- +# auto-determine distro (module) name based on directory name +DISTRO=$(notdir $(shell pwd)) + # stylesheet for generating release notes DOC-LINK-STYLE= $(DOCBOOK_CVS)/xsl/docsrc/doc-link-docbook.xsl # browser to use for making text version of release notes BROWSER=w3m BROWSER_OPTS=-dump +# determine RELVER automatically by first figuring out if VERSION +# file is an XSL stylesheet or not, and then grabbing the version +# number from that file +RELVER := $(shell \ + if grep "/dev/null; then \ + grep "Version>.\+<" VERSION \ + | sed 's/^[^<]*\(.\+\)<\/fm:Version>$$/\1/' \ + | tr -d "\n"; \ + else cat VERSION; \ + fi \ +) + # the following are used to determine what version to compare to # in order to create the WhatsNew file NEXTVER= -- 2.40.0