linux-test-project / lcov

LCOV
GNU General Public License v2.0
866 stars 234 forks source link

Build of example fails on Ubuntu 22.04.4 LTS due to Makefile using SHELL of /bin/sh (softlink to /bin/dash) #304

Open rael007 opened 2 weeks ago

rael007 commented 2 weeks ago

Running Ubuntu 22.04.4 LTS, bash 5.1.16(1)-release. Just pulled lcov and am trying to build the example, and it fails when calling 'cp':

% git log --pretty=format:'%H' -n 1
d1fd3d5b3076f51f40594f3be093d19134188ae3
% make --version
GNU Make 4.3
[...]
% cd example
% make
[...]
Step 1: Initialize GIT repo with example source
Initialized empty Git repository in /home/rael/dev/lcov/example/exampleRepo/.git/
cp: cannot stat '/home/rael/dev/lcov/example/methods/{iterate,gauss}.c': No such file or directory
[...]

I added a '$(warning SHELL IS $(SHELL))' and it shows SHELL is set to '/bin/sh', which is softlinked to '/bin/dash'. I added to the top of the Makefile a 'SHELL=/bin/bash' line. It now works.