Closed Bug 1252302 Opened 8 years ago Closed 8 years ago

Remove gfx/thebes/Makefile.in

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: mshal, Assigned: mshal)

Details

Attachments

(1 file)

      No description provided.
This requires converting genTables.py into something moz.build can call
into.

Review commit: https://reviewboard.mozilla.org/r/37275/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/37275/
Attachment #8725015 - Flags: review?(gps)
Comment on attachment 8725015 [details]
MozReview Request: Bug 1252302 - Remove gfx/thebes/Makefile.in; r?gps

https://reviewboard.mozilla.org/r/37275/#review34039

::: gfx/thebes/genTables.py:16
(Diff revision 1)
> +def main(args):
> +    if (len(args)):
> +        func = globals().get(args[0])
> +        if func:
> +            return func(sys.stdout, *args[1:])
> +
> +
> +if __name__ == '__main__':
> +    sys.exit(main(sys.argv[1:]))

You don't actually need this since GENERATED_FILES calls into generate() directly, right?

I'm not a huge fan of the globals() foo. If there is only 1 thing this script does, why not assert that and just call into generate()?
Attachment #8725015 - Flags: review?(gps)
(In reply to Gregory Szorc [:gps] from comment #2)
> ::: gfx/thebes/genTables.py:16
> (Diff revision 1)
> > +def main(args):
> > +    if (len(args)):
> > +        func = globals().get(args[0])
> > +        if func:
> > +            return func(sys.stdout, *args[1:])
> > +
> > +
> > +if __name__ == '__main__':
> > +    sys.exit(main(sys.argv[1:]))
> 
> You don't actually need this since GENERATED_FILES calls into generate()
> directly, right?
> 
> I'm not a huge fan of the globals() foo. If there is only 1 thing this
> script does, why not assert that and just call into generate()?

Good point - I was looking at variables.py for reference on how to do GENERATED_FILES scripts, and mistakenly thought all that boilerplate was necessary. We can just use a simple main implementation to support running manually from the commandline.
Comment on attachment 8725015 [details]
MozReview Request: Bug 1252302 - Remove gfx/thebes/Makefile.in; r?gps

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/37275/diff/1-2/
Attachment #8725015 - Flags: review?(gps)
Comment on attachment 8725015 [details]
MozReview Request: Bug 1252302 - Remove gfx/thebes/Makefile.in; r?gps

https://reviewboard.mozilla.org/r/37275/#review34265

::: gfx/thebes/genTables.py:18
(Diff revision 2)
> +        print >> sys.stderr, "Usage: genTables.py <header.h>"

Let's at least try to be Python 3 compatibile.

print("...", file=sys.stderr)
Attachment #8725015 - Flags: review?(gps) → review+
(In reply to Gregory Szorc [:gps] from comment #5)
> Comment on attachment 8725015 [details]
> ::: gfx/thebes/genTables.py:18
> (Diff revision 2)
> > +        print >> sys.stderr, "Usage: genTables.py <header.h>"
> 
> Let's at least try to be Python 3 compatibile.
> 
> print("...", file=sys.stderr)

Done.
https://hg.mozilla.org/mozilla-central/rev/1be1bac73a4f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: