Closed Bug 792685 Opened 7 years ago Closed 7 years ago

Add a way to have automagically inherited variable definitions in Makefiles

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla18

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

No description provided.
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+
https://hg.mozilla.org/mozilla-central/rev/a7f0c7c7eb61
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
Blocks: 810709
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.