aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-08 10:56:05 +0000
committerroktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b>2006-11-08 10:56:05 +0000
commit6c87b87835ce155ccfaa3af13f2dde99f70a2308 (patch)
tree4ced56f8e17f222b87901b58c2c3c8c7cc7f03b2
parentcc14b530907c093b7af9ebd3345197411503974b (diff)
downloadpandoc-6c87b87835ce155ccfaa3af13f2dde99f70a2308.tar.gz
Put all website commands into a subshell jail. If any command failed, we
would end up with web_dest directory which would have to be removed manually for further attempts. If this looked ugly; as an alternative solution we could change 'website' target as follows: website: $(web_dest)/index.html $(web_dest)/index.html: ... git-svn-id: https://pandoc.googlecode.com/svn/trunk@82 788f1e2b-df1e-0410-8736-df70ead52e1b
-rw-r--r--Makefile26
1 files changed, 14 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index ddb10b814..d9b4477cd 100644
--- a/Makefile
+++ b/Makefile
@@ -308,18 +308,20 @@ $(web_dest)/: $(MAIN) html $(tarball_name)
exit 1; \
}
-rm -rf $(web_dest)
- mkdir $(web_dest)
- cp -r html $(web_dest)/doc
- cp $(osx_dmg_name) $(web_dest)/
- cp ../$(deb_main) $(web_dest)/
- cp $(tarball_name) $(web_dest)/
- cp $(web_src)/*.css $(web_dest)/
- $(make_page) README > $(web_dest)/README.html
- $(make_page) INSTALL > $(web_dest)/INSTALL.html
- $(make_page) changelog > $(web_dest)/history.html
- sed -e 's/@TARBALL_NAME@/$(tarball_name)/g' $(web_src)/index.txt | \
- sed -e 's/@DEB_NAME@/$(deb_main)/g' | \
- $(make_page) > $(web_dest)/index.html
+ ( \
+ mkdir $(web_dest); \
+ cp -r html $(web_dest)/doc; \
+ cp $(osx_dmg_name) $(web_dest)/; \
+ cp ../$(deb_main) $(web_dest)/; \
+ cp $(tarball_name) $(web_dest)/; \
+ cp $(web_src)/*.css $(web_dest)/; \
+ $(make_page) README > $(web_dest)/README.html; \
+ $(make_page) INSTALL > $(web_dest)/INSTALL.html; \
+ $(make_page) changelog > $(web_dest)/history.html; \
+ sed -e 's/@TARBALL_NAME@/$(tarball_name)/g' $(web_src)/index.txt | \
+ sed -e 's/@DEB_NAME@/$(deb_main)/g' | \
+ $(make_page) > $(web_dest)/index.html; \
+ ) || { rm -rf $(web_dest); exit 1; }
.PHONY: distclean clean
distclean: clean