Skip to content

Commit

Permalink
Makefile: add recipe for 'all' as default
Browse files Browse the repository at this point in the history
  • Loading branch information
carandraug committed May 20, 2018
1 parent 55203d2 commit 5b1f348
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ TAR ?= tar
XXD ?= xxd
ZIP ?= zip

## Default target (first declared target) must be the same as all.
all: index.html help.html

help:
@echo "Targets:"
Expand Down Expand Up @@ -107,7 +109,7 @@ $(foreach file, $(npm_css_dependencies) $(npm_js_dependencies), \
templates/link-includes.in: $(npm_css_dependencies)
$(RM) $@
for FILE in $^ ; do \
INTEGRITY=`shasum -b -a 384 "$$FILE" | xxd -r -p | base64`; \
INTEGRITY=`$(SHASUM) -b -a 384 "$$FILE" | $(XXD) -r -p | $(BASE64)`; \
echo ' <link rel="stylesheet" type="text/css"' >>\
echo ' href="'"$$FILE"'"' >> $@; \
echo ' integrity="sha384-'"$$INTEGRITY"'"' >> $@; \
Expand All @@ -117,7 +119,7 @@ templates/link-includes.in: $(npm_css_dependencies)
templates/script-includes.in: $(npm_js_dependencies)
$(RM) $@
for FILE in $^ ; do \
INTEGRITY=`shasum -b -a 384 "$$FILE" | xxd -r -p | base64`; \
INTEGRITY=`$(SHASUM) -b -a 384 "$$FILE" | $(XXD) -r -p | $(BASE64)`; \
echo ' <script src="'"$$FILE"'"' >> $@; \
echo ' integrity="sha384-'"$$INTEGRITY"'"' >> $@; \
echo ' crossorigin="anonymous"></script>' >> $@; \
Expand All @@ -134,7 +136,7 @@ templates/script-includes.in: $(npm_js_dependencies)
-e '}' \
$< > $@

serve: index.html
serve: all
$(PYTHON) -m SimpleHTTPServer

check:
Expand Down

0 comments on commit 5b1f348

Please sign in to comment.