Backticks (`) in makefile

Ben Davis bnd25@cam.ac.uk
Fri Jun 20 02:11:00 GMT 2003


The backticks aren't interpreted by the makefile, but are passed to the shell. 
A Bourne-style shell like bash, when confronted with the following:

   gcc ... `cat blah`

will execute 'cat blah', capture its stdout and place the contents on the 
command line. So if 'blah' contains:

   foo.o
   bar.o

then the command will become:

   gcc ... foo.o blah.o

Hope that helps :)

Ben



More information about the Gcc-help mailing list