From 0bda0c4cbf5e8e2e9fe2141290a544db306d607a Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Thu, 17 Nov 2016 15:32:44 -0800 Subject: [Makefile] rewrite it, to install correctly the fonts. --- Makefile | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index a65bdaf..0f1190d 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,20 @@ -INTO = $(HOME) +INTO = $(HOME) +FONTS_DIR = $(HOME)/Library/Fonts + +MYFONTS = $(wildcard fonts/*.ttf) INSTALL = \ - bashrc \ - aspell.en.pws \ - emacs.d \ - gitconfig \ - gitignore + aspell.en.pws \ + bashrc \ + emacs.d \ + gitconfig \ + gitignore -git: - git config --local user.email "franck.cuny@gmail.com" - git config --local user.name "Franck Cuny" INSTALLED = $(patsubst %,$(INTO)/.%,$(INSTALL)) +FONTS = $(patsubst fonts/%.ttf,$(FONTS_DIR)/%.ttf,$(MYFONTS)) LN = @ln -sf -install: $(INSTALLED) $(HOME)/src $(HOME)/.ssh/authorized_keys git $(INTO)/.% : % @[ ! -e $@ ] || [ -h $@ ] || mv -f $@ $@.bak @@ -24,14 +24,25 @@ $(HOME)/.ssh/authorized_keys: @curl https://github.com/franckcuny.keys -o $(HOME)/.ssh/authorized_keys $(HOME)/src: - mkdir -p $(HOME)/src + @mkdir -p $(HOME)/src + +$(FONTS_DIR)/%.ttf: fonts/%.ttf + @cp $< $@ + +.PHONY: git +git: + @git config --local user.email "franck.cuny@gmail.com" + @git config --local user.name "Franck Cuny" +.PHONY: check-dead check-dead: @find ~ -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -print @find ~/bin -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -print +.PHONY: clean-dead clean-dead: @find ~ -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -delete @find ~/bin -maxdepth 1 -name '.*' -type l -exec test ! -e {} \; -delete -.PHONY: install check-dead clean-dead git +.PHONY: install +install: $(INSTALLED) $(HOME)/src $(HOME)/.ssh/authorized_keys git $(FONTS) -- cgit 1.4.1