Esempio n. 1
0
	def do_makes(self):
		printf.status("build ...")
		# build all projects
		for i in build_ini.list_of_dict:
			printf.silence("build project: " + i[glb.project_name])
			project_path = i[glb.project_path]
			path.push()
			path.change(project_path)

			# 缺省无参数 - clean、make、install
			action_sum = self.build_args['-c'] + self.build_args['-m'] + self.build_args['-i']
			
			# 执行相关make动作之前,先打上补丁
			patch_repos.patch_args = {"-f":build_ini.ini, "-p": i[glb.project_name], "-a":0}
			patch_repos.do_patch()
			
			# make others, 执行完后返回
			if self.build_args['-x'] != '':
				self.make_others(i)
				return

			# make clean
			if self.build_args['-c'] == 1 or action_sum == 0:
				self.make_clean(i)

			# make
			if self.build_args['-m'] == 1 or action_sum == 0:
				self.make(i)

			# make install
			if self.build_args['-i'] == 1 or action_sum == 0:
				self.make_install(i)

			path.pop()
		return
Esempio n. 2
0
def main():

	# start patch
	time.push(os.path.abspath(__file__))

	# patch the project
	patch_repos.patch_args = arg.patch_args()
	ini = os.getcwd() + "/" + patch_repos.patch_args['-f']
	build_ini.parse(ini)
	patch_repos.do_patch()

	# end patch
	time.pop()
	printf.silence("patch done.")
	sys.exit(0)
Esempio n. 3
0
	def do_makes(self):
		printf.status("build ...")
		
		# olny list all repos name
		if self.build_args['-l'] != "":
			printf.status("only for list !")
			return 

		# judge build one
		build_one_flg = 0
		if self.build_args['-o'] != "":
			n = len(build_ini.list_of_dict)
			build_one_flg = 1
			if int(self.build_args['-o']) > n:
				printf.error("No project - " + self.build_args['-o'])

		# build all projects
		n = 0
		for i in build_ini.list_of_dict:
			n = n + 1			
			printf.silence("build project: " + i[glb.project_name])
			if build_one_flg == 1:
				if self.build_args['-o'] != str(n):
					printf.status("no need build!")
					continue
			# 判断是否有编译section关键字
			if i[glb.project_name].find(glb.build_key) != -1:
				if i[glb.project_name].find(os.environ['DAVINCI_SDK']) == -1:
					printf.status("no need build!")
					continue

			project_path = i[glb.project_path]
			path.push()
			path.change(project_path)

			# 缺省无参数 - clean、make、install
			action_sum = self.build_args['-c'] + self.build_args['-m'] + self.build_args['-i']
			
			# 执行相关make动作之前,先打上补丁
			patch_repos.patch_args = {"-f":build_ini.ini, "-o": str(n), "-a":0} # 发送标号,从1开始
			patch_repos.do_patch()
			
			# make others, 执行完后返回
			if self.build_args['-x'] != '':
				self.make_others(i)
				return

			# make clean
			if self.build_args['-c'] == 1 or action_sum == 0:
				#printf.pause("make clean ...")
				self.make_clean(i)

			# make
			if self.build_args['-m'] == 1 or action_sum == 0:
				#printf.pause("make ...")
				self.make(i)

			# make install
			if self.build_args['-i'] == 1 or action_sum == 0:
				#printf.pause("make install ...")
				self.make_install(i)

			path.pop()
		return