Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 65 lines (46 sloc) 1.38 kb
64b4d65 explicitly set bash as the shell since the makefile uses bash-isms
gflarity authored
1 SHELL = bash
2
de338f9 @isaacs Support subfolders in the man/doc files
isaacs authored
3 docs = $(shell find doc -name '*.md' \
4 |sed 's|.md|.1|g' \
0e151fc @isaacs build submodules in make process
isaacs authored
5 |sed 's|doc/|man1/|g' )
6
de338f9 @isaacs Support subfolders in the man/doc files
isaacs authored
7 doc_subfolders = $(shell find doc -type d \
0e151fc @isaacs build submodules in make process
isaacs authored
8 |sed 's|doc/|man1/|g' )
9
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
10 # This is the default make target.
11 # Since 'make' typically does non-installation build stuff,
12 # it seems appropriate.
0e151fc @isaacs build submodules in make process
isaacs authored
13 submodules:
8b40275 @isaacs Closes GH-618 Don't do git on non-git folder
isaacs authored
14 ! [ -d .git ] || git submodule update --init
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored
15
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
16 latest: submodules
17 @echo "Installing latest published npm"
18 @echo "Use 'make install' or 'make link' to install the code"
19 @echo "in this folder that you're looking at right now."
20 node cli.js install
743d387 @isaacs Improve install process.
isaacs authored
21
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
22 install: submodules
364dfc6 @isaacs Clobber in Makefile
isaacs authored
23 node cli.js install -g -f
743d387 @isaacs Improve install process.
isaacs authored
24
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
25 # backwards compat
26 dev: install
27
db9ee01 @isaacs clean when linking
isaacs authored
28 link: uninstall
364dfc6 @isaacs Clobber in Makefile
isaacs authored
29 node cli.js link -f
e0c6abb @isaacs Add 'clean' make target
isaacs authored
30
31 clean: uninstall
743d387 @isaacs Improve install process.
isaacs authored
32
0e151fc @isaacs build submodules in make process
isaacs authored
33 uninstall: submodules
e7d403e @isaacs Change the way that cli.js is run to hopefully work on Cygwin
isaacs authored
34 node cli.js cache clean
364dfc6 @isaacs Clobber in Makefile
isaacs authored
35 node cli.js rm npm -g -f
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored
36
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs th...
isaacs authored
37 man: man1
38
39 man1: $(doc_subfolders)
40 @if ! test -d man1 ; then mkdir -p man1 ; fi
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored
41
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs th...
isaacs authored
42 doc: man1 $(docs)
c638e80 @isaacs Add a makefile to build the man page.
isaacs authored
43
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
44 # use `npm install ronn` for this to work.
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs th...
isaacs authored
45 man1/%.1: doc/%.md
7d44c11 @isaacs Don't install ronn for every doc
isaacs authored
46 @[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
8945848 @isaacs A make command that works
isaacs authored
47 ./node_modules/.bin/ronn --roff $< > $@
c638e80 @isaacs Add a makefile to build the man page.
isaacs authored
48
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs th...
isaacs authored
49 man1/%/: doc/%/
de338f9 @isaacs Support subfolders in the man/doc files
isaacs authored
50 @if ! test -d $@ ; then mkdir -p $@ ; fi
51
0e151fc @isaacs build submodules in make process
isaacs authored
52 test: submodules
90c9ec8 @isaacs Make test (quietly)
isaacs authored
53 ./test/run.sh
54
5846adf @isaacs version bumper
isaacs authored
55 version: link
56 git add package.json \
57 && git ci -m v$(shell npm -v)
58
59 publish: link
05f7ff1 @isaacs Allow publishing from non-master
isaacs authored
60 git tag -s -m v$(shell npm -v) v$(shell npm -v) \
2d27e74 @isaacs Add a 'publish' make target
isaacs authored
61 && git push origin master \
62 && npm publish
63
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
64 .PHONY: latest install dev link doc clean uninstall test man
Something went wrong with that request. Please try again.