On Tuesday, June 9th, 2026 at 12:06 AM, Paul Smith <[email protected]> wrote:

> On Sun, 2026-06-07 at 08:57 +0000, Heime wrote:
> > I want to avoid passing using a variable like this
> >
> > make -f myfile.mk opt=--split=chapter
> >
> > Rather, I want a direct setting like thisn
> >
> > make -f myfile.mk -- --html --split=chapter
> >
> > And be able to pass all option to the command part of a
> > makefile rule.
> 
> What you want to do is not possible.  Make is not a general-purpose
> interpreter that allows makefiles to investigate and interpret its
> command-line arguments.
> 
> The only thing you can do is write a shell script wrapper around make,
> that will parse the arguments and pass them to make using a variable
> assignment.

Are shell script wrappers for running makefiles common?
 
> --
> Paul D. Smith <[email protected]>            Find some GNU Make tips at:
> https://www.gnu.org                       http://make.mad-scientist.net
> "Please remain calm...I may be mad, but I am a professional." --Mad
> Scientist
> 
> 
>

Reply via email to