(patch) Fix shell error during mercurial book build

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Fri Apr 27 10:29:26 CDT 2007


I just tried building mercurial book from source, just to see:

$ make
echo -n Mercurial Distributed SCM (version 0.9.3) > hg_id.tex
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `echo -n Mercurial Distributed SCM (version 
0.9.3) > hg_id.tex'
make: *** [hg_id.tex] Error 2

The following patch corrects the problem (caused by the fact, 
that bash tries to interpret brackets found in version info). I 
suspect that it shows - or does not show - depending on shell 
used, and mercurial version installed.

diff -r 27b2c7c46af3 en/Makefile
--- a/en/Makefile       Wed Apr 25 15:23:44 2007 -0700
+++ b/en/Makefile       Fri Apr 27 17:25:17 2007 +0200
@@ -188,7 +188,7 @@ build_id.tex: $(wildcard ../.hg/00change
        echo -n $(hg-id) > build_id.tex

 hg_id.tex: $(hg)
-       echo -n $(hg-version) > hg_id.tex
+       echo -n '$(hg-version)' > hg_id.tex

 clean:
        rm -rf dist html pdf \


More information about the Mercurial mailing list