equal
deleted
inserted
replaced
12 # install-local-symlink create symlink from installed dir to user HOME dir, so dictionaries been available in stardict |
12 # install-local-symlink create symlink from installed dir to user HOME dir, so dictionaries been available in stardict |
13 # uninstall-local-symlink remove symlink from user HOME directory |
13 # uninstall-local-symlink remove symlink from user HOME directory |
14 # |
14 # |
15 # You can override such variables in Makefile.config: |
15 # You can override such variables in Makefile.config: |
16 # |
16 # |
17 # SF_USER SourceForge user name |
17 # SF_USER SourceForge user name. |
|
18 # prefix Prefix to install path. |
|
19 # DESTDIR Prefix to 'prefix' variable value. |
18 |
20 |
19 SHELL = /bin/sh |
21 SHELL = /bin/sh |
20 export PATH := /bin:/usr/bin:${PATH} |
22 export PATH := /bin:/usr/bin:${PATH} |
21 |
23 |
22 # Disable built in pattern rules. |
24 # Disable built in pattern rules. |
75 endif |
77 endif |
76 |
78 |
77 ################################################################ |
79 ################################################################ |
78 # Build tools definition/switches. |
80 # Build tools definition/switches. |
79 |
81 |
|
82 INSTALL = install |
|
83 INSTALL_PROGRAM = $(INSTALL) |
|
84 INSTALL_DATA = $(INSTALL) -m 644 |
|
85 |
80 RST_WARNING_FLAGS := --halt warning |
86 RST_WARNING_FLAGS := --halt warning |
81 RST_FLAGS := --strip-comments |
87 RST_FLAGS := --strip-comments |
82 RST_FLAGS += $(RST_WARNING_FLAGS) |
88 RST_FLAGS += $(RST_WARNING_FLAGS) |
83 |
89 |
84 RST2HTML := rst2html |
90 RST2HTML := rst2html |
95 prefix = /usr/local |
101 prefix = /usr/local |
96 else |
102 else |
97 prefix = $(HOME)/usr |
103 prefix = $(HOME)/usr |
98 endif |
104 endif |
99 endif |
105 endif |
100 datarootdir = $(prefix)/share |
106 datarootdir := $(DESTDIR)$(prefix)/share |
101 datadir = $(datarootdir)/dictd |
107 datadir = $(datarootdir)/dictd |
102 |
108 |
103 ################################################################ |
109 ################################################################ |
104 # Project dirs/files. |
110 # Project dirs/files. |
105 |
111 |
228 |
234 |
229 .PHONY: install |
235 .PHONY: install |
230 install: dist |
236 install: dist |
231 mkdir -p $(datadir) |
237 mkdir -p $(datadir) |
232 for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |
238 for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |
233 install -m 644 $$f $(datadir); \ |
239 $(INSTALL_DATA) $$f $(datadir); \ |
234 done |
240 done |
235 |
241 |
236 .PHONY: uninstall |
242 .PHONY: uninstall |
237 uninstall: |
243 uninstall: |
238 for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |
244 for f in $(DICTDZ_FILES) $(INDEX_FILES); do \ |