Commits

Anonymous committed 1a19367

better `clean` targe for Makefiles in doc/ and samples/

Comments (0)

Files changed (4)

 PAPEROPT_letter = -D latex_paper_size=letter
 ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
 
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest samples
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest samples samples-clean
 
 help:
 	@echo "Please use \`make <target>' where <target> is one of"
 	@echo "  linkcheck  to check all external links for integrity"
 	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
 
-clean:
-	-rm -rf $(BUILDDIR)/*
-
-clean-html:
-	-rm -rf $(BUILDDIR)/html/*
+clean: samples-clean
+	-rm -rf $(BUILDDIR)/*/* $(BUILDDIR)/*/.*
 
 html: samples
 	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
 	for sdir in source/samples/*; do \
 		[ -e $$sdir/Makefile ] && make -C $$sdir; \
 		done
+
+samples-clean:
+	for sdir in source/samples/*; do \
+		[ -e $$sdir/Makefile ] && make -C $$sdir clean; \
+		done

samples/kaplan_yorke_map/Makefile

 	gcc -c $< -fPIC -O3 -ftree-vectorizer-verbose=1
 
 clean:
-	rm $(objs) $(slib)
+	-rm $(objs) $(slib)
 
 .PHONY: all clean

samples/lode/Makefile

 	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -Wextra -shared $< -o $@
 
 clean:
-	rm *.so
+	-rm *.so

samples/lode_rk4/Makefile

 	$(CC) $(CFLAGS) $(CPPFLAGS) -Wall -Wextra -shared $< -o $@
 
 clean:
-	rm *.so
+	-rm *.so