5 $(info Interesting targets
:)
6 $(info lint
- validate source
(with jshint
))
7 $(info test - run tests
(with jstest
))
8 $(info ugly
- generate minified source files
)
9 $(info dist - generate redistributables
(if git tagged
))
11 $(info (Running these may download packages from npm.
))
18 git-describe
= $(shell $(GIT
) describe
--tags --always
$1)
20 SOURCES
:= string-lerp.js
21 UGLIFIED
:= $(call uglify-stampify
,$(SOURCES
))
23 JSHINTCONFIG
:= tests
/jshint.config
24 JSSTAMPDIR
:= build
/stamp
26 TESTS
:= $(wildcard tests
/*.js
)
27 LINTS
:= $(call jshint-stampify
,$(SOURCES
) $(TESTS
))
28 TEST_TARGETS
= $(patsubst %.js
,build
/stamp
/tests
/%.js.
test,$(SOURCES
))
31 .PHONY
: all check lint
test ugly
dist clean distclean install .FORCE
39 ugly
: check $(UGLIFIED
)
41 $(PKGNAME
)-%.zip
$(PKGNAME
)-%.
tar.gz
: .FORCE
43 $(GIT
) archive
--prefix=$(PKGNAME
)-$(*F
)/ --output
=$@
$(*F
)
45 dist: check $(addprefix build
/dist/$(PKGNAME
)-$(call git-describe
),.zip .
tar.gz
)