harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ivanov" <ivavladi...@gmail.com>
Subject Re: [classlib][build] exclude list impl issues
Date Fri, 19 Jan 2007 13:00:55 GMT
This looks OK/ Thanks. But in this case we will have messages something like
that:
"
prepare-exclude:
   [delete] Deleting:
C:\harmony.top\classlib\trunk\modules\archive\make\null920538197
"
If it better for you than 3 'internal' target update the property.xml and
one any module (for example). I'll update other modules to support it.

 thanks, Vladimir

On 1/19/07, Alexei Zakharov <alexei.zakharov@gmail.com> wrote:
>
> Aha, I see. This is because I didn't try it on Windows - it seems
> Windows doesn't like paths like "\C:\harmony\enhanced" :) So I
> reworked my code a little bit. You may see the updated version below.
> I've moved declarations of properties for exclude lists names from
> module-level build.xmls to global properties.xml since they are
> constants. So in this version we have only one property and one macro
> call for each build.xml.
>
> If you run the code below you may notice that the <delete> target
> prints some notifications to the screen. But this is ok because it
> prints to stdout rather than stderr so AFAIU this should not appear in
> CC reports.
>
> This is example for CRYPTO module.
>
> modules/crypto/build.xml:
> ---
>    <property name="crypto.exclude.file"
> location="${hy.hdk}/build/crypto.exclude" />
> ...
>    <target name="prepare-exclude">
>       <prepare-exclude-list moduleName="crypto" dir="./make"
>                             result="${crypto.exclude.file}"/>
>    </target>
>
>
> make/properties.xml:
> ---
>    <property name="common.exclude.file" location="exclude.common" />
>    <property name="platform.exclude.file"
> location="exclude.${ hy.platform}.${hy.test.vm.name}" />
>    <property name="interm.exclude.file"
> location="exclude.${hy.platform}.${hy.test.vm.name }.interm" />
>
>    <macrodef name="prepare-exclude-list">
>       <attribute name="moduleName"/>
>       <!-- directory with exclude list for the module -->
>       <attribute name="dir"/>
>       <!-- should be an absolute pathname -->
>       <attribute name="result"/>
>       <sequential>
>           <condition property="@{moduleName}.fname1"
>                      value="${ common.exclude.file}">
>               <and>
>                   <available
> file="@{dir}${file.separator}${common.exclude.file}"/>
>                   <length
> file="@{dir}${file.separator }${common.exclude.file}" when="greater"
> length="0"/>
>               </and>
>           </condition>
>           <property name="@{moduleName}.fname1" value=""/>
>
>           <condition property="@{moduleName}.fname2"
>                      value="${platform.exclude.file}">
>               <and>
>                   <available
> file="@{dir}${ file.separator}${platform.exclude.file}"/>
>                   <length
> file="@{dir}${file.separator}${platform.exclude.file}" when="greater"
> length="0"/>
>               </and>
>           </condition>
>           <property name="@{moduleName}.fname2" value=""/>
>
>           <condition property="@{moduleName}.fname3"
>                      value="${ interm.exclude.file}">
>               <and>
>                   <available
> file="@{dir}${file.separator}${interm.exclude.file}"/>
>                   <length
> file="@{dir}${file.separator }${interm.exclude.file}" when="greater"
> length="0"/>
>               </and>
>           </condition>
>           <property name="@{moduleName}.fname3" value=""/>
>
>           <tempfile property="@{moduleName}.tmpFile" destdir="@{dir}"/>
>           <echo message="" file="${@{moduleName}.tmpFile}"/>
>           <basename file="${@{moduleName}.tmpFile}"
>                     property="@{moduleName}.tmpFileName" />
>           <concat destfile="@{result}" force="yes">
>               <filelist dir="@{dir}"
>                   files="${@{moduleName}.fname1}
> ${@{moduleName}.fname2} ${@{moduleName}.fname3}
> ${@{moduleName}.tmpFileName}"/>
>           </concat>
>           <delete file="${@{moduleName}.tmpFile}" failonerror="false"
>                   quiet="true"/>
>       </sequential>
>   </macrodef>
> </project>
>
>
> 2007/1/19, Vladimir Ivanov <ivavladimir@gmail.com >:
> > In may case the whole message was (with your update):
> > "
> > prepare-exclude:
> >    [concat] File
> \C:\harmony.top\classlib\trunk\deploy\build\null36175345
> > does not exist.
> >    [concat] No existing files and no nested text, doing nothing
> > "
> > thanks, Vladimir
> >
> >
> > On 1/19/07, Alexei Zakharov <alexei.zakharov@gmail.com> wrote:
> > >
> > > > In this case we will see something like:
> > > > "prepare-exclude:
> > > >    [concat] File <file_name> does not exist."
> > >
> > > Why? Please look again at the code - it tries to concat only existent
> > > files. The list of existent files is builded before the concat target
> > > is called. If no one exists it concats just an empty temporary file
> > > that have been created beforehand.
> > >
> > > Regards,
> > >
> > > 2007/1/19, Vladimir Ivanov < ivavladimir@gmail.com>:
> > > > In this case we will see something like:
> > > > "prepare-exclude:
> > > >    [concat] File <file_name> does not exist."
> > > >
> > > > for missed files. I think, we can prepare the exclude list into one
> > > target
> > > > with ant.contrib but it used for DRLVM build only. So we need 3
> > > conditional
> > > > tasks to hide these messages.
> > > >
> > > >  thanks, Vladimir
>
> --
> Alexei Zakharov,
> Intel ESSD
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message