hledger-completion.bash does not depend on command-options because this phony target is so slow. Use make once and subsequently only make hledger-completion.bash
		
			
				
	
	
		
			23 lines
		
	
	
		
			562 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			562 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
| 
 | |
| .PHONY: command-options clean
 | |
| 
 | |
| all: command-options hledger-completion.bash
 | |
| 
 | |
| hledger-completion.bash: hledger-completion.bash.m4 commands-list.txt generic-options.txt
 | |
| 	m4 hledger-completion.bash.m4 > $@
 | |
| 
 | |
| generic-options.txt:
 | |
| 	hledger -h | ./output-options.sh > $@
 | |
| 
 | |
| commands.txt:
 | |
| 	hledger | ./output-commands.sh | grep -v ^hledger > $@
 | |
| 
 | |
| commands-list.txt: commands.txt
 | |
| 	paste -sd, $^ | tr -d '\n' > $@
 | |
| 
 | |
| command-options: commands.txt
 | |
| 	parallel -j8 'hledger {} -h | ./output-options.sh > options-{}.txt' < commands.txt
 | |
| 
 | |
| clean:
 | |
| 	rm -f *.txt hledger-completion.bash
 |