Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting make options in a makefile

Tags:

makefile

Can I create a makefile which will behave as if some options were passed to make executable?

like image 628
synapse Avatar asked Oct 28 '25 03:10

synapse


1 Answers

As far as I know it's not possible to modify e.g. the -j value or add the behaviour of -d run-time in a Makefile. However, one nice workaround is adding a target like this:

debug:
        make -d debugtarget

Now make debug works just like make -d debugtarget. You can even make "debug" your default target and get the same effect with just make.

like image 89
opqdonut Avatar answered Oct 30 '25 04:10

opqdonut



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!