job000015

craig_mcpheeters (Craig Mcpheeters)
Craig Mcpheeters created this job , modified by Shawn Hladky
Closed
Error in the definition of FIncludes and FDefines for NT and OS2?

Date: Fri, 11 Jan 2002 17:33:21 -0800 (PST)
Message-Id: <200201120133.RAA70765@sapporo.sea.aw.sgi.com>
From: Craig McPheeters <cmcpheeters@aw.sgi.com>
To: rmg@perforce.com
Subject: Re: [jamming] Perforce internal jam changes to //public/jam/...

Hi Richard,


I noticed that in the Jambase, there may be an error in the definition
of FIncludes and FDefines for NT and OS2?

>From the Jambase:

---

rule FQuote { return \\\"$(<)\\\" ; }
rule FDefines { return -D$(<) ; }
rule FIncludes { return -I$(<) ; }

rule FDirName
{
    # Turn individual elements in $(<) into a usable path.

    local _i ;
    local _s = $(DOT) ;

    for _i in $(<)
    {
        _s = $(_i:R=$(_s)) ;
    }

    return $(_s) ;
}

if $(OS2)
{
    rule FQuote { return \"$(<)\" ; }
    rule FInclude { return -I$(<) ; }
}

else if $(NT)
{
    rule FInclude { return -I$(<) ; }
}

---

Which first creates the default Unix versions and then overrides them
with specialized versions for NT and OS2, etc.

NT and OS2 define a rule called FInclude  (not FIncludes).  This seems
wrong, as I don't see it being called, only the plural version is called?

Also, the NT versions should use /I and /D I think.   This may be
what was intended?

if $(OS2)
{
    rule FQuote { return \"$(<)\" ; }
    rule FIncludes { return -I$(<) ; }
}

else if $(NT)
{
    rule FDefines { return /D$(<) ; }
    rule FInclude { return /I$(<) ; }
}


NT should override FDefines as well.  Although I'm not familiar with OS2
and don't now its flag convention.  For the NT includes, you can cross
check it with the use of STDHDRS in some of the actions.  Ie:

    actions Cc
    {
    $(CC) /c /Fo$(<) $(CCFLAGS) $(CCDEFS) $(CCHDRS) /I$(STDHDRS) $(>)
    }



Cheers,
 Craig.
1539Fix definitions of FIncludes/FDefines for OS2 and NT, mistakes
caught by Craigh McPheeters.

This corrects behavior altered since jam 2.3 and prior to 2.4.
  • Details
  • Comments -
Status
Closed
Project
jam
Severity
C
Reported By
Craig Mcpheeters
Reported Date
Modified By
Shawn Hladky
Modified Date