K
K
Kirill2015-02-26 16:06:28
Command line
Kirill, 2015-02-26 16:06:28

How to get all arguments as string in Makefile?

The Makefile has a target in which the test script is executed, I want to pass all the arguments passed to make to it.
How make test -m core -r consoleto get a variable with contents from -m core -r consolewhen executing make?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CycaHuH, 2015-02-26
@CycaHuH

Использовать переменные:

TEST_ARGS ?= default_args

test:
        ./_test_script $(TEST_ARGS)

И вызывать make так:
$ make test TEST_ARGS="-m core -r console"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question