summaryrefslogtreecommitdiff
path: root/includes/ghc.mk
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2015-01-19 12:18:02 +0100
committerHerbert Valerio Riedel <hvr@gnu.org>2015-01-19 12:18:02 +0100
commit1289048eaf31915b9335c6f7e0b7b64625ab0ed5 (patch)
treec25ab1e9efae44d7dd46a20e6eb44e73e04a3bff /includes/ghc.mk
parentff4733f4e0355085002a1f9053ba2276e92d2cb6 (diff)
downloadhaskell-1289048eaf31915b9335c6f7e0b7b64625ab0ed5.tar.gz
Fix bad '... \\' escape in ghcversion.h generation
Today I learned about the peculiarities of escaping within single-quotes: Turns out, echo 'foo \\' emits foo \\ rather than escaping the '\'. Curiously, if you need to escape a ' within single-quotes, here's how to do it echo 'foo '\'' bar' which will emit foo ' bar This fixes #10002
Diffstat (limited to 'includes/ghc.mk')
-rw-r--r--includes/ghc.mk12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/ghc.mk b/includes/ghc.mk
index c7cec6c948..7a255db601 100644
--- a/includes/ghc.mk
+++ b/includes/ghc.mk
@@ -71,12 +71,12 @@ $(includes_H_VERSION) : mk/project.mk | $$(dir $$@)/.
echo "#define __GLASGOW_HASKELL_PATCHLEVEL2__ $(ProjectPatchLevel2)" >> $@; \
fi
@echo >> $@
- @echo '#define MIN_VERSION_GLASGOW_HASKELL(ma,mi,pl1,pl2) (\\' >> $@
- @echo ' ((ma)*100+(mi)) < __GLASGOW_HASKELL__ || \\' >> $@
- @echo ' ((ma)*100+(mi)) == __GLASGOW_HASKELL__ \\' >> $@
- @echo ' && (pl1) < __GLASGOW_HASKELL_PATCHLEVEL1__ || \\'>> $@
- @echo ' ((ma)*100+(mi)) == __GLASGOW_HASKELL__ \\' >> $@
- @echo ' && (pl1) == __GLASGOW_HASKELL_PATCHLEVEL1__ \\' >> $@
+ @echo '#define MIN_VERSION_GLASGOW_HASKELL(ma,mi,pl1,pl2) (\' >> $@
+ @echo ' ((ma)*100+(mi)) < __GLASGOW_HASKELL__ || \' >> $@
+ @echo ' ((ma)*100+(mi)) == __GLASGOW_HASKELL__ \' >> $@
+ @echo ' && (pl1) < __GLASGOW_HASKELL_PATCHLEVEL1__ || \' >> $@
+ @echo ' ((ma)*100+(mi)) == __GLASGOW_HASKELL__ \' >> $@
+ @echo ' && (pl1) == __GLASGOW_HASKELL_PATCHLEVEL1__ \' >> $@
@echo ' && (pl2) <= __GLASGOW_HASKELL_PATCHLEVEL2__ )' >> $@
@echo >> $@
@echo "#endif /* __GHCVERSION_H__ */" >> $@