Add a way to have automagically inherited variable definitions in Makefiles

RESOLVED FIXED in mozilla18

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: glandium, Assigned: glandium)

Tracking

unspecified
mozilla18
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
Created attachment 662843 [details] [diff] [review]
Add a way to have automagically inherited variable definitions in Makefiles
Attachment #662843 - Flags: review?(ted.mielczarek)
(Assignee)

Comment 2

5 years ago
The usecase is for bug 755724, where we can just define DIST_SUBDIR=browser in browser/defs.mk, and DIST_SUBDIR=metro in browser/metro/defs.mk.
Comment on attachment 662843 [details] [diff] [review]
Add a way to have automagically inherited variable definitions in Makefiles

Review of attachment 662843 [details] [diff] [review]:
-----------------------------------------------------------------

::: config/config.mk
@@ +27,5 @@
>  include $(DEPTH)/config/autoconf.mk
>  endif
>  
> +nullstr :=
> +space :=$(nullstr) # EOL

You can ostensibly just use $(NULL) here right?

@@ +39,5 @@
> +__depth := $(subst /, ,$(DEPTH))
> +ifeq (.,$(__depth))
> +__depth :=
> +endif
> +$(foreach __d,$(__depth) .,$(eval __depth = $(wordlist 2,$(words $(__depth)),$(__depth))$(eval -include $(subst $(space),/,$(strip $(srcdir) $(__depth) defs.mk)))))

This hurts my head, but ok.
Attachment #662843 - Flags: review?(ted.mielczarek) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a7f0c7c7eb61
https://hg.mozilla.org/mozilla-central/rev/a7f0c7c7eb61
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18

Updated

5 years ago
Blocks: 810709
You need to log in before you can comment on or make changes to this bug.