Closed Bug 444992 Opened 16 years ago Closed 16 years ago

NATIVE_DIST definition used in packager.mk for SIGN_CMD is crap

Categories

(Toolkit Graveyard :: Build Config, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kairo, Assigned: kairo)

Details

Attachments

(1 file)

In http://mxr.mozilla.org/mozilla-central/source/toolkit/mozapps/installer/packager.mk#193 a NATIVE_DIST var is being defined for being used only in the following line for assembling SIGN_CMD.
Its intention is to add a "../$(NATIVE_ARCH)/" in the DIST definition between DEPTH and the rest, what what it does is more or less cutting off the "/dist" at the end with "..", then adding that intended part and then adding "/dist" again, which achieves the same as if it just was
NATIVE_DIST = $(DEPTH)/../$(NATIVE_ARCH)/dist
but does this in a much less clean way.

Needless to say that this breaks with the comm-central build system the same way as the simpler line would.

There are three possible ways for solving this so that comm-central can also use it:

1) Clean the definition up to the line I stated above, but wrap it in a |ifndef NATIVE_DIST| so comm-central files can override it, or
2) Implement it correctly as intended and do something like a s|^$(DEPTH)|$(DEPTH)/../$(NATIVE_ARCH)| on DIST for assigning it to NATIVE_DIST, or even
3) Use just DIST here and disallow making packages from any other than the native platform for universal builds.
I decided to try the correct approach (number 2 in comment #0) and use a substitution reference <http://www.gnu.org/software/automake/manual/make/Substitution-Refs.html#Substitution-Refs> to do the trick and really inject the part we want after the DEPTH.
This has been tested to work on the Mac buildbot machine I'm preparing for SeaMonkey going comm-central (and this is Mac-only code of course, living inside |ifdef UNIVERSAL_BINARY|).
Assignee: nobody → kairo
Status: NEW → ASSIGNED
Attachment #329314 - Flags: review?(ted.mielczarek)
Attachment #329314 - Flags: review?(ted.mielczarek) → review+
checked in back on 2008-07-21 as http://hg.mozilla.org/mozilla-central/rev/b77757245257
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: