#	license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
#	date: "10 Dec 2012"
#	revision: "0.1"

import subprocess, sys, os, stat

from distutils import dir_util
from os import path

from eiffel_loop.eiffel import project


def convert_pyxis_to_xml (pecf_path):
	subprocess.call (['el_toolkit2', '-pyxis_to_xml', '-no_highlighting', '-in', pecf_path])

project.set_build_environment (project.read_project_py ())

for arg in sys.argv [1:]:
	if not arg.startswith ('cpu='):
		project_path = arg

pecf_path = None
parts = path.splitext (project_path)
if parts [1] == '.pecf':
	pecf_path = project_path
	project_path = parts [0] + '.ecf'

	if os.stat (pecf_path)[stat.ST_MTIME] > os.stat (project_path)[stat.ST_MTIME]:
		convert_pyxis_to_xml (pecf_path)
		
eifgen_path = path.join ('build', os.environ ['ISE_PLATFORM'])	
示例#2
0
	env.Append (EIF_PRECOMP_MASTER_ECF = path.join (env ['EIF_PRECOMP_DIR'], path.basename (config.precompile_path)))

	if env.has_key ('ISE_C_COMPILER'):
		# Must be Windows environment
		template = path.normpath ('$EIF_PRECOMP_PLATFORM_DIR/EIFGENs/$EIF_PRECOMP_NAME/W_code/$ISE_C_COMPILER/precomp$LIBSUFFIX')
	else:
		# Must be Unix environment
		template = path.normpath ('$EIF_PRECOMP_PLATFORM_DIR/EIFGENs/$EIF_PRECOMP_NAME/W_code/preobj$OBJSUFFIX')

	env.Append (EIF_PRECOMP_OBJECT = env.subst (template))
	print 'EIF_PRECOMP_OBJECT =', env ['EIF_PRECOMP_OBJECT']

# SCRIPT START

project_py = project.read_project_py ()
project.set_build_environment (project_py) 

arguments = Variables()
arguments.Add (EnumVariable('cpu', 'Set target cpu for compiler', 'x64', allowed_values=('x64', 'x86')))
arguments.Add (
	EnumVariable('action', 'Set build action', 'finalize',
		allowed_values=(
			'freeze',
			'finalize', 
			'finalize_and_test', 
			'finalize_and_install',
			'install_resources',
			'make_installers'
		)
	)
)