Skip to content
Newer
Older
100644 127 lines (91 sloc) 3.33 KB
64b4d65 explicitly set bash as the shell since the makefile uses bash-isms
gflarity authored Feb 22, 2011
1 SHELL = bash
2
cc34185 @isaacs doc/index.md depends on readme
isaacs authored Sep 8, 2011
3 markdowns = $(shell find doc -name '*.md' | grep -v 'index') README.md
8fdd60d @isaacs Build an index of all html documentation files
isaacs authored Sep 8, 2011
4
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 24, 2011
5 cli_mandocs = $(shell find doc/cli -name '*.md' \
6 |sed 's|.md|.1|g' \
7 |sed 's|doc/cli/|man/man1/|g' ) \
8 man/man1/README.1 \
9 man/man1/index.1
10
11 api_mandocs = $(shell find doc/api -name '*.md' \
12 |sed 's|.md|.3|g' \
13 |sed 's|doc/api/|man/man3/|g' )
14
15 cli_htmldocs = $(shell find doc/cli -name '*.md' \
16 |grep -v 'index.md' \
17 |sed 's|.md|.html|g' \
18 |sed 's|doc/cli/|html/doc/|g' ) \
19 html/doc/README.html \
20 html/doc/index.html
21
22 api_htmldocs = $(shell find doc/api -name '*.md' \
23 |sed 's|.md|.html|g' \
24 |sed 's|doc/api/|html/api/|g' )
25
26 mandocs = $(api_mandocs) $(cli_mandocs)
27
28 htmldocs = $(api_htmldocs) $(cli_htmldocs)
0e151fc @isaacs build submodules in make process
isaacs authored Feb 18, 2011
29
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored Sep 22, 2011
30 all: submodules doc
31
0e151fc @isaacs build submodules in make process
isaacs authored Feb 18, 2011
32 submodules:
007fedb @isaacs Update submodules recursively in make
isaacs authored Jul 16, 2011
33 ! [ -d .git ] || git submodule update --init --recursive
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored Apr 25, 2010
34
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored Feb 22, 2011
35 latest: submodules
36 @echo "Installing latest published npm"
37 @echo "Use 'make install' or 'make link' to install the code"
38 @echo "in this folder that you're looking at right now."
4325dcc @isaacs fix make latest
isaacs authored Jul 16, 2011
39 node cli.js install -g -f npm
743d387 @isaacs Improve install process.
isaacs authored May 10, 2010
40
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored Sep 22, 2011
41 install: all
364dfc6 @isaacs Clobber in Makefile
isaacs authored Apr 4, 2011
42 node cli.js install -g -f
743d387 @isaacs Improve install process.
isaacs authored May 10, 2010
43
d7d8662 @isaacs Closes GH-609 `make install` installs current, not latest
isaacs authored Feb 23, 2011
44 # backwards compat
45 dev: install
46
db9ee01 @isaacs clean when linking
isaacs authored Oct 28, 2010
47 link: uninstall
364dfc6 @isaacs Clobber in Makefile
isaacs authored Apr 4, 2011
48 node cli.js link -f
e0c6abb @isaacs Add 'clean' make target
isaacs authored Sep 2, 2010
49
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored Sep 22, 2011
50 clean: doc-clean uninstall
c7ec9b5 @isaacs No need to clean cache as often, makes search slow
isaacs authored Jul 26, 2011
51 node cli.js cache clean
743d387 @isaacs Improve install process.
isaacs authored May 10, 2010
52
0e151fc @isaacs build submodules in make process
isaacs authored Feb 18, 2011
53 uninstall: submodules
94df8f3 @isaacs Support npm_debug env in install script
isaacs authored Jul 27, 2011
54 node cli.js rm npm -g -f
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored Apr 25, 2010
55
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored Sep 22, 2011
56 doc: node_modules/ronn $(mandocs) $(htmldocs)
c638e80 @isaacs Add a makefile to build the man page.
isaacs authored Apr 24, 2010
57
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored Sep 22, 2011
58 docclean: doc-clean
928bb81 @isaacs Update version in doc
isaacs authored Sep 8, 2011
59 doc-clean:
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
60 rm -rf \
61 node_modules/ronn \
62 doc/cli/index.md \
63 doc/api/index.md \
64 $(api_mandocs) \
65 $(cli_mandocs) \
66 $(api_htmldocs) \
67 $(cli_htmldocs) \
68 &>/dev/null || true
205a056 @isaacs Close #1445 'make' should build docs as well
isaacs authored Sep 22, 2011
69
70 node_modules/ronn:
71 node cli.js install git+https://github.com/isaacs/ronnjs.git
928bb81 @isaacs Update version in doc
isaacs authored Sep 8, 2011
72
f2ccd17 @isaacs Use ronnjs instead of the ronn rubygem to build docs
isaacs authored Aug 18, 2010
73 # use `npm install ronn` for this to work.
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
74 man/man1/README.1: README.md scripts/doc-build.sh package.json
75 scripts/doc-build.sh $< $@
76
1f67836 @isaacs Makefile: cli docs live in doc/cli/%.md
isaacs authored Sep 24, 2011
77 man/man1/%.1: doc/cli/%.md scripts/doc-build.sh package.json
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
78 scripts/doc-build.sh $< $@
30818ab @isaacs html docs
isaacs authored Sep 3, 2011
79
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
80 man/man3/%.3: doc/api/%.md man/man3 node_modules/ronn
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
81 scripts/doc-build.sh $< $@
ec66825 @isaacs Fold the README into the html doc build
isaacs authored Sep 4, 2011
82
7ce63c3 @isaacs docs include version
isaacs authored Sep 16, 2011
83 html/doc/README.html: README.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
84 scripts/doc-build.sh $< $@
ec66825 @isaacs Fold the README into the html doc build
isaacs authored Sep 4, 2011
85
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
86 html/doc/%.html: doc/cli/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
87 scripts/doc-build.sh $< $@
88
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
89 html/api/%.html: doc/api/%.md html/dochead.html html/docfoot.html scripts/doc-build.sh package.json
90 scripts/doc-build.sh $< $@
91
92 doc/cli/index.md: $(markdowns) scripts/index-build.js scripts/doc-build.sh package.json
93 node scripts/index-build.js > $@
94
5021c4d @isaacs folder structure change
isaacs authored Aug 22, 2011
95 doc: man
dbee5c3 @isaacs Change the way npm help works, so that it will work with man programs…
isaacs authored Sep 21, 2010
96
cf3d925 @isaacs Correct `make doc` and `make man`
isaacs authored Aug 23, 2011
97 man: $(cli_docs) $(api_docs)
86c296f @isaacs Add commands to make man files from the docs.
isaacs authored Apr 25, 2010
98
cf3d925 @isaacs Correct `make doc` and `make man`
isaacs authored Aug 23, 2011
99 man/man1:
5021c4d @isaacs folder structure change
isaacs authored Aug 23, 2011
100 [ -d man/man1 ] || mkdir -p man/man1
a98be6a @beatgammit Updated Makefile to enable building of api-docs into man3
beatgammit authored Aug 19, 2011
101
cf3d925 @isaacs Correct `make doc` and `make man`
isaacs authored Aug 23, 2011
102 man/man3:
5021c4d @isaacs folder structure change
isaacs authored Aug 23, 2011
103 [ -d man/man3 ] || mkdir -p man/man3
8fdd60d @isaacs Build an index of all html documentation files
isaacs authored Sep 8, 2011
104
0e151fc @isaacs build submodules in make process
isaacs authored Feb 18, 2011
105 test: submodules
176f12e @isaacs Move test command into package.json
isaacs authored Apr 13, 2011
106 node cli.js test
90c9ec8 @isaacs Make test (quietly)
isaacs authored Jul 3, 2010
107
5846adf @isaacs version bumper
isaacs authored Jan 11, 2011
108 version: link
4f0d334 @isaacs Less warning, better style
isaacs authored Apr 21, 2011
109 git add package.json &&\
110 git ci -m v$(shell npm -v)
5846adf @isaacs version bumper
isaacs authored Jan 11, 2011
111
112 publish: link
4f0d334 @isaacs Less warning, better style
isaacs authored Apr 21, 2011
113 git tag -s -m v$(shell npm -v) v$(shell npm -v) &&\
7547328 @isaacs Update 'make publish' to push tags to github, too
isaacs authored Sep 16, 2011
114 git push origin master --tags &&\
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
115 npm publish &&\
116 make doc-publish
117
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored Sep 22, 2011
118 docpublish: doc-publish
bf46460 @isaacs Abstract doc building to a separate script
isaacs authored Sep 4, 2011
119 doc-publish: doc
120 rsync -vazu --stats --no-implied-dirs --delete html/doc/ npmjs.org:/var/www/npmjs.org/public/doc
308dd42 @isaacs Merge branch 'api-doc' into api-doc2
isaacs authored Sep 25, 2011
121 rsync -vazu --stats --no-implied-dirs --delete html/api/ npmjs.org:/var/www/npmjs.org/public/api
2d27e74 @isaacs Add a 'publish' make target
isaacs authored Jan 10, 2011
122
64ff08f @isaacs Alias doc-clean and doc-publish to docclean and docpublish
isaacs authored Sep 22, 2011
123 sandwich:
124 @[ $$(whoami) = "root" ] && (echo "ok"; echo "ham" > sandwich) || echo "make it yourself"
125
126 .PHONY: all latest install dev link doc clean uninstall test man doc-publish doc-clean docclean docpublish
Something went wrong with that request. Please try again.