Last Comment Bug 781431 - A few minor build system improvements
: A few minor build system improvements
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: All All
-- normal (vote)
: mozilla17
Assigned To: Siddharth Agarwal [:sid0] (inactive)
: Gregory Szorc [:gps] (away until 2017-03-20)
Depends on:
  Show dependency treegraph
Reported: 2012-08-08 22:32 PDT by Siddharth Agarwal [:sid0] (inactive)
Modified: 2012-08-15 18:45 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch v1 (2.50 KB, patch)
2012-08-08 22:32 PDT, Siddharth Agarwal [:sid0] (inactive)
ted: review+
Details | Diff | Splinter Review

Description User image Siddharth Agarwal [:sid0] (inactive) 2012-08-08 22:32:31 PDT
Created attachment 650442 [details] [diff] [review]
patch v1

1. mozconfig2client-mk still refers to $HOME/.mozconfig, even though we removed it a while ago. Thanks to Neil for pointing it out.
2. MOZCONFIG_FIND and MOZCONFIG_MODULES are no longer used by
3. The CONFIG_GUESS script runs 7 or 8 times every time is run. It slows Windows builds without an explicit object directory down by around 10-15 seconds, at least on my computer. On the other hand, if an objdir is specified this patch will slow that down by a bit. I really wish Make had variables that are lazy but evaluated only once, but I'll take what I can get.

I'm going to need to check this patch into comm-central as well, to avoid orange there.
Comment 1 User image Mike Hommey [:glandium] 2012-08-08 23:07:08 PDT
There are recipes for lazy variables in make, such as this one I'm using in debian:
lazy = $(eval $(1) = $$(if $$(___$(1)),,$$(eval ___$(1) := $(2)))$$(___$(1)))

Downside is that it requires quoting:
$(call lazy,foo,$$(shell foo))
Comment 2 User image Mike Hommey [:glandium] 2012-08-09 00:42:17 PDT
On the other hand, considering CONFIG_GUESS is always used once... (for the CRLF check)
Comment 3 User image Mike Hommey [:glandium] 2012-08-09 00:44:07 PDT
BTW, if you want to remove one more case of config.guess running, you can add --target=$(CONFIG_GUESS) to CONFIGURE_ARGS
Comment 4 User image Siddharth Agarwal [:sid0] (inactive) 2012-08-15 09:39:52 PDT
Comment 5 User image Ryan VanderMeulen [:RyanVM] 2012-08-15 18:45:34 PDT

Note You need to log in before you can comment on or make changes to this bug.