]> granicus.if.org Git - docbook-dsssl/commitdiff
refine logic for determing RELVER
authorMichael Smith <xmldoc@users.sourceforge.net>
Mon, 4 Apr 2005 12:21:48 +0000 (12:21 +0000)
committerMichael Smith <xmldoc@users.sourceforge.net>
Mon, 4 Apr 2005 12:21:48 +0000 (12:21 +0000)
cvstools/Makefile.incl

index a45f422a0905fa598e10254c7fd5a91881992ede..4e3561bf8777f0bca96288fbdf2f404b73746da0 100644 (file)
@@ -44,11 +44,13 @@ BROWSER_OPTS=-dump
 # file is an XSL stylesheet or not, and then grabbing the version
 # number from that file
 RELVER := $(shell \
- if grep "<xsl:stylesheet" VERSION >/dev/null; then \
-   grep "Version>.\+<" VERSION \
-   | sed 's/^[^<]*<fm:Version>\(.\+\)<\/fm:Version>$$/\1/' \
-   | tr -d "\n"; \
- else cat VERSION; \
+ if [ -f VERSION ]; then \
+   if grep "<xsl:stylesheet" VERSION >/dev/null; then \
+     grep "Version>.\+<" VERSION \
+     | sed 's/^[^<]*<fm:Version>\(.\+\)<\/fm:Version>$$/\1/' \
+     | tr -d "\n"; \
+   else cat VERSION; \
+   fi \
  fi \
 )