Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 70 lines (50 sloc) 1.58 kb
64b4d65 explicitly set bash as the shell since the makefile uses bash-isms
gflarity authored
1 SHELL = bash
2
5021c4d isaacs folder structure change
isaacs authored
3 cli_docs = $(shell find doc/cli -name '*.md' \
de338f9 isaacs Support subfolders in the man/doc files
isaacs authored
4 |sed 's|.md|.1|g' \
5021c4d isaacs folder structure change
isaacs authored
5 |sed 's|doc/cli/|man/man1/|g' )
0e151fc isaacs build submodules in make process
isaacs authored
6
5021c4d isaacs folder structure change
isaacs authored
7 api_docs = $(shell find doc/api -name '*.md' \
a98be6a Jameson Little Updated Makefile to enable building of api-docs into man3
beatgammit authored
8 |sed 's|.md|.3|g' \
5021c4d isaacs folder structure change
isaacs authored
9 |sed 's|doc/api/|man/man3/|g' )
a98be6a Jameson Little Updated Makefile to enable building of api-docs into man3
beatgammit authored
10
d7d8662 isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
11 # This is the default make target.
12 # Since 'make' typically does non-installation build stuff,
13 # it seems appropriate.
0e151fc isaacs build submodules in make process
isaacs authored
14 submodules:
007fedb isaacs Update submodules recursively in make
isaacs authored
15 ! [ -d .git ] || git submodule update --init --recursive
86c296f isaacs Add commands to make man files from the docs.
isaacs authored
16
d7d8662 isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
17 latest: submodules
18 @echo "Installing latest published npm"
19 @echo "Use 'make install' or 'make link' to install the code"
20 @echo "in this folder that you're looking at right now."
4325dcc isaacs fix make latest
isaacs authored
21 node cli.js install -g -f npm
743d387 isaacs Improve install process.
isaacs authored
22
d7d8662 isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
23 install: submodules
364dfc6 isaacs Clobber in Makefile
isaacs authored
24 node cli.js install -g -f
743d387 isaacs Improve install process.
isaacs authored
25
d7d8662 isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
26 # backwards compat
27 dev: install
28
db9ee01 isaacs clean when linking
isaacs authored
29 link: uninstall
364dfc6 isaacs Clobber in Makefile
isaacs authored
30 node cli.js link -f
e0c6abb isaacs Add 'clean' make target
isaacs authored
31
32 clean: uninstall
c7ec9b5 isaacs No need to clean cache as often, makes search slow
isaacs authored
33 node cli.js cache clean
743d387 isaacs Improve install process.
isaacs authored
34
0e151fc isaacs build submodules in make process
isaacs authored
35 uninstall: submodules
94df8f3 isaacs Support npm_debug env in install script
isaacs authored
36 node cli.js rm npm -g -f
86c296f isaacs Add commands to make man files from the docs.
isaacs authored
37
5021c4d isaacs folder structure change
isaacs authored
38 doc: man
dbee5c3 isaacs Change the way npm help works, so that it will work with man programs th...
isaacs authored
39
cf3d925 isaacs Correct `make doc` and `make man`
isaacs authored
40 man: $(cli_docs) $(api_docs)
86c296f isaacs Add commands to make man files from the docs.
isaacs authored
41
cf3d925 isaacs Correct `make doc` and `make man`
isaacs authored
42 man/man1:
5021c4d isaacs folder structure change
isaacs authored
43 [ -d man/man1 ] || mkdir -p man/man1
a98be6a Jameson Little Updated Makefile to enable building of api-docs into man3
beatgammit authored
44
cf3d925 isaacs Correct `make doc` and `make man`
isaacs authored
45 man/man3:
5021c4d isaacs folder structure change
isaacs authored
46 [ -d man/man3 ] || mkdir -p man/man3
c638e80 isaacs Add a makefile to build the man page.
isaacs authored
47
f2ccd17 isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored
48 # use `npm install ronn` for this to work.
cf3d925 isaacs Correct `make doc` and `make man`
isaacs authored
49 man/man1/%.1: doc/cli/%.md man/man1
7d44c11 isaacs Don't install ronn for every doc
isaacs authored
50 @[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
8945848 isaacs A make command that works
isaacs authored
51 ./node_modules/.bin/ronn --roff $< > $@
c638e80 isaacs Add a makefile to build the man page.
isaacs authored
52
cf3d925 isaacs Correct `make doc` and `make man`
isaacs authored
53 man/man3/%.3: doc/api/%.md man/man3
a98be6a Jameson Little Updated Makefile to enable building of api-docs into man3
beatgammit authored
54 @[ -x ./node_modules/.bin/ronn ] || node cli.js install ronn
55 ./node_modules/.bin/ronn --roff $< > $@
56
0e151fc isaacs build submodules in make process
isaacs authored
57 test: submodules
176f12e isaacs Move test command into package.json
isaacs authored
58 node cli.js test
90c9ec8 isaacs Make test (quietly)
isaacs authored
59
5846adf isaacs version bumper
isaacs authored
60 version: link
4f0d334 isaacs Less warning, better style
isaacs authored
61 git add package.json &&\
62 git ci -m v$(shell npm -v)
5846adf isaacs version bumper
isaacs authored
63
64 publish: link
4f0d334 isaacs Less warning, better style
isaacs authored
65 git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
66 git push origin master &&\
67 npm publish
2d27e74 isaacs Add a 'publish' make target
isaacs authored
68
d7d8662 isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored
69 .PHONY: latest install dev link doc clean uninstall test man
Something went wrong with that request. Please try again.