fix: update makefile
This commit is contained in:
29
Makefile
29
Makefile
@@ -7,8 +7,9 @@ platform=ub22
|
||||
build_dir=$(build_root)/build
|
||||
release_dir=$(build_root)/release
|
||||
extra_dir=$(build_root)/extra
|
||||
RelDate=$(shell date "+%Y%m%d")
|
||||
|
||||
package_name=$(project)-$(version)-$(platform)
|
||||
package_name=$(project)-$(version)-$(RelDate)-$(platform)
|
||||
package_dir=$(package_name)
|
||||
package_path=$(build_dir)/$(package_name)
|
||||
svc_root=$(build_root)/../svc.ems
|
||||
@@ -49,21 +50,29 @@ bin: plat_all src_all
|
||||
clean: plat_clean src_clean
|
||||
|
||||
package: bin
|
||||
@echo "prepare build environment ..."
|
||||
@echo -n "prepare build environment ... "
|
||||
@rm -rf $(package_path)
|
||||
@mkdir -p $(package_path)
|
||||
@echo "copy bin to build directory ..."
|
||||
@echo "done"
|
||||
@echo -n "copy bin to build directory ... "
|
||||
@cp -rf $(svc_bin) $(package_path)
|
||||
@echo "update release date ..."
|
||||
@echo "done"
|
||||
@echo -n "update release date ... "
|
||||
@sed -i "s/Release Date:.*/Release Date: $(current_date)/" $(vfile)
|
||||
@echo "copy extra file to build directory ..."
|
||||
@echo "done"
|
||||
@echo -n "copy extra file to build directory ... "
|
||||
@cp -rf $(extra_dir)/* $(package_path)
|
||||
@echo "copy web file to build directory ..."
|
||||
@echo "done"
|
||||
@echo -n "copy web file to build directory ... "
|
||||
@mkdir -p $(package_path)/web
|
||||
@cp -rf $(web_root)/* $(package_path)/web
|
||||
@echo "build package $(package_file) ..."
|
||||
@echo "done"
|
||||
@echo -n "build package $(package_file) ... "
|
||||
@tar cvfz $(build_dir)/$(package_file) -C $(build_dir) $(package_name) >/dev/null
|
||||
@echo "move $(package_file) to $(release_dir) ..."
|
||||
@echo "done"
|
||||
@echo -n "move $(package_file) to $(release_dir) ... "
|
||||
@mv -f $(build_dir)/$(package_file) $(release_dir)
|
||||
@echo "clear temp build directory ..."
|
||||
@rm -rf $(package_path)
|
||||
@echo "done"
|
||||
@echo -n "clear temp build directory ... "
|
||||
@rm -rf $(package_path)
|
||||
@echo "done"
|
||||
Reference in New Issue
Block a user