Skip to content

Commit

Permalink
[dist] Added "website" target to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Aug 3, 2012
1 parent e7ea3f9 commit b321657
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Makefile
Expand Up @@ -44,10 +44,10 @@ API = chapters/json_api.md

HTML = $(MD:.md=.html)

all: book.html book.pdf book.md ReadMe.md API.md clear
all: book.html book.pdf book.md ReadMe.md API.md website clear

regenerate: clean all
git commit -a -m 'Regenerated book' && echo done
git commit -a -m '[dist] Regenerated handbook' && echo done

book.pdf: $(HTML)
@echo "\n... generating $@"
Expand All @@ -70,6 +70,18 @@ book.html: pages/head.html pages/tail.html $(HTML)
@echo $(HTML)
cat pages/head.html $(HTML) pages/tail.html > book.html

public:
mkdir public

website: book.html public
@echo "\n... generating $@"
cp book.html public/index.html
cp -r fig public/fig

serve: website
@echo "\n... serving website!"
node ./bin/server

%.html: %.md
ronn --pipe --fragment $< \
| sed -r 's/<h1>([^ ]+) - /<h1>/' \
Expand All @@ -95,6 +107,7 @@ clean:
rm -f book.*
rm -f chapters/*.html
rm -f appendices/*.html
rm -rf public

clear:
rm -f chapters/*.html
Expand Down

0 comments on commit b321657

Please sign in to comment.