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
This commit is contained in:
John Kristensen 2013-02-24 18:04:04 +11:00 committed by Alexis Métaireau
commit 4e4080c523

View file

@ -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)