source: Makefile @ e7de6cc

Last change on this file since e7de6cc was e7de6cc, checked in by Tomasz Obrebski <to@…>, 12 years ago

new version of dgp
added dgc, tre and compdic components
compiledic renamed to compdic_utf8
./configure updated

  • Property mode set to 100644
File size: 3.5 KB
Line 
1include config.mak
2
3CUR_DIR=$(shell pwd)
4SRC_DIR=$(CUR_DIR)/src
5
6TARGETS = components configuration share libraries
7
8ifeq ($(BUILD_DOC), yes)
9        TARGETS += documentation
10endif
11
12.PHONY: all
13all: $(TARGETS)
14
15# ------------------------------------------------------------------
16# main section
17# ------------------------------------------------------------------
18.PHONY: components
19components:
20        cd $(SRC_DIR)/lib && make; cd $(CUR_DIR)
21        @for cmp in $(COMPONENTS); do\
22                cd $(SRC_DIR)/$$cmp && make; cd $(CUR_DIR); \
23        done
24
25.PHONY: documentation
26documentation:
27        cd $(CUR_DIR)/doc && make; cd $(CUR_DIR)
28
29.PHONY: configuration
30configuration:
31        cd $(CUR_DIR)/conf && make; cd $(CUR_DIR)
32
33.PHONY: libraries
34libraries:
35
36.PHONY: share
37share:
38
39# ------------------------------------------------------------------
40# cleanup section
41# ------------------------------------------------------------------
42.PHONY: clean
43clean: clean_components clean_documentation clean_config clean_config_mak
44        @echo "All files cleaned successfully!"
45
46.PHONY: clean_components
47clean_components:
48        @for cmp in $(COMPONENTS); do \
49                cd $(SRC_DIR)/$$cmp && make clean; cd $(CUR_DIR); \
50        done
51        cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR);
52
53.PHONY: clean_documentation
54clean_documentation:
55        cd $(CUR_DIR)/doc && make clean; cd $(CUR_DIR)
56
57.PHONY: clean_config
58clean_config:
59        cd $(CUR_DIR)/conf && make clean; cd $(CUR_DIR)
60
61.PHONY: clean_config_mak
62clean_config_mak:
63        rm config.mak || true
64
65# ------------------------------------------------------------------
66# install section
67# ------------------------------------------------------------------
68.PHONY: install
69install: all install_dirs install_components install_configuration install_libraries install_documentation install_share
70
71.PHONY: install_dirs
72install_dirs:
73        install -d $(PREFIX) \
74                $(BIN_DIR) \
75                $(CONF_DIR) \
76                $(LANG_DIR) \
77                $(LIB_DIR) \
78                $(DOC_DIR) \
79                $(SHARE_DIR)/info
80
81.PHONY: install_components
82install_components: components
83        @for cmp in $(COMPONENTS); do \
84                cd $(SRC_DIR)/$$cmp && make install; cd $(CUR_DIR); \
85        done
86
87.PHONY: install_configuration
88install_configuration: configuration
89        cd $(CUR_DIR)/conf && make install; cd $(CUR_DIR)
90
91.PHONY: install_libraries
92install_libraries: libraries
93        cd $(CUR_DIR)/lib && make install; cd $(CUR_DIR)
94
95.PHONY: install_documentation
96install_documentation: documentation
97        cd $(CUR_DIR)/doc && make install; cd $(CUR_DIR)
98
99.PHONY: install_share
100install_share: share
101        cd $(CUR_DIR)/share && make install; cd $(CUR_DIR)
102
103# ------------------------------------------------------------------
104# uninstall section
105# ------------------------------------------------------------------
106
107.PHONY: uninstall
108uninstall: uninstall_share uninstall_documentation uninstall_libraries uninstall_configuration uninstall_components uninstall_dirs
109
110.PHONY: uninstall_components
111uninstall_components:
112        @for cmp in $(COMPONENTS); do \
113                cd $(SRC_DIR)/$$cmp && make uninstall; cd $(CUR_DIR); \
114        done
115
116.PHONY: uninstall_configuration
117uninstall_configuration:
118        cd $(CUR_DIR)/conf && make uninstall; cd $(CUR_DIR)
119
120.PHONY: uninstall_libraries
121uninstall_libraries:
122        cd $(CUR_DIR)/lib && make uninstall; cd $(CUR_DIR)
123
124.PHONY: uninstall_documentation
125uninstall_documentation:
126        cd $(CUR_DIR)/doc && make uninstall; cd $(CUR_DIR)
127
128.PHONY: uninstall_share
129uninstall_share:
130        cd $(CUR_DIR)/share && make uninstall; cd $(CUR_DIR)
131
132.PHONY: uninstall_dirs
133uninstall_dirs: uninstall_configuration uninstall_documentation uninstall_share uninstall_libraries
134        rmdir $(CONF_DIR)
135        rmdir $(DOC_DIR)
136        rmdir $(LANG_DIR)
137        rmdir $(LIB_DIR)
Note: See TracBrowser for help on using the repository browser.