source: app/Makefile @ 246900a

help
Last change on this file since 246900a was 8d3e6ab, checked in by pawelk <pawelk@…>, 17 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
RevLine 
[25ae32e]1# main makefile
2
[8d3e6ab]3# ******************************
4# * Local variables
5# ******************************
6CUR_DIR=$(shell pwd)
7SRC_DIR=$(CUR_DIR)/src
8OUTPUT_DIR=$(CUR_DIR)/output
[25ae32e]9
[8d3e6ab]10# ******************************
11# * Global for make globals
12# ******************************
[25ae32e]13
[8d3e6ab]14export UTT_DIR=${OUTPUT_DIR}
[25ae32e]15
[8d3e6ab]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
[25ae32e]21
[8d3e6ab]22##############################
[25ae32e]23
24# list of components to be included in the distribution
[8d3e6ab]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!
[25ae32e]27
28##############################
29
[8d3e6ab]30# ------------------------------------------------------------------
31# sekcja kompilacji (kompiluje i wgrywa do OUTPUT_DIR)
32# ------------------------------------------------------------------
33.PHONY: compile
34compile: dirs components
35        @echo "Make compiled successfully!"
[25ae32e]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}
[8d3e6ab]44        mkdir -p ${UTT_LIB_DIR}
45        mkdir -p ${UTT_SHARE_DIR}
[25ae32e]46
47.PHONY: components
48components:
49        @for cmp in $(COMPONENTS); do\
[8d3e6ab]50                cd $(SRC_DIR)/$$cmp && make && make copy; cd $(CUR_DIR); \
[25ae32e]51        done
52
53
[8d3e6ab]54# ------------------------------------------------------------------
55# sekcja sprzatania (kasuje binaria z katalogow SRC/COMPONENTS)
56# ------------------------------------------------------------------
57.PHONY: clean
[25ae32e]58clean: clean_components clean_doc clean_dist
59        @echo "All files cleaned successfully!"
60
[8d3e6ab]61.PHONY: clean_components
[25ae32e]62clean_components:
63        @for cmp in $(COMPONENTS); do \
[8d3e6ab]64                cd $(SRC_DIR)/$$cmp && make clean ; cd $(CUR_DIR); \
[25ae32e]65        done
[8d3e6ab]66        cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR);
[25ae32e]67
[8d3e6ab]68.PHONY: clean_doc
[25ae32e]69clean_doc:
[8d3e6ab]70        cd $(CUR_DIR)/doc && make clean ; cd $(CUR_DIR)
71
72.PHONY: clean_dist
73clean_dist:
[25ae32e]74
75
[8d3e6ab]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!"
[25ae32e]82
[8d3e6ab]83.PHONY: build_conf
84build_conf:
85        cp $(CUR_DIR)/conf/* $(UTT_CONF_DIR)/
[25ae32e]86
[8d3e6ab]87.PHONY: build_lib
88build_lib:
89        cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/
[25ae32e]90
[8d3e6ab]91.PHONY: build_share
92build_share:
93        @echo "We need to create documentation here!"
[25ae32e]94
95
96
[8d3e6ab]97# ------------------------------------------------------------------
98# sekcja tworzenia dystrybucji (tarballa, rpm, deb)
99# ------------------------------------------------------------------
100.PHONY: distribute
101distribute:
102        @echo "We need to create distribution here!"
[25ae32e]103
104
105
[8d3e6ab]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}
[25ae32e]113
[8d3e6ab]114#uninstall:
115#       cd ${UTT_DIR} && make uninstall; cd ${DIR}
[25ae32e]116
[8d3e6ab]117#reinstall:
118#       cd ${UTT_DIR} && make reinstall; cd ${DIR}
[25ae32e]119
[8d3e6ab]120#dist: all
121#       tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR)
[25ae32e]122
123
[8d3e6ab]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.