From 6c87b87835ce155ccfaa3af13f2dde99f70a2308 Mon Sep 17 00:00:00 2001 From: roktas Date: Wed, 8 Nov 2006 10:56:05 +0000 Subject: 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 --- Makefile | 26 ++++++++++++++------------ 1 file 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 -- cgit v1.2.3