| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | SRC_MD_FILES != find source -name '*.md' | 
					
						
							| 
									
										
										
										
											2019-12-08 19:00:29 +00:00
										 |  |  | DST_HTML_FILES := $(SRC_MD_FILES:source/%.md=%.html) | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | PANDOC != command -v pandoc 2> /dev/null | 
					
						
							| 
									
										
										
										
											2019-10-22 12:34:14 +00:00
										 |  |  | PHP != command -v php 2> /dev/null | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-08 19:00:29 +00:00
										 |  |  | all: dep-pandoc $(DST_HTML_FILES) | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-12-08 19:00:29 +00:00
										 |  |  | index: dep-php index.html | 
					
						
							| 
									
										
										
										
											2019-12-08 07:37:04 +00:00
										 |  |  | %.html: %.php | 
					
						
							| 
									
										
										
										
											2019-10-22 12:34:14 +00:00
										 |  |  | 	php $< > $@ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | %.html: source/%.md | 
					
						
							| 
									
										
										
										
											2019-10-01 16:59:22 +00:00
										 |  |  | 	$(info building $@) | 
					
						
							| 
									
										
										
										
											2019-09-24 15:07:46 +00:00
										 |  |  | 	@$(PANDOC) \
 | 
					
						
							| 
									
										
										
										
											2020-04-13 04:46:48 +00:00
										 |  |  | 		--from markdown+backtick_code_blocks \
 | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 		--template wiki.tmpl \
 | 
					
						
							|  |  |  | 		--lua-filter header-permalinks.lua \
 | 
					
						
							| 
									
										
										
										
											2020-04-12 05:19:14 +00:00
										 |  |  | 		--highlight-style=custom.theme \
 | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 		--title-prefix "tilde.club wiki" \
 | 
					
						
							| 
									
										
										
										
											2019-09-23 03:46:32 +00:00
										 |  |  | 		--variable toc-title:"table of contents" \
 | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 		--standalone \
 | 
					
						
							|  |  |  | 		--table-of-contents \
 | 
					
						
							|  |  |  | 		--output $@ \
 | 
					
						
							|  |  |  | 		$< | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | clean: | 
					
						
							| 
									
										
										
										
											2019-10-01 16:59:22 +00:00
										 |  |  | 	$(info removing generated files) | 
					
						
							| 
									
										
										
										
											2019-10-22 12:34:14 +00:00
										 |  |  | 	-rm $(DST_HTML_FILES) | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-22 12:34:14 +00:00
										 |  |  | dep-pandoc:: | 
					
						
							| 
									
										
										
										
											2019-10-01 16:59:22 +00:00
										 |  |  | ifndef PANDOC | 
					
						
							|  |  |  | 	$(error missing dependency 'pandoc'. please install and try again) | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-22 12:34:14 +00:00
										 |  |  | dep-php:: | 
					
						
							|  |  |  | ifndef PHP | 
					
						
							|  |  |  | 	$(error missing dependency 'php'. please install and try again) | 
					
						
							|  |  |  | endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-10-01 16:59:22 +00:00
										 |  |  | .PHONY: clean dep-pandoc | 
					
						
							| 
									
										
										
										
											2019-09-23 03:07:21 +00:00
										 |  |  | 
 |