source: app/Makefile @ eedf648

help
Last change on this file since eedf648 was 52bccea, checked in by pawelk <pawelk@…>, 17 years ago

Pierwszy etap zmiany con na kon (przez windowsa).

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@6 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

  • Property mode set to 100644
File size: 3.8 KB
Line 
1# main makefile
2
3BIN=bin
4SRC=src
5DIR=$(shell pwd)
6
7##############################
8
9UTT_DIST_NAME=utt-0.9
10
11export UTT_DIR=${DIR}/${UTT_DIST_NAME}
12
13export UTT_BIN_DIR=${UTT_DIR}/bin       # executables
14export UTT_CONF_DIR=${UTT_DIR}/conf     # configuration files
15export UTT_SHARE_DIR=${UTT_DIR}/share   # stuff
16export UTT_LANG_DIR=${UTT_DIR}/lang     # language/encoding specific stuff
17export UTT_TAGS_DIR=${UTT_DIR}/tags     # tag format specific stuff
18#export UTT_LIB_DIR=${UTT_DIR}/lib      # nothing
19export UTT_DOC_DIR=${UTT_DIR}/doc       # documantation
20
21UTT_DIST_FILE=utt
22
23# list of components to be included in the distribution
24
25COMPONENTS = lib gue tok.l cor lem kot sen-l sen-nl ser grp kon fla unfla mar compiledic
26
27##############################
28
29all: dirs components conf doc lang tags files share
30        @echo "Make completed successfully!"
31
32.PHONY: dirs
33dirs:
34        if [ -d ${UTT_DIR} ]; then rm -r ${UTT_DIR}; fi
35        mkdir -p ${UTT_DIR}
36        mkdir -p ${UTT_BIN_DIR}
37        mkdir -p ${UTT_CONF_DIR}
38        mkdir -p ${UTT_SHARE_DIR}
39        mkdir -p ${UTT_LANG_DIR}
40        mkdir -p ${UTT_TAGS_DIR}
41        mkdir -p ${UTT_DOC_DIR}
42
43.PHONY: components
44components:
45        @for cmp in $(COMPONENTS); do\
46                make $$cmp;\
47        done
48
49${COMPONENTS}:
50        cd $(SRC)/$@ && make && make copy; cd $(DIR);
51
52.PHONY: conf
53conf:
54        cd $(DIR)/conf && make && make copy ; cd $(DIR)
55
56.PHONY: doc
57doc:
58        cd $(DIR)/doc && make && make copy ; cd $(DIR)
59
60.PHONY: lang
61lang:
62        cd $(DIR)/lang && make && make copy ; cd $(DIR)
63
64.PHONY: tags
65tags:
66        cd $(DIR)/tags && make && make copy ; cd $(DIR)
67
68.PHONY: share
69share:
70        cd $(DIR)/share && make && make copy ; cd $(DIR)
71
72.PHONY: files
73files:
74        cd ${DIR}/files && make && make copy ; cd ${DIR}
75
76
77clean: clean_components clean_doc clean_dist
78        @echo "All files cleaned successfully!"
79
80clean_components:
81        @for cmp in $(COMPONENTS); do \
82                cd $(SRC)/$$cmp && make clean ; cd $(DIR); \
83        done
84
85clean_lib:
86        cd $(SRC)/lib && make clean
87
88clean_doc:
89        cd $(DIR)/doc && make clean ; cd $(DIR)
90
91
92
93install: all
94        cd ${UTT_DIR} && make install; cd ${DIR}
95
96uninstall:
97        cd ${UTT_DIR} && make uninstall; cd ${DIR}
98
99reinstall:
100        cd ${UTT_DIR} && make reinstall; cd ${DIR}
101
102# ifdef INSTALL_BIN_DIR
103#       if [ -d ${INSTALL_BIN_DIR} ]; then true; else mkdir -p ${INSTALL_BIN_DIR}; fi
104#       cp -r ${UTT_BIN_DIR}/* ${INSTALL_BIN_DIR}/
105# endif
106# ifdef INSTALL_SHARE_DIR
107#       if [ -d ${INSTALL_SHARE_DIR} ]; then true; else mkdir -p ${INSTALL_SHARE_DIR}; fi
108#       cp -r ${UTT_SHARE_DIR}/* ${INSTALL_SHARE_DIR}/
109# endif
110# ifdef INSTALL_DOC_DIR
111#       if [ -d ${INSTALL_DOC_DIR} ]; then true; else mkdir -p ${INSTALL_DOC_DIR}; fi
112#       cp -r ${UTT_DOC_DIR}/* ${INSTALL_DOC_DIR}/
113# endif
114# ifdef INSTALL_LIB_DIR
115#       if [ -d ${INSTALL_LIB_DIR} ]; then true; else mkdir -p ${INSTALL_LIB_DIR}; fi
116#       cp -r ${UTT_LIB_DIR}/* ${INSTALL_LIB_DIR}
117# endif
118
119#
120# install: make_dirs install_components install_cnf install_dta install_doc
121#       @echo "Installation completed successfully!"
122
123# install_components:
124#       @for cmp in $(COMPONENTS); do \
125#               cd $(SRC)/$$cmp && make install ; cd $(DIR); \
126#       done
127
128# install_cnf:
129#       cp conf/*.conf $(UTT_ETC_DIR)/
130
131# install_dta:
132#       cp -r data/* $(UTT_SHARE_DIR)/
133
134# install_doc:
135#       cp doc/utt.{ps,pdf,html,info} $(UTT_DOC_DIR)/
136
137# make_dirs:
138#       if [ -d $(UTT_BIN_DIR) ]; then true; else mkdir -p $(UTT_BIN_DIR); fi
139#       if [ -d $(UTT_ETC_DIR) ]; then true; else mkdir -p $(UTT_ETC_DIR); fi
140#       if [ -d $(UTT_SHARE_DIR) ]; then true; else mkdir -p $(UTT_SHARE_DIR); fi
141#       if [ -d $(UTT_DOC_DIR) ]; then true; else mkdir -p $(UTT_DOC_DIR); fi
142#       if [ -d $(UTT_LIB_DIR) ]; then true; else mkdir -p $(UTT_LIB_DIR); fi
143
144dist: all
145        tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR) 
146
147
148clean_dist:
149        if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi
150        if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi
151        if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi
152
Note: See TracBrowser for help on using the repository browser.