Open
Bug 738350
Opened 13 years ago
Updated 3 years ago
shell reduction: mobile/android/base/Makefile.in
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(Not tracked)
NEW
People
(Reporter: joey, Unassigned)
Details
1) Using patsubst(^M, ^J, \r\n \r, $(SPACE)) in place of tr '\n' ' ' will remove 6 commands from the makefile stream.
2) A utility script could be setup to iterate over a list of files. Perform newline replacement on the content (avoid tr). Then output each stream prefixed by the filename it was found in (FILE=$filename:). This logic would be able to gather all config file output in a single shell rather than spawning 6 shells individually [ also fewer failure points, only one cat/cmd could fail ].
Macro assignments can then be extracted inline using:
output = $(shell catfiles.py --with-filename foo bar tans)
$(findstring filename:,$(output))
$(subst FILE=$filename:)
mobile/android/base/Makefile.in
==============================================================
SYNC_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/java-sources.mn | tr '\n' ' ';)
SYNC_PP_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/preprocess-sources.mn | tr '\n' ' ';)
SYNC_THIRDPARTY_JAVA_FILES=$(shell cat $(topsrcdir)/mobile/android/sync/java-third-party-sources.mn | tr '\n' ' ';)
SYNC_RES_DRAWABLE=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-resources.mn | tr '\n' ' ';)
SYNC_RES_DRAWABLE_LDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-ldpi-resources.mn | tr '\n' ' ';)
SYNC_RES_DRAWABLE_MDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-mdpi-resources.mn | tr '\n' ' ';)
SYNC_RES_DRAWABLE_HDPI=$(shell cat $(topsrcdir)/mobile/android/sync/android-drawable-hdpi-resources.mn | tr '\n' ' ';)
SYNC_RES_LAYOUT=$(shell cat $(topsrcdir)/mobile/android/sync/android-layout-resources.mn | tr '\n' ' ';)
SYNC_RES_VALUES=$(shell cat $(topsrcdir)/mobile/android/sync/android-values-resources.mn | tr '\n' ' ';)
Comment 1•12 years ago
|
||
I'm pretty sure the work in bug 854530 will magically fix all of this. I'm too lazy to look at the patches.
Nick: can you confirm and mark it as a dupe if so?
Flags: needinfo?(nalexander)
Comment 2•12 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #1)
> I'm pretty sure the work in bug 854530 will magically fix all of this. I'm
> too lazy to look at the patches.
I think Bug 854530 will remove the listed shell calls, but...
> Nick: can you confirm and mark it as a dupe if so?
... it's not a dupe. In the process of Bug 854530, we'l remove as much non-determinism as we can, but there are other optimizations listed here that don't fit in that ticket's scope.
Flags: needinfo?(nalexander)
Updated•7 years ago
|
Product: Core → Firefox Build System
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•