Is there a variable to set so that "make" command searches for makefiles -
is there variable set, make
command searches makefiles in other directories rather searching makefiles in current working directory?
update: scenario this, in our project have script defines & sets of environment variables. make given in root folder (to build) doesn't have makefile. hence, don't think "-c" or other make options can in this. found, after investigation, makefile in internal folders , being invoked. so, question there environmental varibles makes "make" command search makefiles in specified directories (by environment variable).
the short answer no, it's not possible have make search makefiles in different directory 1 started in (or switched due -c
option, gnu make) default.
you have 2 options: 1 use -f
option above.
the other set makefiles
variable list of makefiles want read in before invoke make
. note must actual files want read in, not directory contains them. downside of default target never taken these makefiles: see https://www.gnu.org/software/make/manual/html_node/makefiles-variable.html means you'll need specify target want build on command line.
Comments
Post a Comment