Skip to content

Instantly share code, notes, and snippets.

@jcoglan
Last active August 29, 2015 14:01
Show Gist options
  • Save jcoglan/043af60fa27be7cd02cd to your computer and use it in GitHub Desktop.
Save jcoglan/043af60fa27be7cd02cd to your computer and use it in GitHub Desktop.
# Context:
#
# browserify is an executable found in the node_modules/.bin directory.
PATH := node_modules/.bin:$(PATH)
SHELL := /bin/bash
source_js := app_root.js
build.js: $(shell PATH=$(PATH) browserify --list $(source_js)) # How come this needs explicit PATH
browserify $(source_js) > $@ # But this doesn't
@selfawaresoup
Copy link

I'd guess that make doesn't automatically give the environment variables to subshells opened by $(shell ... ) but only to the subshells that it opens implicitly for the commands of the targets.

But that's really just a guess.

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