Menu ▾ ▴

#6 Makefile doesn't work with dash as default shell

open
None
2
2012-12-13
2012-12-13
No

Many linux systems have the default shell (/bin/sh/) set to dash, or some other (non-bash) shell. The Makefile uses syntax specific to bash (line 48)
SVN_WC?=$(shell if [[ `svn --version --quiet` =~ [0-9] ]] ; then echo `svn info | grep -c ^URL:` ; else echo 0 ; fi)

The "double bracket" syntax is bash-specific and doesn't work on many shells. While this doesn't really affect the build, it's a noisy warning that shouldn't happen. This expression should be re-written using single test brackets.

Traceback
--------------
With dash as the default shell:
smorley@coelacanth:~/projects/irbem/trunk$ make all OS=linux64 ENV=gfortran64
/bin/sh: 1: [[: not found
/bin/sh: 1: [[: not found
http://irbem.svn.sourceforge.net/svnroot/irbem, http://irbem.svn.sourceforge.net/svnroot/irbem/???, NonSVN, Unknown
Building non-sharable object onera_desp_lib_linux_x86_64.a
non-sharable object built

Building sharable object onera_desp_lib_linux_x86_64.so
sharable object built

Building sequence achieved

With bash as the default shell (correct behaviour):
smorley@coelacanth:~/projects/irbem/trunk$ make all OS=linux64 ENV=gfortran64
https://irbem.svn.sourceforge.net/svnroot/irbem, https://irbem.svn.sourceforge.net/svnroot/irbem/trunk, trunk, trunk
Building non-sharable object onera_desp_lib_linux_x86_64.a
non-sharable object built

Building sharable object onera_desp_lib_linux_x86_64.so
sharable object built

Building sequence achieved

Discussion

  • Steve Morley

    Steve Morley - 2012-12-13
    • priority: 5 --> 2
    • assigned_to: nobody --> tpoiii
     
  • Steve Morley

    Steve Morley - 2012-12-13

    Set to low priority as it's not failing to compile. Assigned to originator.

     

Log in to post a comment.