Changeset 8d3e6ab for app/Makefile
- Timestamp:
- 03/13/08 12:45:16 (17 years ago)
- Branches:
- master, help
- Children:
- 246900a
- Parents:
- e1b08a2
- git-author:
- pawelk <pawelk@…> (03/13/08 12:45:16)
- git-committer:
- pawelk <pawelk@…> (03/13/08 12:45:16)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
app/Makefile
r52bccea r8d3e6ab 1 1 # main makefile 2 2 3 BIN=bin 4 SRC=src 5 DIR=$(shell pwd) 3 # ****************************** 4 # * Local variables 5 # ****************************** 6 CUR_DIR=$(shell pwd) 7 SRC_DIR=$(CUR_DIR)/src 8 OUTPUT_DIR=$(CUR_DIR)/output 9 10 # ****************************** 11 # * Global for make globals 12 # ****************************** 13 14 export UTT_DIR=${OUTPUT_DIR} 15 16 export UTT_BIN_DIR=${UTT_DIR}/bin # executables 17 export UTT_CONF_DIR=${UTT_DIR}/etc/utt # configuration files 18 export UTT_LANG_DIR=${UTT_DIR}/share/utt # language/encoding specific stuff 19 export UTT_LIB_DIR=${UTT_DIR}/lib/utt # some files like ser.l.template, terms.m4 20 export UTT_SHARE_DIR=${UTT_DIR}/share # stuff like documantation (man, info), docs: FAQ, COPYRIGHT, NEWS, README 6 21 7 22 ############################## 8 23 9 UTT_DIST_NAME=utt-0.910 11 export UTT_DIR=${DIR}/${UTT_DIST_NAME}12 13 export UTT_BIN_DIR=${UTT_DIR}/bin # executables14 export UTT_CONF_DIR=${UTT_DIR}/conf # configuration files15 export UTT_SHARE_DIR=${UTT_DIR}/share # stuff16 export UTT_LANG_DIR=${UTT_DIR}/lang # language/encoding specific stuff17 export UTT_TAGS_DIR=${UTT_DIR}/tags # tag format specific stuff18 #export UTT_LIB_DIR=${UTT_DIR}/lib # nothing19 export UTT_DOC_DIR=${UTT_DIR}/doc # documantation20 21 UTT_DIST_FILE=utt22 23 24 # list of components to be included in the distribution 24 25 COMPONENTS = lib gue tok.l cor lem kot sen-l sen-nl ser grp kon fla unfla mar compiledic 25 COMPONENTS = compiledic cor fla gph grp kon kot lem mar rm12 rs12 sen-l sen-nl ser tags tok.l unfla 26 # gue nie dziala! 26 27 27 28 ############################## 28 29 29 all: dirs components conf doc lang tags files share 30 @echo "Make completed successfully!" 30 # ------------------------------------------------------------------ 31 # sekcja kompilacji (kompiluje i wgrywa do OUTPUT_DIR) 32 # ------------------------------------------------------------------ 33 .PHONY: compile 34 compile: dirs components 35 @echo "Make compiled successfully!" 31 36 32 37 .PHONY: dirs … … 36 41 mkdir -p ${UTT_BIN_DIR} 37 42 mkdir -p ${UTT_CONF_DIR} 43 mkdir -p ${UTT_LANG_DIR} 44 mkdir -p ${UTT_LIB_DIR} 38 45 mkdir -p ${UTT_SHARE_DIR} 39 mkdir -p ${UTT_LANG_DIR}40 mkdir -p ${UTT_TAGS_DIR}41 mkdir -p ${UTT_DOC_DIR}42 46 43 47 .PHONY: components 44 48 components: 45 49 @for cmp in $(COMPONENTS); do\ 46 make $$cmp;\50 cd $(SRC_DIR)/$$cmp && make && make copy; cd $(CUR_DIR); \ 47 51 done 48 52 49 ${COMPONENTS}:50 cd $(SRC)/$@ && make && make copy; cd $(DIR);51 53 52 .PHONY: conf 53 conf: 54 cd $(DIR)/conf && make && make copy ; cd $(DIR) 55 56 .PHONY: doc 57 doc: 58 cd $(DIR)/doc && make && make copy ; cd $(DIR) 59 60 .PHONY: lang 61 lang: 62 cd $(DIR)/lang && make && make copy ; cd $(DIR) 63 64 .PHONY: tags 65 tags: 66 cd $(DIR)/tags && make && make copy ; cd $(DIR) 67 68 .PHONY: share 69 share: 70 cd $(DIR)/share && make && make copy ; cd $(DIR) 71 72 .PHONY: files 73 files: 74 cd ${DIR}/files && make && make copy ; cd ${DIR} 75 76 54 # ------------------------------------------------------------------ 55 # sekcja sprzatania (kasuje binaria z katalogow SRC/COMPONENTS) 56 # ------------------------------------------------------------------ 57 .PHONY: clean 77 58 clean: clean_components clean_doc clean_dist 78 59 @echo "All files cleaned successfully!" 79 60 61 .PHONY: clean_components 80 62 clean_components: 81 63 @for cmp in $(COMPONENTS); do \ 82 cd $(SRC )/$$cmp && make clean ; cd $(DIR); \64 cd $(SRC_DIR)/$$cmp && make clean ; cd $(CUR_DIR); \ 83 65 done 66 cd $(SRC_DIR)/lib && make clean; cd $(CUR_DIR); 84 67 85 clean_lib: 86 cd $(SRC)/lib && make clean 68 .PHONY: clean_doc 69 clean_doc: 70 cd $(CUR_DIR)/doc && make clean ; cd $(CUR_DIR) 87 71 88 clean_doc: 89 cd $(DIR)/doc && make clean ; cd $(DIR) 72 .PHONY: clean_dist 73 clean_dist: 74 75 76 # ------------------------------------------------------------------ 77 # sekcja przygotowania paczki (programow wraz z dodatkowymi plikami) 78 # ------------------------------------------------------------------ 79 .PHONY: build 80 build: compile build_conf build_lib build_share 81 @echo "All files builded successfully!" 82 83 .PHONY: build_conf 84 build_conf: 85 cp $(CUR_DIR)/conf/* $(UTT_CONF_DIR)/ 86 87 .PHONY: build_lib 88 build_lib: 89 cp $(CUR_DIR)/lib/* $(UTT_LIB_DIR)/ 90 91 .PHONY: build_share 92 build_share: 93 @echo "We need to create documentation here!" 90 94 91 95 92 96 93 install: all 94 cd ${UTT_DIR} && make install; cd ${DIR} 95 96 uninstall: 97 cd ${UTT_DIR} && make uninstall; cd ${DIR} 98 99 reinstall: 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 144 dist: all 145 tar -czvf $(UTT_DIST_NAME).tgz $(UTT_DIR) 97 # ------------------------------------------------------------------ 98 # sekcja tworzenia dystrybucji (tarballa, rpm, deb) 99 # ------------------------------------------------------------------ 100 .PHONY: distribute 101 distribute: 102 @echo "We need to create distribution here!" 146 103 147 104 148 clean_dist:149 if [ -d $(UTT_DIST_DIR) ]; then rm -r $(UTT_DIST_DIR); else true; fi150 if [ -f $(UTT_DIST_FILE).tar.bz2 ]; then rm $(UTT_DIST_FILE).tar.bz2; else true; fi151 if [ -f $(UTT_DIST_PMDB_FILE).tar.bz2 ]; then rm $(UTT_DIST_PMDB_FILE).tar.bz2; else true; fi152 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 TracChangeset
for help on using the changeset viewer.