make: drop old manual rules
This commit is contained in:
		
							parent
							
								
									d7f6ff0e18
								
							
						
					
					
						commit
						039a1fa778
					
				
							
								
								
									
										73
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										73
									
								
								Makefile
									
									
									
									
									
								
							| @ -1161,79 +1161,6 @@ haddock: \ | ||||
| # in subsequent rules, allow automatic variables to be used in prerequisites (use $$)
 | ||||
| .SECONDEXPANSION: | ||||
| 
 | ||||
| ########################
 | ||||
| # man pages
 | ||||
| 
 | ||||
| MANPAGES=\
 | ||||
| 	hledger-lib/hledger_csv.5 \
 | ||||
| 	hledger-lib/hledger_journal.5 \
 | ||||
| 	hledger-lib/hledger_timeclock.5 \
 | ||||
| 	hledger-lib/hledger_timedot.5 \
 | ||||
| 	hledger/hledger.1 \
 | ||||
| 	hledger-ui/hledger-ui.1 \
 | ||||
| 	hledger-web/hledger-web.1 \
 | ||||
| 
 | ||||
| manpages: $(MANPAGES) \ | ||||
| 		$(call def-help,manpages, generate man pages ) | ||||
| 
 | ||||
| # %.1 %.5: $$@.md doc/manpage.template
 | ||||
| # 	pandoc $< -t man -s --template doc/manpage.template -o $@ \
 | ||||
| # 		--filter tools/pandocCapitalizeHeaders.hs \
 | ||||
| # 		--filter tools/pandocRemoveNotes.hs \
 | ||||
| # 		--filter tools/pandocRemoveLinks.hs \
 | ||||
| # 		--filter tools/pandocRemoveHtmlBlocks.hs \
 | ||||
| # 		--filter tools/pandocRemoveHtmlInlines.hs \
 | ||||
| 
 | ||||
| # much faster when compiled
 | ||||
| # but note, filters need to be compiled with a version of
 | ||||
| # pandoc-types compatible with the pandoc you run them with
 | ||||
| # (filters compiled for pandoc 1.15 broke with pandoc 1.16)
 | ||||
| %.1 %.5: $$@.md doc/manpage.template | ||||
| 	pandoc $< -t man -s --template doc/manpage.template -o $@ \
 | ||||
| 		--filter tools/pandocCapitalizeHeaders \
 | ||||
| 		--filter tools/pandocRemoveNotes \
 | ||||
| 		--filter tools/pandocRemoveLinks \
 | ||||
| 		--filter tools/pandocRemoveHtmlBlocks \
 | ||||
| 		--filter tools/pandocRemoveHtmlInlines \
 | ||||
| 
 | ||||
| clean-manpages: | ||||
| 	rm -f $(MANPAGES) | ||||
| 
 | ||||
| ########################
 | ||||
| # web manual 2, man page synced
 | ||||
| 
 | ||||
| # how to generate the web-based user manual and man pages from one source ?
 | ||||
| 
 | ||||
| # plan 1:
 | ||||
| #
 | ||||
| # core docs are maintained as multiple pandoc-style man-markdown files
 | ||||
| #  eg hledger/hledger.1.md, hledger-ui/hledger-ui.1.md, hledger-lib/hledger_journal.5.md etc.
 | ||||
| #
 | ||||
| # to generate a man page, apply filters:
 | ||||
| #  strip html blocks and inline html
 | ||||
| #
 | ||||
| # to generate web manual content,
 | ||||
| #  extract marked content (inside <div class="userguide">)
 | ||||
| #  and apply filters:
 | ||||
| #   demote headings 4 steps
 | ||||
| 
 | ||||
| site/manual2-1.md: site/manual-start.md site/manual-end.md $(MANPAGES) \ | ||||
| 		$(call def-help,site/manual2.md, generate combined user manual ) | ||||
| 	cat site/manual-start.md >$@ && \
 | ||||
| 	pandoc \
 | ||||
| 		--filter tools/pandocRemoveManpageBlocks \
 | ||||
| 		hledger-ui/hledger-ui.1.md -w markdown >>$@ && \
 | ||||
| 	cat site/manual-end.md >>$@ | ||||
| #--template doc/userguide.template \
 | ||||
| 
 | ||||
| # plan 2:
 | ||||
| #
 | ||||
| # split web manual into pages corresponding to man pages, at least initially
 | ||||
| 
 | ||||
| # %.1.html %.5: $$@.md doc/webmanual.template
 | ||||
| # 	echo pandoc $< -t man -s --template doc/webmanual.template -o $@
 | ||||
| # too hard, see Shake.hs
 | ||||
| 
 | ||||
| ########################
 | ||||
| # 2017 changelog process: 
 | ||||
| # at release time, in each package dir, make changes-show >CHANGES.org, edit, move to CHANGES. Eg:
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user