goat3d

diff exporters/blendgoat/Makefile @ 38:60f2037680ee

split the exporter into two files to make it more readable (and maybe make an importer too at some point?)
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 07 Oct 2013 20:02:57 +0300
parents 9a211986a28b
children
line diff
     1.1 --- a/exporters/blendgoat/Makefile	Sun Oct 06 17:42:43 2013 +0300
     1.2 +++ b/exporters/blendgoat/Makefile	Mon Oct 07 20:02:57 2013 +0300
     1.3 @@ -1,5 +1,6 @@
     1.4 +name = blendgoat
     1.5  scriptfile = blendgoat.py
     1.6 -scriptfile_path := $(shell pwd)/src/$(scriptfile)
     1.7 +srcpath := $(shell pwd)/src
     1.8  
     1.9  ifeq ($(shell uname -s), Darwin)
    1.10  	cfgpath = $(HOME)/Library/Application\ Support/Blender
    1.11 @@ -16,18 +17,25 @@
    1.12  install:
    1.13  	@cd $(cfgpath) && \
    1.14  	for i in *; do \
    1.15 -		echo "installing src/$(scriptfile) -> $(cfgpath)/$$i/scripts/addons/$(scriptfile)"; \
    1.16 -		mkdir -p $$i/scripts/addons; \
    1.17 -		rm -f $$i/scripts/addons/$(scriptfile); \
    1.18 -		cp $(scriptfile_path) $$i/scripts/addons/$(scriptfile); \
    1.19 +		echo "installing to $(cfgpath)/$$i/scripts/addons/$(name)"; \
    1.20 +		rm -f $$i/scripts/addons/$(name)/*; \
    1.21 +		mkdir -p $$i/scripts/addons/$(name); \
    1.22 +		cp $(srcpath)/*.py $$i/scripts/addons/$(name)/; \
    1.23  	done
    1.24  
    1.25  .PHONY: link
    1.26  link:
    1.27 +	@cd $(cfgpath) && \
    1.28 +	for i in *; do \
    1.29 +		echo "linking to $(cfgpath)/$$i/scripts/addons/$(name)"; \
    1.30 +		mkdir -p $$i/scripts/addons; \
    1.31 +		rm -rf $$i/scripts/addons/$(name); \
    1.32 +		ln -s $(srcpath) $$i/scripts/addons/$(name); \
    1.33 +	done
    1.34 +
    1.35 +.PHONY: uninstall
    1.36 +uninstall:
    1.37  	cd $(cfgpath) && \
    1.38  	for i in *; do \
    1.39 -		echo "linking src/$(scriptfile) to $(cfgpath)/$$i/scripts/addons/$(scriptfile)"; \
    1.40 -		mkdir -p $$i/scripts/addons; \
    1.41 -		rm -f $$i/scripts/addons/$(scriptfile); \
    1.42 -		ln -s $(scriptfile_path) $$i/scripts/addons/$(scriptfile); \
    1.43 +		rm -rf $$i/scripts/addons/$(name); \
    1.44  	done