Please allow us to set Makefile variables from outside #233

Merged
merged 2 commits into from Nov 28, 2016

Projects

None yet

2 participants

@danrl
Contributor
danrl commented Nov 27, 2016

Small change that helps a lot in automated cross-compiling tasks.

danrl added some commits Nov 27, 2016
@danrl danrl stateful: Respect existing variables
This makes life easier for automated build systems and cross compiling. E.g. for LEDE/OpenWRT.
823158a
@danrl danrl stateless: Respect existing variables
This makes life easier for automated build systems and cross compiling. E.g. for LEDE/OpenWRT.
664d586
@danrl
Contributor
danrl commented Nov 27, 2016

Not part of this PR, but somehow related: Can we have these variables set in the mod/Makefile, so that it propagates down to the other two makefiles? Currently I have to patch the makefiles and call them separately, would prefer to call the parent makefile once and setting KERNEL_DIR via export before calling the makefile.

@ydahhrk
Member
ydahhrk commented Nov 28, 2016

Ok, cool. I used to do it like this:

make KERNEL_DIR=/path/to/kernel

In fact, it also seems to work in mod/. Is this not acceptable?

But this does look better so approving.

On the other hand, you seem to be working with a very old version (something between 3.3.0 and 3.3.1), which has known critical bugs. I suggest an upgrade.

@ydahhrk ydahhrk merged commit a37b795 into NICMx:master Nov 28, 2016
@danrl
Contributor
danrl commented Nov 28, 2016

Thanks for merging. And yes, you are right, setting via make command line is possible, too. It was just less desirable in a specific use case.

On the other hand, you seem to be working with a very old version (something between 3.3.0 and 3.3.1), which has known critical bugs. I suggest an upgrade.

I fetched v3.5.1 via release page on this repo. Maybe I checked out the wrong branch for the pull request?!

@ydahhrk
Member
ydahhrk commented Nov 28, 2016

OK

But wait a second: Is this finished? I'm not sure what you meant by

Can we have these variables set in the mod/Makefile, so that it propagates down to the other two makefiles?

It seems like the patch you sent already allows me to export KERNEL_DIR and cross-compile via the parent makefile.

@danrl
Contributor
danrl commented Nov 28, 2016

Mea culpa, it is finished. Late night pull request /o\

Everything works via export now as expected.

@ydahhrk ydahhrk modified the milestone: 3.5.2 Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment