-
-
Notifications
You must be signed in to change notification settings - Fork 709
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
Makefile: make sure the meteor bundle is present before running ekam. #3361
Conversation
Otherwise building node-capnp fails if the user has never run `meteor`, due to not being able to find the development headers. This doesn't trigger if the build is run as the same user that ran meteor's `curl ... | sh` installer, which is why we haven't previously noticed it. Note that if the bundle is not present ./find-meteor-dev-bundle.sh will pull it in, but although we define a variable in terms of this at the top of the Makefile, its value is computed lazily, so it will not be run until it is actually needed. It might work to just use := instead of = when assigning the variable, but conceptually having the build process depend on node seems like the right thing (and it should also ensure a rebuild if the version of node/the bundle is updated). Fixes sandstorm-io#3360
Hmm, I don't think that's correct.
TIL That said, I don't think that's the issue here. I think your change has the effect that if meteor is not installed, then What we really want is that if
This would have the effect that |
Actually that won't work either, because a failure inside
Ugh. |
Hm, and now this patch doesn't actually cause it to error out early for me anymore; not sure what I was doing differently before. In any case it looks like you're right; the problem is that we're ignoring the failure from that script entirely. Closing, since this is the wrong solution. |
We could probably handle this by making the assignment strict and
checking the status explicitly in the Makefile:
METEOR_DEV_BUNDLE := $(shell ./find-meteor-dev-bundle.sh)
ifneq '$(.SHELLSTATUS)' '0'
$(error Failed to find dev bundle)
endif
I haven't been able to find a way to convince make to just fail if any
$(shell ...) call fails, which seems like the sensible thing.
|
Otherwise building node-capnp fails if the user has never run
meteor
,due to not being able to find the development headers. This doesn't
trigger if the build is run as the same user that ran meteor's
curl ... | sh
installer, which is why we haven't previously noticedit.
Note that if the bundle is not present ./find-meteor-dev-bundle.sh will
pull it in, but although we define a variable in terms of this at the
top of the Makefile, its value is computed lazily, so it will not be run
until it is actually needed.
It might work to just use := instead of = when assigning the variable,
but conceptually having the build process depend on node seems like the
right thing (and it should also ensure a rebuild if the version of
node/the bundle is updated).
Fixes #3360