Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GNU make: variable for command line arguments

How to pass the entire command line (including goals, link lines, make options etc) from top level make to recursive make:

targets : prerequisites
    $(MAKE) $(this should  expand to top level command line) additional_args

Thanks.

like image 720
pic11 Avatar asked May 03 '11 01:05

pic11


1 Answers

I think the closest you can get is using a combination of $(MAKE), which contains the exact filename make was invoked with, $(MAKECMDGOALS), which contains the goals you specified on the command line, and $(MAKEFLAGS), which contains any variable definitions and (a subset of) the switches specified on the command line.

like image 52
eriktous Avatar answered Sep 24 '22 01:09

eriktous