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 'configure', 'build' and 'clean' hooks. #9

Closed
TooTallNate opened this issue Feb 7, 2012 · 5 comments
Closed

Add 'configure', 'build' and 'clean' hooks. #9

TooTallNate opened this issue Feb 7, 2012 · 5 comments
Labels

Comments

@TooTallNate
Copy link
Contributor

For more complex module build systems, like node-ffi, where the bundled libffi also needs to be configured and built, there should be hooks into the build steps for modules. The hooks should be node JavaScript files and will need to manually take care of platform differences in their scripts.

I'm thinking that these should be hard-coded script names (i.e. gyp-configure.js, gyp-build.js, and gyp-clean.js) which would be run if they exist, before the rest of the step.

TooTallNate added a commit that referenced this issue Feb 12, 2012
@edhemphill
Copy link

second this request... really useful if you need custom libraries outside your normal directories, etc.

@TooTallNate
Copy link
Contributor Author

I don't really think this is needed anymore. It's possible to hook into "configure" and "build" using just gyp features (see node-ffi's binding.gyp file), so I'm gonna close.

@edhemphill
Copy link

Gotcha, yes found this out recently. thanks!

@rchipka
Copy link

rchipka commented Mar 31, 2023

This would still be useful since gyp's 'actions' are finicky on Windows builds

@rchipka
Copy link

rchipka commented Mar 31, 2023

I think we should re-open this issue.

Having a reliable way of implementing cross-platform pre/post build steps would be very helpful for more complex native module builds.

Building libxmljs fully from scratch requires several stages that could be automated with proper hooks.

We currently package large source files that could be generated on the fly as-needed, while keeping our NPM footprint as small as possible.

GYP-based solutions aren't working, not to mention GYP itself is really showing it's age.

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

No branches or pull requests

3 participants