source: app/Makefile @ 8d3e6ab

help
Last change on this file since 8d3e6ab was 8d3e6ab, checked in by pawelk <pawelk@…>, 16 years ago

Poprawilem wiekszosc makow pod katem poprawego kompilowania.
Wystepuje blad kompilacji dla gue.

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

  • Property mode set to 100644
File size: 3.6 KB
Line 
1# main makefile
2
3# ******************************
4# * Local variables
5# ******************************
6CUR_DIR=$(shell pwd)
7SRC_DIR=$(CUR_DIR)/src
8OUTPUT_DIR=$(CUR_DIR)/output
9
10# ******************************
11# * Global for make globals
12# ******************************
13
14export UTT_DIR=${OUTPUT_DIR}
15
16export UTT_BIN_DIR=${UTT_DIR}/bin                       # executables
17export UTT_CONF_DIR=${UTT_DIR}/etc/utt          # configuration files
18export UTT_LANG_DIR=${UTT_DIR}/share/utt        # language/encoding specific stuff
19export UTT_LIB_DIR=${UTT_DIR}/lib/utt           # some files like ser.l.template, terms.m4
20export UTT_SHARE_DIR=${UTT_DIR}/share           # stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README
21
22##############################
23
24# list of components to be included in the distribution
25COMPONENTS = compiledic cor fla gph grp kon kot lem mar rm12 rs12 sen-l sen-nl ser tags tok.l unfla
26# gue nie dziala!
27
28##############################
29
30# ------------------------------------------------------------------
31# sekcja kompilacji (kompiluje i wgrywa do OUTPUT_DIR)
32# ------------------------------------------------------------------
33.PHONY: compile
34compile: dirs components
35        @echo "Make compiled successfully!"
36
37.PHONY: dirs
38dirs:
39        if [ -d ${UTT_DIR} ]; then rm -r ${UTT_DIR}; fi
40        mkdir -p ${UTT_DIR}
41        mkdir -p ${UTT_BIN_DIR}
42        mkdir -p ${UTT_CONF_DIR}
43        mkdir -p ${UTT_LANG_DIR}
44        mkdir -p ${UTT_LIB_DIR}
45        mkdir -p ${UTT_SHARE_DIR}
46
47.PHONY: components
48components:
49        @for cmp in $(COMPONENTS); do\
50                cd $(SRC_DIR)/$$cmp && make && make copy; cd $(CUR_DIR); \
51        done
52
53
54# ------------------------------------------------------------------
55# sekcja sprzatania (kasuje binaria z katalogow SRC/COMPONENTS)
56# ------------------------------------------------------------------
57.PHONY: clean
58clean: clean_components clean_doc clean_dist
59        @echo "All files cleaned successfully!"
60
61.PHONY: clean_components
62clean_components:
63        @for cmp in $(COMPONENTS); do \
64                cd $(SRC_DIR)/$$cmp && make clean ; cd $(CUR_DIR); \
65        done
66        cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR);
67
68.PHONY: clean_doc
69clean_doc:
70        cd $(CUR_DIR)/doc && make clean ; cd $(CUR_DIR)
71
72.PHONY: clean_dist
73clean_dist:
74
75
76# ------------------------------------------------------------------
77# sekcja przygotowania paczki (programow wraz z dodatkowymi plikami)
78# ------------------------------------------------------------------
79.PHONY: build
80build: compile build_conf build_lib build_share
81        @echo "All files builded successfully!"
82
83.PHONY: build_conf
84build_conf:
85        cp $(CUR_DIR)/conf/* $(UTT_CONF_DIR)/
86
87.PHONY: build_lib
88build_lib:
89        cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/
90
91.PHONY: build_share
92build_share:
93        @echo "We need to create documentation here!"
94
95
96
97# ------------------------------------------------------------------
98# sekcja tworzenia dystrybucji (tarballa, rpm, deb)
99# ------------------------------------------------------------------
100.PHONY: distribute
101distribute:
102        @echo "We need to create distribution here!"
103
104
105
106# ------------------------------------------------------------------
107# sekcja testowania (kasuje tarballa z TARBALL_TEST_DIR,
108# kompiluje, robi paczke,
109# tworzy tarballa i wgrywa go do TARBALL_TEST_DIR)
110# ------------------------------------------------------------------
111#install: all
112#       cd ${UTT_DIR} && make install; cd ${CUR_DIR}
113
114#uninstall:
115#       cd ${UTT_DIR} && make uninstall; cd ${DIR}
116
117#reinstall:
118#       cd ${UTT_DIR} && make reinstall; cd ${DIR}
119
120#dist: all
121#       tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR)
122
123
124#clean_dist:
125#       if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi
126#       if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi
127#       if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi
Note: See TracBrowser for help on using the repository browser.