Closed Bug 1275355 Opened 7 years ago Closed 7 years ago

Move host_jskwgen invocation to moz.build

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox49 fixed)

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: mshal, Assigned: mshal)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This just requires a little wrapper script to invoke host_jskwgen from moz.build.
Comment on attachment 8755970 [details]
MozReview Request: Bug 1275355 - Move host_jskwgen invocation to moz.build; r?chmanchester

https://reviewboard.mozilla.org/r/54910/#review51598

::: js/src/jsautokw.py:21
(Diff revision 1)
> +if __name__ == '__main__':
> +    main(sys.stdout, *sys.argv[1:])

You could use the `script = <file>:main` syntax to avoid this, if that seems worthwhile.
Attachment #8755970 - Flags: review?(cmanchester) → review+
It looks like we default to ":main" if no method is specified, so when invoked from the build system it doesn't actually use that part of the script: https://dxr.mozilla.org/mozilla-central/rev/5511d54a3f172c1d68f98cc55dce4de1d0ba1b51/python/mozbuild/mozbuild/frontend/emitter.py#1049

I think that block can still be useful to just run the script manually at the command-line for debugging though, like:

$ python js/src/jsautokw.py objdir/js/src/host_jskwgen
https://hg.mozilla.org/mozilla-central/rev/37be4f51e6b4
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.