From 4e4080c5230e81ab631e997ef6258b0dcef81538 Mon Sep 17 00:00:00 2001 From: John Kristensen Date: Sun, 24 Feb 2013 18:04:04 +1100 Subject: [PATCH] Check output directory exists before doing a clean - if the output directory does not exist the 'make clean' command fails, which also means that the 'make html' command which would otherwise create the output directory also fails without generating the output --- pelican/tools/templates/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/templates/Makefile.in b/pelican/tools/templates/Makefile.in index 8dd91630..b15f48ae 100644 --- a/pelican/tools/templates/Makefile.in +++ b/pelican/tools/templates/Makefile.in @@ -43,7 +43,7 @@ $$(OUTPUTDIR)/%.html: $$(PELICAN) $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS) clean: - find $$(OUTPUTDIR) -mindepth 1 -delete + [ ! -d $$(OUTPUTDIR) ] || find $$(OUTPUTDIR) -mindepth 1 -delete regenerate: clean $$(PELICAN) -r $$(INPUTDIR) -o $$(OUTPUTDIR) -s $$(CONFFILE) $$(PELICANOPTS)