# HG changeset patch # User Oleksandr Gavenko # Date 1262981926 -7200 # Node ID d4b27e5b7a4b651878ee09818f4f757fb93581fb # Parent 9f5eedd0817848246294bbb3bca91c05516a5fa5 Added per user install target. diff -r 9f5eedd08178 -r d4b27e5b7a4b Makefile --- a/Makefile Fri Jan 08 22:17:39 2010 +0200 +++ b/Makefile Fri Jan 08 22:18:46 2010 +0200 @@ -9,6 +9,9 @@ datadir = $(datarootdir)/stardict dicdir = $(datadir)/dic/$(DICSETNAME) +# Per user dictionaries hold in user HOME directory. +dicdir-local = $(HOME)/.stardict/dic/$(DICSETNAME) + F_TAB_ = $(wildcard *.tab_) F_TAB = $(patsubst %.tab_,%.tab,$(F_TAB_)) @@ -44,12 +47,18 @@ uninstall: rm -r -f $(dicdir) -install-user: install - mkdir -p $(HOME)/.stardict/dic - ln -s $(dicdir) $(HOME)/.stardict/dic/$(DICSETNAME) +.PHONY: install-local +install-local: + mkdir -p $(dicdir-local) + for dic in $(FNAME); do \ + install -m 644 $$dic.dict.dz $(dicdir-local); \ + install -m 644 $$dic.idx $(dicdir-local); \ + install -m 644 $$dic.ifo $(dicdir-local); \ + done -uninstall-user: uninstall - rm -f $(HOME)/.stardict/dic/$(DICSETNAME) +.PHONY: uninstall-local +uninstall-local: + rm -f -r $(HOME)/.stardict/dic/$(DICSETNAME) clean: for dic in $(FNAME); do \