Skip to content

Commit

Permalink
Specify Bash as the shell to be used in Makefile
Browse files Browse the repository at this point in the history
At least one of the rules uses pattern matching which is specific
to Bash and not portable, e.g.

rm -f $(book).{pdf,epub,mobi}

GNU Make defaults to /bin/sh, which is not guaranteed to be Bash.
For example, on Ubuntu systems /bin/sh is a symlink to the Dash
shell, which does not support the file pattern above.

Specifying the shell to be used gets around this problem,
although this does of course assume that Bash is installed.
  • Loading branch information
pwaring committed Mar 30, 2016
1 parent 9301f39 commit c52b6b1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Makefile
@@ -1,3 +1,5 @@
SHELL=/bin/bash

book = yourbookname
chapters = $(shell cat chapters.txt)

Expand Down

0 comments on commit c52b6b1

Please sign in to comment.