Skip to content

Commit 250fc39

Browse files
committedJun 26, 2020
Makefile
Reviewed-by: iris
1 parent 49dd521 commit 250fc39

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎Makefile

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ build:
1313

1414
build/%.html: src/%.md
1515
cp src/footer.html build/tmp_footer.html
16-
perl -pi -e 'BEGIN {$$hash=shift} s/!git-commit-hash!/$$hash/' $$(git log -1 --pretty=format:"%h" -- $<) build/tmp_footer.html
16+
CHANGE_HASH=$$(git log -1 --pretty=format:"%h" -- $<); \
17+
if [ "$$CHANGE_HASH" = "" ]; then \
18+
CHANGE_HASH="0000000"; \
19+
fi; \
20+
perl -pi -e 'BEGIN {$$hash=shift} s/!git-commit-hash!/$$hash/' $$CHANGE_HASH build/tmp_footer.html
1721
perl -pi -e 's;!source-file-name!;$<;' build/tmp_footer.html
1822
pandoc $< --css guidestyle.css --strip-comments --standalone --ascii --to html4 --title-prefix "The OpenJDK Developers' Guide" --include-after-body=build/tmp_footer.html | iconv -f UTF-8 -t ISO-8859-1 > $@
1923
perl -pi -e 's/ charset=utf-8//' $@

0 commit comments

Comments
 (0)
Please sign in to comment.