Fixed issue stemming from eval order in make if statement.
So I found a rather weird issue. The makefile was evaling the conditional of a target before that target is called. `make install` is a empty target with a ordered dependency: `init` and `update`. In the `init` script section it will install the `~/.zplug` zsh dependency, and the update script checks to see if that target exist, aborting if it doesn't. The issue is that running `make install` will install the `~/.zplug` dir, then report that the dir doesn't exist. Where running `make init && make update` will work as expected. There is probably some flag in make to resolve this, but I was unable to to find any documentation for this.
This commit is contained in:
		
							parent
							
								
									af327ff7f5
								
							
						
					
					
						commit
						a3b2955e60
					
				
							
								
								
									
										10
									
								
								zsh/makefile
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								zsh/makefile
									
									
									
									
									
								
							| 
						 | 
				
			
			@ -22,12 +22,10 @@ endif
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
update:
 | 
			
		||||
ifeq ($(shell [ -e $(ZPLUG_DIR) ] $(return_val_truthy) ), true)
 | 
			
		||||
	echo "=> Updating zplug"
 | 
			
		||||
	source $(ZPLUG_DIR)/init.zsh ; zplug install ; zplug update
 | 
			
		||||
else
 | 
			
		||||
	$(report) warn "No zplug install detected. Skipping."
 | 
			
		||||
endif
 | 
			
		||||
	[ -e $(ZPLUG_DIR) ] \
 | 
			
		||||
	&& ( echo "=> Updating zplug" \
 | 
			
		||||
	   source $(ZPLUG_DIR)/init.zsh ; source $(ZSH_DIR)/zplug ; zplug install ; zplug update ) \
 | 
			
		||||
	||  $(report) warn "No zplug install detected. Skipping."
 | 
			
		||||
 | 
			
		||||
remove:
 | 
			
		||||
ifeq ($(shell [ -e $(ZPLUG_DIR) ] $(return_val_truthy) ), true)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user