mirror of
				https://github.com/Zygo/bees.git
				synced 2025-11-03 19:50:34 +01:00 
			
		
		
		
	It turns out both dash and bash support `command -v` so let's use that. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
		
			
				
	
	
		
			13 lines
		
	
	
		
			374 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
		
			374 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
MARKDOWN := $(firstword $(shell command -v markdown markdown2 markdown_py 2>/dev/null || echo markdown))
 | 
						|
.PHONY: docs
 | 
						|
 | 
						|
docs: $(subst .md,.html,$(wildcard *.md)) index.html ../README.html
 | 
						|
 | 
						|
%.html: %.md
 | 
						|
	$(MARKDOWN) $< | sed -e 's/\.md/\.html/g' > $@.new
 | 
						|
	mv -f $@.new $@
 | 
						|
 | 
						|
index.md: ../README.md
 | 
						|
	sed -e 's:docs/::g' < ../README.md > index.md.new
 | 
						|
	mv -f index.md.new index.md
 |