Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Makefile #152

Merged
merged 0 commits into from Nov 20, 2014
Merged

Add Makefile #152

merged 0 commits into from Nov 20, 2014

Conversation

dpocock
Copy link

@dpocock dpocock commented Aug 27, 2013

Here is a Makefile that lets me build JsSIP on Debian without using grunt

I understand you prefer using Grunt, this Makefile shouldn't interfere with Grunt in any way.

Work is in progress to get Grunt itself packaged for Debian and when that is done this Makefile can potentially be removed

@jmillan
Copy link
Member

jmillan commented Jul 13, 2014

Hi @dpocock,

Is it actually possible to get Grunt itself packaged?

Thanks a lot.

@dpocock
Copy link
Author

dpocock commented Jul 13, 2014

On 13 July 2014 12:04:48 CEST, "José Luis Millán" notifications@github.com wrote:

Hi @dpocock,

Is it actually possible to get Grunt itself packaged?

This has been discussed in #77 and also in Debian ITP bug http://bugs.debian.org/673727

It is difficult for me to estimate how long that will take to be resolved so I provided the Makefile as a workaround so JsSIP can be packaged and distributed.

@jmillan
Copy link
Member

jmillan commented Jul 13, 2014

Ok,

Thanks Daniel.

@ibc
Copy link
Member

ibc commented Nov 20, 2014

Sorry, what has been exactly "merged"? I see nothing.

@dpocock
Copy link
Author

dpocock commented Nov 20, 2014

The latest version of my Makefile (currently not working) is here:

https://github.com/dpocock/JsSIP/blob/pocock-master/Makefile

The earlier version does work with earlier JsSIP versions.

Now the uglify step fails with some syntax error on the last line of the file. I'm guessing that I have concatenated things in the wrong order.

@ibc
Copy link
Member

ibc commented Nov 20, 2014

That Makefile cannot work with the current "Node style" JsSIP code. We no longer expose all the classes publicly. For example this is wrong:

$(PEGJS) -e JsSIP.Grammar src/Grammar.pegjs src/Grammar.js

Yes, JsSIP module exposes the Grammar class, but internally it does not access it via JsSIP.Grammar. This is all about how Node works, and thus browserify.

IMHO browserify is 100% required, as the build process is not about "files concatenation" anymore.

@dpocock
Copy link
Author

dpocock commented Nov 20, 2014

Thanks for considering this

While Grunt is not available on Debian/Ubuntu, browserify does appear to be:

https://packages.qa.debian.org/node-browserify-lite

Can we call this from the Makefile somehow?

@ibc
Copy link
Member

ibc commented Nov 20, 2014

Some points:

  • I would forget about PEGjs in the Makefile. What for? JsSIP sources already include the "compiled" file (src/Grammar.js).
  • browserify requires Node.
  • Then just run it:
$ browserify -s JsSIP src/JsSIP.js -o dist/jssip.x.y.z.js

@dpocock
Copy link
Author

dpocock commented Nov 20, 2014

PEGjs runs fine from the Makefile. In Debian, Ubuntu and Fedora there is a commitment to create 100% of a project from the most primitive source artifacts. One reason for this is so that people can add a patch into the package later, it is easier for them to write a patch against the PEGjs input file than patching something that is "compiled".

Node is available on Debian too, it is just Grunt that is not available. I'll try that and let you know.

@ibc
Copy link
Member

ibc commented Nov 20, 2014

ok, also note that there is no need for the "Grammar.min" task anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants