Closed
Bug 914482
Opened 12 years ago
Closed 12 years ago
Allow overrides from the command line for variables defined in moz.build
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla26
People
(Reporter: glandium, Assigned: glandium)
Details
Attachments
(1 file)
2.87 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
There are many reasons why one may want to run make -C foo BAR=some_value, overriding what is defined in Makefiles. But ever since some variables were moved to moz.build, those variables can't be overriden this way, and it's inconvenient.
Assignee | ||
Comment 1•12 years ago
|
||
Attachment #802043 -
Flags: review?(gps)
Comment 2•12 years ago
|
||
Comment on attachment 802043 [details] [diff] [review]
Allow overrides from the command line for variables defined in moz.build
Review of attachment 802043 [details] [diff] [review]:
-----------------------------------------------------------------
::: config/rules.mk
@@ +53,5 @@
> # Using $(firstword) may not be perfect. But it should be good enough for most
> # scenarios.
> _current_makefile = $(CURDIR)/$(firstword $(MAKEFILE_LIST))
>
> +$(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES),$(if $(filter file override,$(subst $(NULL) ,_,$(origin $(var)))),\
Do we actually use override?
Why the $(subst $(NULL) bit? https://www.gnu.org/software/make/manual/make.html#Origin-Function says $(origin) will always return a value.
Attachment #802043 -
Flags: review?(gps) → review+
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #2)
> Comment on attachment 802043 [details] [diff] [review]
> Allow overrides from the command line for variables defined in moz.build
>
> Review of attachment 802043 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: config/rules.mk
> @@ +53,5 @@
> > # Using $(firstword) may not be perfect. But it should be good enough for most
> > # scenarios.
> > _current_makefile = $(CURDIR)/$(firstword $(MAKEFILE_LIST))
> >
> > +$(foreach var,$(_MOZBUILD_EXTERNAL_VARIABLES),$(if $(filter file override,$(subst $(NULL) ,_,$(origin $(var)))),\
>
> Do we actually use override?
We don't, but better safe than sorry. (and I think we should, for some variables)
> Why the $(subst $(NULL) bit?
> https://www.gnu.org/software/make/manual/make.html#Origin-Function says
> $(origin) will always return a value.
Because some values returned by origin contain a space.
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Comment 5•12 years ago
|
||
Backed out for b2g bustage:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9552f5d4476
And relanded with a fixup in dom/camera/test/Makefile.in:
https://hg.mozilla.org/integration/mozilla-inbound/rev/feea0997db36
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•