uvbook icon indicating copy to clipboard operation
uvbook copied to clipboard

please provide a small introduction to GYP

Open ry opened this issue 13 years ago • 7 comments

That it's a cross-platform meta-build system for generating msvs, xcode, or make build file. Explain that it's used for generating production Google Chrome builds and therefore rather robust. GYP makes it very easy to include libuv into other GYP projects

ry avatar Sep 07 '12 17:09 ry

:) thanks for the comment. I'm currently struggling with GYP myself due to (lack of) documentation issues, but i'll try.

nikhilm avatar Sep 07 '12 17:09 nikhilm

CC our resident GYP experts @TooTallNate @bnoordhuis

ry avatar Sep 07 '12 17:09 ry

@nikhilm If you have questions, shoot. I'll be happy to help.

bnoordhuis avatar Sep 07 '12 23:09 bnoordhuis

@bnoordhuis could you explain what advantages the gyp based method offers over just running make and linking libuv.a into an application? For a project that does not use gyp, does it make sense to use checkout gyp just for the libuv build stage? Please elaborate if there are platform specific issues.

Thanks!

nikhilm avatar Dec 25 '12 19:12 nikhilm

could you explain what advantages the gyp based method offers over just running make and linking libuv.a into an application?

Many. It:

  • knows how to create Makefiles, SConstructs and ninja build files
  • can generate project files for Eclipse, Visual Studio and Xcode
  • makes it easy to build release and debug builds side-by-side, builds for different architectures, etc.

If you have a simple project, the Makefile probably works fine. But when you start doing more complex things, gyp really helps.

For a project that does not use gyp, does it make sense to use checkout gyp just for the libuv build stage?

If you want your application to build on UNIX and Windows without hassle, I'd recommend using gyp, yes.

bnoordhuis avatar Dec 25 '12 20:12 bnoordhuis

thanks!

let's say application X uses a major library that uses, say, CMake. But it also uses libuv. Then gyp or makefile? Why is gyp not bundled with libuv? gyp doesn't have packages for most OSes yet, and pip install from svn fails (http://code.google.com/p/gyp/issues/detail?id=307), so getting gyp is a bit inconvenient for endusers, especially those downloading a tarball and not having svn.

nikhilm avatar Dec 25 '12 20:12 nikhilm

Why is gyp not bundled with libuv?

For the purely selfish reason that it's already bundled with node.js and we didn't want to bundle it twice.

bnoordhuis avatar Dec 25 '12 21:12 bnoordhuis