Is Makefile a Shell Script?
A Shell Script Is an Abritrary Collection of Unix Shell Commands. Put a Command in a File and It Is a Shell Script. a Makefile However Is a Very Clever Bit of...
a shell script is an abritrary collection of unix shell commands. put a command in a file and it is a shell script. a Makefile however is a very clever bit of scripting (in it's own language to all extents) that compiles an accompanying set of source code into a program.
What is shell in makefile?
$(shell) is a special function in gmake that runs an external command and captures the output for use in the makefile. For example, you could get the current working directory like this: CWD=$(shell pwd) all: @echo This makefile lives in $(CWD).
How do I run a shell script in makefile?
You need to ensure that each command is independent, since each one will be run inside a separate subshell. which tells make to simply run a shell command. ./genVer.sh is the path (same directory as the makefile) and name of my script to run.