Permalink
Browse files

Support subfolders in the man/doc files

  • Loading branch information...
1 parent ed4506f commit de338f9a5abac06e52e0025b1d939992c429e2eb @isaacs isaacs committed Jul 5, 2010
Showing with 12 additions and 6 deletions.
  1. +12 −6 Makefile
View
@@ -1,8 +1,11 @@
-docs = $(shell ls doc/*.md \
- |sed 's|.md|.1|g' \
- |sed 's|doc/|man/|g' \
- )
+docs = $(shell find doc -name '*.md' \
+ |sed 's|.md|.1|g' \
+ |sed 's|doc/|man/|g' \
+ )
+doc_subfolders = $(shell find doc -type d \
+ |sed 's|doc/|man/|g' \
+ )
install-stable:
./cli.js --auto-activate always install npm@stable
@@ -17,15 +20,18 @@ uninstall:
./cli.js cache clean
./cli.js rm npm
-man:
- @mkdir man
+man: $(doc_subfolders)
+ @if ! test -d man ; then mkdir -p man ; fi
doc: man $(docs)
@true
man/%.1: doc/%.md
ronn --roff --pipe $< > $@
+man/%/: doc/%/
+ @if ! test -d $@ ; then mkdir -p $@ ; fi
+
test:
./test/run.sh

0 comments on commit de338f9

Please sign in to comment.