o
    Wod l                     @  s  d dl mZ d dlZd dlZd dlZd dlZd dlZd dlm	Z	 ddl
mZmZ ddlmZ ddlmZmZmZmZmZ ddlmZ ejrudd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZm Z m!Z!m"Z"m#Z#m$Z$m%Z% ddlm&Z& G dd deZ'G dd dZ(G dd de	Z)e*de+Z,G dd deZ-G dd de-Z.G dd dZ/G dd de-e/Z0G dd de-Z1G d d! d!e0Z2dFd%d&Z3dGd*d+Z4dHd1d2Z5dId8d9Z6dJd@dAZ7G dBdC dCe0Z8G dDdE dEe0Z9dS )K    )annotationsN)Enum   )mlogmesonlib)
clib_langs)LibTypeMachineChoiceMesonExceptionHoldableObject	OptionKey)version_compare_many)ImmutableListProtocol)Compiler)Environment)FeatureCheckBase)CustomTargetIncludeDirsCustomTargetIndexLibTypesStaticLibraryStructuredSourcesExtractedObjects)FileOrStringc                   @  s   e Zd ZdZdS )DependencyExceptionz3Exceptions raised while trying to find dependenciesN)__name__
__module____qualname____doc__ r   r   {home/ych/rk3568/buildroot/output/rockchip_rk3568_recovery/host/lib/python3.10/site-packages/mesonbuild/dependencies/base.pyr   ,   s    r   c                   @  s$   e Zd ZdZdddZdd	d
ZdS )MissingCompilerznRepresent a None Compiler - when no tool chain is found.
    replacing AttributeError with DependencyExceptionitemstrreturnT.Anyc                 C  s   | drt td)N__zno toolchain found)
startswithAttributeErrorr   )selfr"   r   r   r    __getattr__4   s   
zMissingCompiler.__getattr__boolc                 C     dS NFr   r)   r   r   r    __bool__9      zMissingCompiler.__bool__N)r"   r#   r$   r%   r$   r+   )r   r   r   r   r*   r/   r   r   r   r    r!   0   s    
r!   c                   @  sD   e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdS )DependencyMethodsautoz
pkg-configcmakebuiltinsystemZextraframework	sysconfigzconfig-toolZ	sdlconfigzcups-configzpcap-configzlibwmf-configZqmakeZdubN)r   r   r   AUTOZ	PKGCONFIGZCMAKEZBUILTINZSYSTEMZEXTRAFRAMEWORKZ	SYSCONFIGCONFIG_TOOL	SDLCONFIG
CUPSCONFIG
PCAPCONFIGLIBWMFCONFIGQMAKEZDUBr   r   r   r    r2   =   s    r2   DependencyTypeNamec                   @  s  e Zd ZedVddZdWd
dZdXddZdYddZdZddZd[ddZ	d[ddZ
d\d]ddZd[d d!ZdYd"d#Zd^d%d&ZdXd'd(ZdXd)d*Zd_d,d-ZdXd.d/Zd`d2d3Zdad8d9Zdbd:d;Zdddddd<dcdCdDZdddGdHZdddddddIdedQdRZdfdTdUZdS )g
DependencykwargsT.Dict[str, T.Any]r$   r#   c                 C  s>   d|vrdS t |d tstd|d dvrtd|d S )Ninclude_typepreservez,The include_type kwarg must be a string type)rD   r6   
non-systemzDinclude_type may only be one of ['preserve', 'system', 'non-system'])
isinstancer#   r   )clsrA   r   r   r    _process_include_type_kw[   s   z#Dependency._process_include_type_kw	type_namer?   Nonec                 C  sd   d| _ d | _d | _d| _|| _g | _g | _d | _g | _| 	|| _
g | _tt| _g | _d | _d S )NnullF)nameversionlanguageis_foundrI   compile_args	link_argsraw_link_argssourcesrH   rC   ext_depscollectionsdefaultdictlist
d_featuresZfeaturechecksZfeature_since)r)   rI   rA   r   r   r    __init__e   s   
zDependency.__init__c                 C  s    d| j j d| j d| j dS )N< z: >)	__class__r   rL   rO   r.   r   r   r    __repr__w   s    zDependency.__repr__r+   c                 C  r,   r-   r   r.   r   r   r    is_builtz   r0   zDependency.is_built/T.Union[str, mlog.AnsiDecorator, mlog.AnsiText]c                 C  s>   |   s	tdS | jstdS ttddt| jS )NNOYESr[   )foundr   redrM   greenZAnsiTextZcyanr.   r   r   r    summary_value}   s
   

zDependency.summary_valueT.List[str]c                 C  s   | j dkr*g }| jD ]}|ds|dr"|d|dd   g7 }q
||g7 }q
|S | j dkrOg }| jD ]}|drG|d|dd   g7 }q4||g7 }q4|S | jS )Nr6   z-Iz/Iz-isystemr   rE      )rC   rP   r'   )r)   Z	convertedir   r   r    get_compile_args   s   




zDependency.get_compile_argsc                 C  &   t tj|  gdd | jD R  S )zIGet the compile arguments from this dependency and it's sub dependencies.c                 s      | ]}|  V  qd S N)get_all_compile_args.0dr   r   r    	<genexpr>       z2Dependency.get_all_compile_args.<locals>.<genexpr>)rW   	itertoolschainrj   rT   r.   r   r   r    rn         
zDependency.get_all_compile_argsNFrN   T.Optional[str]rawc                 C  s   |r
| j d ur
| j S | jS rm   )rR   rQ   r)   rN   rx   r   r   r    get_link_args   s   zDependency.get_link_argsc                 C  rk   )zFGet the link arguments from this dependency and it's sub dependencies.c                 s  rl   rm   )get_all_link_argsro   r   r   r    rr      rs   z/Dependency.get_all_link_args.<locals>.<genexpr>)rW   rt   ru   rz   rT   r.   r   r   r    r{      rv   zDependency.get_all_link_argsc                 C     | j S rm   )rO   r.   r   r   r    rc         zDependency.foundDT.List[T.Union['FileOrString', 'CustomTarget', 'StructuredSources']]c                 C  r|   )zgSource files that need to be added to the target.
        As an example, gtest-all.cc when using GTest.)rS   r.   r   r   r    get_sources   s   zDependency.get_sourcesc                 C  r|   rm   )rL   r.   r   r   r    get_name   r}   zDependency.get_namec                 C  s   | j r| j S dS )Nunknown)rM   r.   r   r   r    get_version   s   zDependency.get_versionT.List['IncludeDirs']c                 C     g S rm   r   r.   r   r   r    get_include_dirs   r0   zDependency.get_include_dirsc                 C  r|   rm   )rC   r.   r   r   r    get_include_type   r}   zDependency.get_include_typecompiler
'Compiler'c                 C  r   rm   r   )r)   r   r   r   r    get_exe_args   r0   zDependency.get_exe_argsvariable_namedefine_variable'ImmutableListProtocol[str]'defaultc                 C     t | jd)Nz is not a pkgconfig dependencyr   rL   r)   r   r   r   r   r   r    get_pkgconfig_variable   s   z!Dependency.get_pkgconfig_variablec                 C  r   )Nz  is not a config-tool dependencyr   r)   r   r   r   r    get_configtool_variable      z"Dependency.get_configtool_variablerP   rQ   linksincludesrS   rP   rQ   r   r   rS   'Dependency'c                C     t d)a8  Create a new dependency that contains part of the parent dependency.

        The following options can be inherited:
            links -- all link_with arguments
            includes -- all include_directory and -I/-isystem calls
            sources -- any source, header, or generated sources
            compile_args -- any compile args
            link_args -- any link args

        Additionally the new dependency will have the version parameter of it's
        parent (if any) and the requested values of any dependencies will be
        added as well.
        z-Unreachable code in partial_dependency called)RuntimeErrorr)   rP   rQ   r   r   rS   r   r   r    get_partial_dependency   s   z!Dependency.get_partial_dependencydeplist(T.Iterable[T.Callable[[], 'Dependency']]c                 C  s,   |D ]}| }|j r| j|  dS qdS )a  Add an internal dependency from a list of possible dependencies.

        This method is intended to make it easier to add additional
        dependencies to another dependency internally.

        Returns true if the dependency was successfully added, false
        otherwise.
        TF)rO   rT   append)r)   r   rq   depr   r   r    _add_sub_dependency   s   	zDependency._add_sub_dependencyr4   	pkgconfig
configtoolinternaldefault_valuepkgconfig_definer4   r   r   r   r   r   T.Optional[T.List[str]]c                C  s   |d ur|S t d| d)Nz#No default provided for dependency z7, which is not pkg-config, cmake, or config-tool based.r   )r)   r4   r   r   r   r   r   r   r   r    get_variable   s   zDependency.get_variablerC   c                 C  s   t | }| d|i|_|S )NrC   )copydeepcopyrH   rC   )r)   rC   new_depr   r   r    generate_system_dependency   s   
z%Dependency.generate_system_dependency)rA   rB   r$   r#   )rI   r?   rA   rB   r$   rJ   r$   r#   r1   )r$   r`   )r$   rg   r-   rN   rw   rx   r+   r$   rg   )r$   r~   r$   r   )r   r   r$   rg   r   r#   r   r   r   rw   r$   r#   r   r#   r$   r#   )rP   r+   rQ   r+   r   r+   r   r+   rS   r+   r$   r   )r   r   r$   r+   r4   rw   r   rw   r   rw   r   rw   r   rw   r   r   r$   r#   )rC   r#   r$   r   )r   r   r   classmethodrH   rY   r^   r_   rf   rj   rn   rz   r{   rc   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r@   Y   s>    
	















r@   c                      s   e Zd ZdD fddZdEddZdFd d!ZdGd#d$ZdHd*d+ZdId,d-Zd.d.d.d.d.d/dJd2d3Z	dKd4d5Z
d6d6d6d6d6d6d7dLd?d@ZdMdBdCZ  ZS )NInternalDependencyrM   r#   incdirsr   rP   rg   rQ   	librariesT.List[LibTypes]whole_libraries?T.List[T.Union[StaticLibrary, CustomTarget, CustomTargetIndex]]rS   BT.Sequence[T.Union[FileOrString, CustomTarget, StructuredSources]]rT   T.List[Dependency]	variablesT.Dict[str, str]d_module_versionsT.List[T.Union[str, int]]d_import_dirsobjectsT.List['ExtractedObjects']c                   s|   t  tdi  || _d| _|| _|| _|| _|| _|| _	t
|| _|| _|	| _|| _|
r3|
| jd< |r<|| jd< d S d S )Nr   TZversionsZimport_dirs)superrY   r?   rM   rO   include_directoriesrP   rQ   r   r   rW   rS   rT   r   r   rX   )r)   rM   r   rP   rQ   r   r   rS   rT   r   r   r   r   r]   r   r    rY      s"   

zInternalDependency.__init__memo!T.Dict[int, 'InternalDependency']r$   'InternalDependency'c                 C  sp   | j | j }t|tsJ ||t| < | j D ]\}}|dv r+t||t| qt||t	|| q|S )N>   r   r   )
r]   __new__rF   r   id__dict__itemssetattrr   r   )r)   r   resultkvr   r   r    __deepcopy__  s   zInternalDependency.__deepcopy__mlog.AnsiDecoratorc                 C  s
   t dS )Nrb   )r   re   r.   r   r   r    rf        
z InternalDependency.summary_valuer+   c                 C  s*   | j s	| js	| jrdS tdd | jD S )NTc                 s  rl   rm   )r_   ro   r   r   r    rr   $  rs   z.InternalDependency.is_built.<locals>.<genexpr>)rS   r   r   anyrT   r.   r   r   r    r_   !  s   zInternalDependency.is_builtr   r   r   r   rw   c                 C  r   )NzGMethod "get_pkgconfig_variable()" is invalid for an internal dependencyr   r   r   r   r    r   &  s   z)InternalDependency.get_pkgconfig_variablec                 C  r   )NzHMethod "get_configtool_variable()" is invalid for an internal dependencyr   r   r   r   r    r   ,  s   z*InternalDependency.get_configtool_variableFr   r   r   c                  s    r| j  ng }r| j ng }r| j ng }r"| j ng }	r+| j ng }
r4| j ng } fdd| jD }t| j	|||||	|
|| j
g g g S )Nc              	     s    g | ]}|j  d qS )r   )r   ro   rP   r   rQ   r   rS   r   r    
<listcomp>9  s    
z=InternalDependency.get_partial_dependency.<locals>.<listcomp>)rP   r   rQ   r   r   rS   r   rT   r   rM   r   )r)   rP   rQ   r   r   rS   Zfinal_compile_argsZfinal_link_argsZfinal_librariesZfinal_whole_librariesZfinal_sourcesZfinal_includes
final_depsr   r   r    r   0  s   z)InternalDependency.get_partial_dependencyc                 C  r|   rm   )r   r.   r   r   r    r   A  r}   z#InternalDependency.get_include_dirsNr   r4   r   r   r   r   r   r   c                C  s(   | j ||}|d ur|S td| )Nz?Could not get an internal variable and no default provided for )r   getr   )r)   r4   r   r   r   r   r   valr   r   r    r   D  s   zInternalDependency.get_variabler@   c                 C  s|   ddl m}m}m} t| }|jD ]}t||rtdt|||fr,|	 r,tdq| j
td|j7  _
g |_|S )Nr   )SharedLibraryr   r   zJCannot convert a dependency to link_whole when it contains a SharedLibraryzxCannot convert a dependency to link_whole when it contains a CustomTarget or CustomTargetIndex which is a shared libraryr   )buildr   r   r   r   r   r   rF   r
   Zlinks_dynamicallyr   Tcast)r)   r   r   r   r   xr   r   r    generate_link_whole_dependencyM  s   


z1InternalDependency.generate_link_whole_dependency)rM   r#   r   r   rP   rg   rQ   rg   r   r   r   r   rS   r   rT   r   r   r   r   r   r   r   r   r   )r   r   r$   r   )r$   r   r1   r   r   )rP   r+   rQ   r+   r   r+   r   r+   rS   r+   r$   r   r   r   )r$   r@   )r   r   r   rY   r   rf   r_   r   r   r   r   r   r   __classcell__r   r   r   r    r      s$    





	r   c                   @  s    e Zd Zd
ddZdddZd	S )HasNativeKwargrA   rB   c                 C  s   |  || _d S rm   )get_for_machine_from_kwargsfor_machiner)   rA   r   r   r    rY   _  r   zHasNativeKwarg.__init__r$   r	   c                 C  s   | ddr	tjS tjS )NZnativeF)r   r	   ZBUILDZHOSTr   r   r   r    r   b  s   z*HasNativeKwarg.get_for_machine_from_kwargsN)rA   rB   )rA   rB   r$   r	   )r   r   r   rY   r   r   r   r   r    r   ^  s    
r   c                   @  sf   e Zd Zd%d&d
dZd'ddZddddddd(ddZd)ddZd)ddZed)d d!Z	d*d#d$Z
dS )+ExternalDependencyNrI   r?   environment'Environment'rA   rB   rN   rw   c                 C  s   t | || || _|| _d| _|| _|dd }t|tr!|g}|| _	|dd| _
|dd| _|d| jjtd| _| jrFtjntj| _t| jtsTtdt| | t| j|| j| j| _d S )	NFrM   requiredTsilentstaticZprefer_staticzStatic keyword must be boolean)r@   rY   envrL   rO   rN   r   rF   r#   version_reqsr   r   coredataZ
get_optionr   r   r   ZSTATICZPREFER_SHAREDZlibtyper+   r   r   detect_compilerr   clib_compiler)r)   rI   r   rA   rN   r   r   r   r    rY   f  s"   
zExternalDependency.__init__r$   &T.Union['MissingCompiler', 'Compiler']c                 C  r|   rm   )r   r.   r   r   r    get_compilerz  r}   zExternalDependency.get_compilerFr   rP   r+   rQ   r   r   rS   r@   c                C  s<   t  | }|s
g |_|sg |_|sg |_|s	 |sg |_|S rm   )r   rP   rQ   rS   r)   rP   rQ   r   r   rS   newr   r   r    r   }  s   
z)ExternalDependency.get_partial_dependencyr#   c                 C  r,   N r   r.   r   r   r    log_details  r0   zExternalDependency.log_detailsc                 C  r,   r   r   r.   r   r   r    log_info  r0   zExternalDependency.log_infoc                   C  r,   r   r   r   r   r   r    	log_tried     zExternalDependency.log_triedrJ   c                 C  s0  | j sd S | jr| js;d| _ g }|dt| jdg7 }|tdd| jg7 }tj|  | jr9d| jd}t	|d S t
| j| j\| _ }}| j sdt| jdg}|tddt| jd	td
dd |D g7 }|r}|dd
dd |D g7 }tj|  | jrd}t	|| j|| jd S d S d S )NFr@   found:ra   zunknown version, but need:zUnknown version, but need .rc   z	but need:z, c                 S     g | ]}d | d qS 'r   rp   er   r   r    r         z5ExternalDependency._check_version.<locals>.<listcomp>z
; matched:c                 S  r   r   r   r  r   r   r    r     r  z+Invalid version, need {!r} {!r} found {!r}.)rO   r   rM   r   boldrL   rd   logr   r   r   Znormal_cyanjoinformat)r)   Z	found_msgmZ	not_foundrc   r   r   r    _check_version  s@   



z!ExternalDependency._check_versionrm   )rI   r?   r   r   rA   rB   rN   rw   )r$   r   )rP   r+   rQ   r+   r   r+   r   r+   rS   r+   r$   r@   r   )r$   rJ   )r   r   r   rY   r   r   r   r   staticmethodr   r	  r   r   r   r    r   e  s    


r   c                      s6   e Zd Zd fddZd	d	d	d	d	d
dddZ  ZS )NotFoundDependencyrL   r#   r   r   r$   rJ   c                   s(   t  tdi  || _|| _d| _d S )Nz	not-foundF)r   rY   r?   r   rL   rO   )r)   rL   r   r   r   r    rY     s   
zNotFoundDependency.__init__Fr   rP   r+   rQ   r   r   rS   'NotFoundDependency'c                C  s
   t  | S rm   )r   r   r   r   r    r     r   z)NotFoundDependency.get_partial_dependency)rL   r#   r   r   r$   rJ   )rP   r+   rQ   r+   r   r+   r   r+   rS   r+   r$   r  )r   r   r   rY   r   r   r   r   r   r    r    s    r  c                      sJ   e Zd Z	dd fddZdd fddZddddddd ddZ  ZS )!ExternalLibraryFrL   r#   rQ   rg   r   r   rN   r   r+   r$   rJ   c                   s   t  jtd|i |d || _|| _d| _|rd| _|| _|sB| jr2tdt	|dt
d d S tdt	|dtd d S d S )	NZlibraryrN   FTLibraryr   rb   ra   )r   rY   r?   rL   rN   rO   rQ   r   r  r  re   rd   )r)   rL   rQ   r   rN   r   r   r   r    rY     s     zExternalLibrary.__init__Nrw   rx   c                   s8   | j dkr	|dks|dkr| j dkrg S t j||dS )ad  
        External libraries detected using a compiler must only be used with
        compatible code. For instance, Vala libraries (.vapi files) cannot be
        used with C code, and not all Rust library types can be linked with
        C-like code. Note that C++ libraries *can* be linked with C code with
        a C++ linker (and vice-versa).
        Zvala)rN   rx   )rN   r   rz   ry   r   r   r    rz     s   
zExternalLibrary.get_link_argsr   rP   r   r   rS   'ExternalLibrary'c                C  s   t  | }|s
g |_|S rm   )r   rQ   r   r   r   r    r     s   
z&ExternalLibrary.get_partial_dependency)F)rL   r#   rQ   rg   r   r   rN   r#   r   r+   r$   rJ   r-   r   )rP   r+   rQ   r+   r   r+   r   r+   rS   r+   r$   r  )r   r   r   rY   rz   r   r   r   r   r   r    r    s    r  depsr   r$   c                 C  sd   | s|   S g }| r0g }t| D ]}t|tr| r td|| ||j	 q|} | s
|S )Nz*Dependencies must be external dependencies)
r   r   ZlistifyrF   r@   r_   r   r   extendrT   )r  r   Z	next_depsrq   r   r   r    get_leaf_external_dependencies  s   
r  libpathsrg   refpathsc                   s.   t  dkr
t| S d
 fdd}t| |dS )zSort <libpaths> according to <refpaths>

    It is intended to be used to sort -L flags returned by pkg-config.
    Pkg-config returns flags in random order which cannot be relied on.
    r   libpathr#   r$   T.Tuple[int, int]c              	     sr   g } D ]}z
t j| |g}W n ty   d}Y nw |t| qt|}||}t | | }||fS r   )ospath
commonpath
ValueErrorr   lenmaxindex)r  Zcommon_lengthsZrefpathZcommon_path
max_lengthZ	max_indexZreversed_max_lengthr  r   r    key_func  s   
zsort_libpaths.<locals>.key_func)keyN)r  r#   r$   r  )r  rW   sorted)r  r  r!  r   r   r    sort_libpaths  s   r$  r   r   r   r	   rQ   c                   s&   dd |  |D   fdd|D S )zRemove -L<system path> arguments.

    leaving these in will break builds where a user has a version of a library
    in the system path, and a different version not in the system path if they
    want to link against the non-system path version.
    c                 S  s   h | ]}d | qS )z-Lr   )rp   pr   r   r    	<setcomp>"  s    z'strip_system_libdirs.<locals>.<setcomp>c                   s   g | ]}| vr|qS r   r   )rp   lexcluder   r    r   #  r  z(strip_system_libdirs.<locals>.<listcomp>)Zget_compiler_system_dirs)r   r   rQ   r   r(  r    strip_system_libdirs  s   r*  possibleT.Iterable[DependencyMethods]rA   rB   T.List[DependencyMethods]c              
   C  s   | dd}t|tr|gS |dd tD vrtd|dt|}|tju r)	 |tjtjtjtjfv r8tj}|tj	u r@tj}|tj
krKt| }|S || v rT|g}|S td|jtdd tj
gt|  D )	Nmethodr3   c                 S     g | ]}|j qS r   valuer  r   r   r    r   *      z%process_method_kw.<locals>.<listcomp>zmethod z is invalidz8Unsupported detection method: {}, allowed methods are {}c                 S  r/  r   r0  )rp   r   r   r   r    r   I  r2  )r   rF   r2   r   r9   r:   r;   r<   r=   r>   r8   rW   r  r1  r   format_list)r+  rA   r.  methodsr   r   r    process_method_kw%  s4   




	r5  rL   r#   r   rN   rw   r   c              	   C  sn   |j j| }|r||vr|  d }t|| || S tD ]}z|| W   S  ty3   Y q!w t S )z8Given a language and environment find the compiler used.zI requires a {0} compiler, but {0} is not in the list of project languages)r   	compilers
capitalizer   r  r   KeyErrorr!   )rL   r   r   rN   r6  r  langr   r   r    r   M  s   r   c                      4   e Zd ZdZ	dd fddZedddZ  ZS )SystemDependencyz-Dependency base for System type dependencies.NrL   r#   r   r   rA   rB   rN   rw   r$   rJ   c                   "   t  jtd|||d || _d S )Nr6   r  r   rY   r?   rL   r)   rL   r   rA   rN   r   r   r    rY   g     
zSystemDependency.__init__c                   C  r,   )Nr6   r   r   r   r   r    r   l  r   zSystemDependency.log_triedrm   
rL   r#   r   r   rA   rB   rN   rw   r$   rJ   r   r   r   r   r   rY   r
  r   r   r   r   r   r    r;  c      r;  c                      r:  )BuiltinDependencyz.Dependency base for Builtin type dependencies.NrL   r#   r   r   rA   rB   rN   rw   r$   rJ   c                   r<  )Nr5   r  r=  r>  r   r   r    rY   u  r?  zBuiltinDependency.__init__c                   C  r,   )Nr5   r   r   r   r   r    r   z  r   zBuiltinDependency.log_triedrm   r@  r   rA  r   r   r   r    rC  q  rB  rC  )r  r   r$   r   )r  rg   r  rg   r$   rg   )r   r   r   r	   rQ   rg   r$   rg   )r+  r,  rA   rB   r$   r-  )
rL   r#   r   r   r   r	   rN   rw   r$   r   ):
__future__r   r   r  rU   rt   typingr   enumr   r   r   r   r6  r   r   r	   r
   r   r   r   TYPE_CHECKINGZ_typingr   Zcompilers.compilersr   r   r   Zinterpreterbaser   r   r   r   r   r   r   r   r   r   r   r!   r2   NewTyper#   r?   r@   r   r   r   r  r  r  r$  r*  r5  r   r;  rC  r   r   r   r    <module>   sH   $ gX
*




(