diff options
author | Ben Gamari <ben@well-typed.com> | 2015-11-16 16:42:16 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-16 21:59:46 +0100 |
commit | 82cf6724b97ed40d5efedfd28bd3cccf90d1dff2 (patch) | |
tree | fa642da4b9e0eda2da986835a0e683d58565addc /rules/haddock.mk | |
parent | 7485d0ce03247ca573073738aba34a66e01180a8 (diff) | |
download | haskell-82cf6724b97ed40d5efedfd28bd3cccf90d1dff2.tar.gz |
haddock.mk: Use \{1,\} instead of \+
This works around Mac OS X's sed, which doesn't support \+.
For the record,
The regex implementation in Mac OS X 10.8 and later is based on a heavily
modified subset of TRE, http://laurikari.net/tre/
Diffstat (limited to 'rules/haddock.mk')
-rw-r--r-- | rules/haddock.mk | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/rules/haddock.mk b/rules/haddock.mk index 499adad85b..e716bb8f71 100644 --- a/rules/haddock.mk +++ b/rules/haddock.mk @@ -10,10 +10,10 @@ # # ----------------------------------------------------------------------------- -HADDOCK_VER := $(shell grep "^version:" utils/haddock/haddock.cabal | sed "s/^version: \+//") -HADDOCK_MAJOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\1/') -HADDOCK_MINOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\2/') -HADDOCK_PATCH_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\+\).\([0-9]\+\).\([0-9]\+\)/\3/') +HADDOCK_VER := $(shell grep "^version:" utils/haddock/haddock.cabal | sed "s/version: *//") +HADDOCK_MAJOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\1/') +HADDOCK_MINOR_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\2/') +HADDOCK_PATCH_VER := $(shell echo $(HADDOCK_VER) | sed 's/\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)\.\([0-9]\{1,\}\)/\3/') HADDOCK_VERSION_STRING := $(shell echo $$(($(HADDOCK_MAJOR_VER) * 1000 + $(HADDOCK_MINOR_VER) * 10 + $(HADDOCK_PATCH_VER)))) define haddock # args: $1 = dir, $2 = distdir |