2 years ago
#58273
user17949438
Make cannot be called from script without sourcing the script
I want to call the make command from a bash script in a MinGW bash shell. However the script seems to know "make" only when I call the script using source:
build.sh:
#!/bin/bash
make all
Calling source build.sh from the terminal works: The target all is built.
Calling only build.sh from the terminal results in
./build.sh: line 2: make: command not found
Why do I have to source the script to have a working make command?
bash
makefile
mingw
subshell
0 Answers
Your Answer