aboutsummaryrefslogblamecommitdiffstats
path: root/rust/Makefile
blob: 05911fbca8bf2a12931eba7a01b0ed5695a5d063 (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                   
                                                                             




                                               

                                                                                

          

                                   



                                           
.POSIX:

install:
	if test -d ~/.cargo; then \
		(test ! -e ~/.var/lib/cargo || test -L ~/.var/lib/cargo) && \
		mkdir -p -- ~/.var/lib && \
		mv ~/.cargo ~/.var/lib/cargo; \
	else \
		mkdir -p -- ~/.var/lib; \
	fi
	test ! -e ~/.config/profile.d/cargo || test -L ~/.config/profile.d/cargo
	ln -sf -- ~/.dotfiles/cargo/user-profile ~/.config/profile.d/cargo

uninstall:
	+! ../check-installed rust
	+! ../check-installed cargo
	-rm -rf -- ~/.var/cache/cargo
	-rm -rf -- ~/.cargo
	-unlink -- ~/.config/profile.d/rust
	-rmdir -- ~/.config/profile.d