MODULE name cannot have same base as an XPIDLSRCS name (PATCH)

RESOLVED FIXED in mozilla1.4alpha

Status

SeaMonkey
Build Config
P3
normal
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: Nathan Kurz, Assigned: hacker formerly known as seawood@netscape.com)

Tracking

Trunk
mozilla1.4alpha

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

16 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5

I'm building simple Javascript XPCOM component with only one XPIDLSRCS file.  My
Makefile looks like this:

    DEPTH		= ../../../../..
    topsrcdir	= @top_srcdir@
    srcdir		= @srcdir@
    VPATH		= @srcdir@

    MODULE=nsGenericModule

    include $(DEPTH)/config/autoconf.mk

    XPIDLSRCS = \
	    nsGenericModule.idl \
	    $(NULL)

    EXTRA_COMPONENTS = \
	    nsGenericModule.js \
	    $(NULL)

    include $(topsrcdir)/config/rules.mk

Note that the MODULE name (nsGenericModule) is the same base name as the IDL
file in XPIDSRCS (nsGenericModule.idl).  This simple case causes problems:

 root@first:/usr/local/src/phoenix/mozilla/js/src/xpconnect/loader/sample# make
 make export
 make[1]: Entering directory 
 `/usr/local/src/phoenix/mozilla/js/src/xpconnect/loader/sample'
 ../../../../../config/nsinstall -R -m 644 nsGenericModule.idl  
 ../../../../../dist/idl
 Creating _xpidlgen/.done
 nsGenericModule.idl
 ../../../../../dist/bin/xpidl -m header -w -I ../../../../../dist/idl -I. -o 
 _xpidlgen/nsGenericModule nsGenericModule.idl
 Creating ../../../../../dist/include/nsGenericModule
 ../../../../../config/nsinstall -R -m 644 _xpidlgen/nsGenericModule.h  
 ../../../../../dist/include/nsGenericModule
 /usr/local/bin/perl -I../../../../../config ../../../../../config/build-list.pl  
 ../../../../../dist/include/nsGenericModule/.headerlist nsGenericModule.h
 make[1]: Leaving directory 
 `/usr/local/src/phoenix/mozilla/js/src/xpconnect/loader/sample'
 make libs
 make[1]: Entering directory 
 `/usr/local/src/phoenix/mozilla/js/src/xpconnect/loader/sample'
 make[1]: Circular _xpidlgen/nsGenericModule.xpt <-  
 _xpidlgen/nsGenericModule.xpt dependency dropped.
 ../../../../../dist/bin/xpt_link _xpidlgen/nsGenericModule.xpt 
 _xpidlgen/nsGenericModule.xpt 
 FAILED: get_file_length: No such file or directory
 make[1]: *** [_xpidlgen/nsGenericModule.xpt] Error 1
 make[1]: Leaving directory 
 `/usr/local/src/phoenix/mozilla/js/src/xpconnect/loader/sample'
 make: *** [all] Error 2

For a simple component, it seems unnecessary to choose a different name for the
module than is used for the component (at least for a Javascript module, which
is what I'm working with).  A tiny patch to allow this to work follows.

Reproducible: Always

Steps to Reproduce:
(Reporter)

Comment 1

16 years ago
Created attachment 112614 [details] [diff] [review]
Patch to allow MODULE name to match XPIDLSRCS name (review wanted)

This patch should allow simple modules (those with only one file in XPIDLSRCS)
to have the module name the same as the base name in XPIDLSRCS.  I've only
tested that it meets my purposes, but I'll update if it breaks anything during
a rebuild.
Attachment #112614 - Flags: review?(dbradley)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Target Milestone: --- → mozilla1.4alpha

Comment 2

16 years ago
Comment on attachment 112614 [details] [diff] [review]
Patch to allow MODULE name to match XPIDLSRCS name (review wanted)

r=dbradley

Looks fine to me. I probably should add some error logic to provide better
diagnostics for xpt_link
Attachment #112614 - Flags: review?(dbradley) → review+
The patch has been checked in.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.