This makes it a hell of a lot simpler but will lose support for BSD make. All effected machines are running gnu-make, so the cost benefit ratio ways heavily in favor of doing this.
		
			
				
	
	
		
			30 lines
		
	
	
		
			591 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			591 B
		
	
	
	
		
			Makefile
		
	
	
	
	
	
SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
 | 
						|
 | 
						|
include ../lib/shared.mk
 | 
						|
TARGET :=  $(XDG_DIR)/mako
 | 
						|
 | 
						|
install: | init update
 | 
						|
 | 
						|
init:
 | 
						|
	if (( $$+commands[mako] )) ; then
 | 
						|
		$(report) header "Setting up mako"
 | 
						|
		$(mk_link) $(SRC) $(TARGET)
 | 
						|
	else
 | 
						|
		$(report) warn "mako not installed. Skipping."
 | 
						|
	fi
 | 
						|
 | 
						|
update:
 | 
						|
	 if (( $$+commands[makoctl] )) ; then
 | 
						|
		$(report) header "Updating mako"
 | 
						|
		if [[ -n `pgrep mako` ]] ; then
 | 
						|
			makoctl reload ; $(report) "mako reload"
 | 
						|
		fi
 | 
						|
	else
 | 
						|
		$(report) debug "mako not installed"
 | 
						|
	fi
 | 
						|
 | 
						|
 | 
						|
remove:
 | 
						|
	$(report) header "Removing mako"
 | 
						|
	$(rm_link) $(TARGET)
 |