Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Makefile Enhancement Proposal #213

wilmoore opened this Issue · 5 comments

3 participants


Proposing the following:

COMPONENT ?= $(firstword $(shell which $(CURDIR)/node_modules/.bin/component) $(shell which component))

build: components index.js
    @$(COMPONENT) build --dev

components: component.json
    @$(COMPONENT) install --dev

    $(RM) -fr build components template.js


  • The $(COMPONENT) variable allows allows automatic use of either local component (if it exists) or the globally installed component.
  • The ?= allows you to pass in some other path to component (not sure there is a use-case for that, but why not -- it's free with GNU Make)
  • The $(RM) variable is just a little more portable this way (this is pretty pendantic, but I can't see any downside) - The only way this is bad is if someone uses turns on -R or --no-builtin-variables; though, anyone doing that knows what they are doing and know how to correct the issue.

Let me know...if this looks good, I'll issue a PR.


The original for context:

build: components index.js
    @component build --dev

components: component.json
    @component install --dev

    rm -fr build components template.js

.PHONY: clean

Why not just issue a PR?


@timoxley easier to bat the mockup around in an issue in case it isn't desirable as-is :)


That being said, #214 has been created.


We should close this also :)

@tj tj closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.